File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This is the name of the workflow, it appears in the GitHub Actions tab
2
+ name : Security Checks
3
+
4
+ # The name for workflow runs generated from this workflow
5
+ run-name : Security Check on ${{ github.ref }} by @${{ github.actor }}
6
+
7
+ # This specifies the events that will trigger the workflow to run
8
+ on : [push, pull_request]
9
+
10
+ jobs :
11
+ setup :
12
+ uses : ./.github/workflows/setup_environment.yml
13
+ with :
14
+ python-version : ' 3.12'
15
+
16
+ # This job runs Bandit for security checks
17
+ bandit :
18
+ needs : setup
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - name : Checkout code
22
+ uses : actions/checkout@v4
23
+
24
+ - name : Install Bandit
25
+ run : pip install bandit
26
+
27
+ - name : Run Bandit
28
+ run : bandit -r . --exclude ./tests/
29
+
30
+ # This job runs Safety for security checks
31
+ safety :
32
+ needs : setup
33
+ runs-on : ubuntu-latest
34
+ steps :
35
+ - name : Checkout code
36
+ uses : actions/checkout@v4
37
+
38
+ - name : Install Poetry
39
+ run : |
40
+ curl -sSL https://install.python-poetry.org | python3 -
41
+
42
+ - name : Generate requirements.txt from Poetry
43
+ run : |
44
+ poetry export -f requirements.txt --output requirements.txt --without-hashes
45
+
46
+ - name : Install Safety
47
+ run : pip install safety
48
+
49
+ - name : Run Safety
50
+ run : safety check -r requirements.txt
You can’t perform that action at this time.
0 commit comments