Using --number with lines less than 3 will correctly trim output. For example:
bandit -r --number 1 glances/glances/
Issue: Try, Except, Pass detected.
Severity: Low Confidence: High
Location: glances/glances/plugins/glances_sensors.py:26
26 except ImportError:
Issue: Try, Except, Pass detected.
Severity: Low Confidence: High
Location: glances/glances/plugins/glances_uptime.py:76
76 except Exception:
However, using --number greater than 3 does not adjust the output. It still uses only 3 lines maximum.
bandit -r --number 10 glances/glances/
Issue: Try, Except, Pass detected.
Severity: Low Confidence: High
Location: glances/glances/plugins/glances_uptime.py:76
75 self.stats = str(timedelta(seconds=int(uptime) / 100))
76 except Exception:
77 pass
Using --number with lines less than 3 will correctly trim output. For example:
bandit -r --number 1 glances/glances/
However, using --number greater than 3 does not adjust the output. It still uses only 3 lines maximum.
bandit -r --number 10 glances/glances/