-
Notifications
You must be signed in to change notification settings - Fork 2.5k
52 lines (43 loc) · 1.15 KB
/
bandit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: "Bandit"
on:
workflow_call:
inputs:
head_sha:
required: true
type: string
env:
BANDIT_VERSION: 1.7.8
PROJECT_PATH: 'label_studio/'
REPORT_PATH: 'bandit_results/bandit_security_report.txt'
ACTIONS_STEP_DEBUG: '${{ secrets.ACTIONS_STEP_DEBUG }}'
jobs:
bandit:
name: "Bandit"
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: hmarr/[email protected]
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.head_sha }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Bandit
run: |
pip install bandit==$BANDIT_VERSION
- name: Run Bandit
run: |
mkdir -p bandit_results
touch ${{ env.REPORT_PATH }}
bandit -r $PROJECT_PATH -o ${{ env.REPORT_PATH }} -f 'txt' -ll
- name: Print scan results
if: always()
run: cat ${{ env.REPORT_PATH }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: Security check results
path: ${{ env.REPORT_PATH }}