Skip to content

Commit 2ab7f48

Browse files
authored
chore(ci): run bandit independently
1 parent 2b4f6b1 commit 2ab7f48

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/docker-image.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,8 @@ jobs:
4545

4646
bandit:
4747
name: SAST with Bandit
48-
needs: changelog
49-
if: github.event_name != 'pull_request' && needs.changelog.outputs.skipped == 'false'
5048
runs-on: ubuntu-latest
51-
49+
5250
steps:
5351
- name: Checkout code
5452
uses: actions/checkout@v4
@@ -62,7 +60,16 @@ jobs:
6260
run: pip install bandit
6361

6462
- name: Run Bandit
65-
run: bandit -r xingdumper.py --severity-level medium
63+
id: bandit
64+
run: |
65+
bandit -r xingdumper.py --severity-level medium -f html -o bandit_report.html
66+
67+
- name: Upload Bandit report
68+
if: failure()
69+
uses: actions/upload-artifact@v3
70+
with:
71+
name: bandit-report
72+
path: bandit_report.html
6673

6774
deploy:
6875
name: Deploy Image

0 commit comments

Comments
 (0)