fix: add error handling to Bandit security check commands

This commit is contained in:
Lorenzo Venerandi
2026-01-22 11:22:03 +01:00
parent dcfdb23b0c
commit 28a8880c0a

View File

@@ -30,8 +30,8 @@ jobs:
- name: Bandit security check
run: |
bandit -r src/ -f json -o bandit-report.json
bandit -r src/ -f txt
bandit -r src/ -f json -o bandit-report.json || true
bandit -r src/ -f txt || true
# Check for HIGH severity issues only
HIGH_COUNT=$(python3 -c "import json; data=json.load(open('bandit-report.json')); print(len([i for i in data['results'] if i['severity'] == 'HIGH']))")