-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (62 loc) · 1.58 KB
/
security.yml
File metadata and controls
69 lines (62 loc) · 1.58 KB
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
name: Security
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 4 * * 1"
permissions:
contents: read
security-events: write
jobs:
bandit:
name: Bandit (SAST)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: pip install bandit
- run: bandit -r src/ -f screen -ll
semgrep:
name: Semgrep (OWASP rulesets)
runs-on: ubuntu-latest
container:
image: semgrep/semgrep
steps:
- uses: actions/checkout@v4
- run: semgrep --config=p/python --config=p/security-audit --config=p/owasp-top-ten --error --severity ERROR --severity WARNING src/
pip-audit:
name: pip-audit (dependency CVEs)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: pip install pip-audit
- run: pip-audit --strict
gitleaks:
name: Gitleaks (secrets)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
codeql:
name: CodeQL (semantic SAST)
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v3
with:
languages: python
queries: security-extended,security-and-quality
- uses: github/codeql-action/analyze@v3