-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (66 loc) · 2.05 KB
/
Copy pathsecurity.yml
File metadata and controls
83 lines (66 loc) · 2.05 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Security
on:
pull_request:
branches: [master]
schedule:
- cron: '0 6 * * 1' # Monday 06:00 UTC
workflow_dispatch: {}
concurrency:
group: security-${{ github.ref }}
cancel-in-progress: true
jobs:
pip-audit:
name: pip-audit (Python deps)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: pip-audit
uses: pypa/gh-action-pip-audit@v1.1.0
with:
inputs: requirements.txt
vulnerability-service: osv
# No ignored CVEs at present. Mirror entries here and in
# .pip-audit-ignore when a CVE is intentionally deferred.
npm-audit:
name: npm audit (Node prod deps)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
- name: npm ci (no scripts)
run: npm ci --ignore-scripts
- name: npm audit
run: npm audit --audit-level=high --omit=dev
bandit:
name: bandit (Python source)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install bandit
run: pip install bandit==1.7.10
- name: bandit -r account blog personal mysite
run: bandit -r account blog personal mysite -ll
detect-secrets:
name: detect-secrets (CI mirror of pre-commit)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install detect-secrets
run: pip install detect-secrets==1.5.0
- name: Scan tracked files against baseline
run: |
# detect-secrets-hook returns non-zero if any new secret is found.
# The baseline is .secrets.baseline (already in repo, used by pre-commit).
git ls-files | xargs detect-secrets-hook --baseline .secrets.baseline