Skip to content

Commit a6d8dc8

Browse files
authored
chore(ci): add bandit sast scanning
1 parent 8d6c082 commit a6d8dc8

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/docker-image.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,30 @@ jobs:
4242
body: ${{ steps.changelog.outputs.clean_changelog }}
4343
token: ${{ secrets.GITHUB_TOKEN }}
4444

45+
bandit:
46+
name: SAST with Bandit
47+
needs: changelog
48+
if: github.event_name != 'pull_request' && needs.changelog.outputs.skipped == 'false'
49+
runs-on: ubuntu-latest
50+
51+
steps:
52+
- name: Checkout code
53+
uses: actions/checkout@v4
54+
55+
- name: Set up Python
56+
uses: actions/setup-python@v4
57+
with:
58+
python-version: '3.x'
59+
60+
- name: Install Bandit
61+
run: pip install bandit
62+
63+
- name: Run Bandit
64+
run: bandit -r linkedindumper.py --severity-level medium
65+
4566
deploy:
4667
name: Deploy Image
47-
needs: changelog
68+
needs: [changelog, bandit]
4869
if: github.event_name != 'pull_request' && needs.changelog.outputs.skipped == 'false'
4970
runs-on: ubuntu-latest
5071

@@ -91,7 +112,7 @@ jobs:
91112

92113
release:
93114
name: Release
94-
needs: changelog
115+
needs: [changelog, bandit]
95116
if: github.event_name != 'pull_request' && needs.changelog.outputs.skipped == 'false'
96117
runs-on: ubuntu-latest
97118

0 commit comments

Comments
 (0)