Skip to content

Commit cc18fe9

Browse files
fix: convert .bandit config from INI to YAML format
Bandit 1.9.4 expects YAML config but .bandit used legacy INI format, causing a parse error (exit code 2) that failed the CI job. Convert to valid YAML and add -ll flag for high-confidence filtering.
1 parent e15df5f commit cc18fe9

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

.bandit

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
# Bandit configuration
22
# https://bandit.readthedocs.io/en/latest/config.html
33

4-
[bandit]
5-
# Only scan the Python source code
6-
targets = scripts/aidlc-evaluator
7-
84
# Exclude test directories (test code often has intentional patterns
95
# that trigger false positives like assert, subprocess in fixtures)
10-
exclude = */tests/*
11-
12-
# Skip low and medium-confidence findings to reduce noise
13-
confidence-level = high
6+
exclude_dirs:
7+
- "*/tests/*"

.github/workflows/security-scanners.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ jobs:
223223
pip install -r requirements.txt
224224
rm requirements.txt
225225
set +e
226-
bandit -c .bandit -r scripts/aidlc-evaluator -f sarif -o bandit-report_sarif.json
226+
bandit -c .bandit -r scripts/aidlc-evaluator -ll -f sarif -o bandit-report_sarif.json
227227
BANDIT_EXIT=$?
228228
set -e
229229
echo "exit_code=$BANDIT_EXIT" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)