Skip to content

Commit 26acd14

Browse files
authored
Update sdle-scans.yaml
1 parent 0d1f086 commit 26acd14

1 file changed

Lines changed: 27 additions & 18 deletions

File tree

.github/workflows/sdle-scans.yaml

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,32 @@ jobs:
5555
# 2) Bandit Scan
5656
# -----------------------------
5757
bandit_scan:
58-
name: Bandit Python Static Scan
58+
name: Bandit security scan
5959
runs-on: ubuntu-latest
6060
steps:
61-
- uses: actions/checkout@v4
62-
63-
- uses: actions/setup-python@v5
64-
with:
65-
python-version: "3.x"
66-
67-
- name: Install Bandit
68-
run: pip install bandit
69-
70-
- name: Run Bandit
71-
run: bandit -r . -f html -o bandit-report.html || true
72-
73-
- name: Upload Bandit Report
74-
uses: actions/upload-artifact@v4
75-
with:
76-
name: bandit-report
77-
path: bandit-report.html
61+
- name: Checkout
62+
uses: actions/checkout@v4
63+
with:
64+
submodules: 'recursive'
65+
fetch-depth: 0
66+
- uses: actions/setup-python@v5
67+
with:
68+
python-version: "3.x"
69+
- name: Install Bandit
70+
run: pip install bandit
71+
- name: Create Bandit configuration
72+
run: |
73+
cat > .bandit << 'EOF'
74+
[bandit]
75+
exclude_dirs = ['tests', 'test', 'venv', '.venv', 'node_modules']
76+
skips = ['B101', 'B601']
77+
EOF
78+
shell: bash
79+
- name: Run Bandit scan
80+
run: bandit -r . -f html -o bandit-report.html || true
81+
- name: Upload Bandit Report
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: bandit-report
85+
path: bandit-report.html
86+
retention-days: 30

0 commit comments

Comments
 (0)