-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (69 loc) · 1.7 KB
/
security.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Security Scanning
on:
push:
branches: ['**']
pull_request:
branches: [ "master" ]
jobs:
bandit_scan:
name: Bandit Security Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install dependencies
uses: actions/checkout@v3
- working-directory: ./backend
run: |
python -m pip install --upgrade pip
pip3 install poetry
poetry config virtualenvs.create false
poetry shell
poetry install
- name: Run security scan
uses: actions/checkout@v3
- working-directory: ./backend
run: |
bandit -r .
- name: Upload report
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: bandit-report
path: output/bandit-report.txt
truffle_scan:
name: Truffle Key Scanner
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name:
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD
pip_audit:
name: Pip Audit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- working-directory: ./backend
run: |
python -m pip install --upgrade pip
pip3 install poetry
poetry config virtualenvs.create false
poetry shell
poetry install
- name: Run pip-audit
uses: actions/checkout@v3
- working-directory: ./backend
run: |
pip-audit