You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit completes work that was discussed during the OSSG mid-cycle.
Summarizing the major changes:
- Result 'severity' has been moved from INFO/WARN/ERROR to a LOW/MEDIUM/HIGH
scale. This, as previously, is intended to indicate the risk associated with
the issue being reported.
- Result 'confidence' has been introduced, also with a LOW/MEDIUM/HIGH scale.
This is intended to allow a plugin writer to indicate their level of confidence
that the issue raised is truly a security problem.
- A Bandit plugin may now return a result as a 2-tuple (issue_severity,
issue_text) or - optionally - a 3-tuple (issue_severity, issue_confidence,
issue_text). Confidence will default to UNDEFINED if the plugin does not
return a value.
The commit includes updates across Bandit and plugins to utilize the new scales,
and updates to the associated functional test suite to maintain test coverage.
Additionally, this commit:
- Modifies the labels on fields included in JSON and CSV output formats to
align with Bandit-internal terminology (likely a breaking change for consumers
of these formats).
- Removes color output codes from Bandit configuration when not running in a
TTY, as they are not likely to be supported.
- Adds severity and confidence to the standard Bandit output for each issue.
- Adds a few more debug statements and includes a traceback when a plugin
fails, to aid in developing plugins.
- Cleans up the command line arguments used with argparse a little.
- Fixes PEP8 niggles.
It does not implement filtering by confidence, that will be a future todo.
Change-Id: Ia0f76b96d1e756ce605ce6b0b29eee8bd2830574
0 commit comments