Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding option to not print line's number: --no-line-numbers #904

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mayblo
Copy link

@mayblo mayblo commented May 24, 2022

Because of fingerprinting algorithms the line numbers may change the fingerprints.

@ericwb
Copy link
Member

ericwb commented May 24, 2022

Could you please give me some more insight into the problem this PR is fixing? Seems like a good one to open as a feature enhancement first. Thanks!

Copy link
Member

@sigmavirus24 sigmavirus24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment isn't where we store these values as that's not preserved in multiprocessing

@sigmavirus24
Copy link
Member

Also bandit doesn't offer fingerprinting

@rotem-cider
Copy link

Also bandit doesn't offer fingerprinting

We encountered problems when other tools using sarif use fingerprinting and use the code area, every time there is a change in a line the fingerprint changes. This is why we added internally the option to remove line numbers and thought it will be a good idea to contribute back to bandit

@rotem-cider
Copy link

The environment isn't where we store these values as that's not preserved in multiprocessing

We investigated and saw it is complicated and need more time to understand how to propagate the flag to the issues function.

I agree env is not the ideal solution, If you have any good suggestions how to propogate the data we will be happy to talk and make the changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants