-
-
Notifications
You must be signed in to change notification settings - Fork 622
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
Add numeric options for severity and confidence #702
Add numeric options for severity and confidence #702
Conversation
Thanks so much for taking the initiative on this. The approach with using mutually exclusive groups looks right to me. I'm wondering if the numbers are the right thing to use instead of a string (text). I'm thinking that I'd also switch from calling |
|
The latest commit implements the string options as suggested.
|
Why did you close this? |
|
Adds two new command line arguments which allow the user to specify severity level and confidence level with a key-value pair rather than repeating a flag. This makes it easier to specify those values if using an alternate interface which invokes Bandit's CLI. The previous repeatable flags have been retained and existing workflows will not be affected. New arguments: * --severity-level: Takes a string "all", "low", "medium", or "high" to set the level. This has the same effect as the existing -l/--level option. If both options are specified, an error will be printed. * --confidence-level: Takes a string "all", "low", "medium", or "high" to set the level. This has the same effect as the existing -i/--confidence option. If both options are specified, an error will be printed. * Help text for these parameters clarifies why 'all' and 'low' aren't the same although they will almost certainly produce the same set of results.
3c4b378
to
b3cff1a
Compare
Adds two new command line arguments which allow the user to specify severity level and confidence level with a key-value pair rather than repeating a flag. This makes it easier to specify those values if using an alternate interface which invokes Bandit's CLI. The previous repeatable flags have been retained and existing workflows will not be affected. New arguments: * --severity-level: Takes a string "all", "low", "medium", or "high" to set the level. This has the same effect as the existing -l/--level option. If both options are specified, an error will be printed. * --confidence-level: Takes a string "all", "low", "medium", or "high" to set the level. This has the same effect as the existing -i/--confidence option. If both options are specified, an error will be printed. * Help text for these parameters clarifies why 'all' and 'low' aren't the same although they will almost certainly produce the same set of results. Co-authored-by: Nathan Stocking <nathan.stocking@microsoft.com>
Adds two new command line arguments which allow the user to specify
severity level and confidence level with a key-value pair rather than
repeating a flag. This makes it easier to specify those values if using
an alternate interface which invokes Bandit's CLI. The previous
repeatable flags have been retained and existing workflows will not be
affected.
New arguments:
--severity-level: Takes an integer from 1 to 4 to set the level (1
for undefined, 2 for low, 3 for medium, 4 for high). This has the same
effect as the existing -l/--level option. If both options are specified,
an error will be printed.
--confidence-level: Takes an integer from 1 to 4 to set the level (1
for undefined, 2 for low, 3 for medium, 4 for high). This has the same
effect as the existing -i/--confidence option. If both options are
specified, an error will be printed.