bandit icon indicating copy to clipboard operation
bandit copied to clipboard

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

Open mayblo opened this issue 3 years ago • 4 comments
trafficstars

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

mayblo avatar May 24 '22 09:05 mayblo

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!

ericwb avatar May 24 '22 17:05 ericwb

Also bandit doesn't offer fingerprinting

sigmavirus24 avatar May 24 '22 18:05 sigmavirus24

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 avatar May 25 '22 07:05 rotem-cider

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

rotem-cider avatar May 25 '22 08:05 rotem-cider