-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (44 loc) · 1.24 KB
/
Copy pathsecurity.yml
File metadata and controls
56 lines (44 loc) · 1.24 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
name: Security Scan
on:
schedule:
- cron: '0 8 * * 1' # Weekly on Monday at 08:00 UTC
push:
branches: [main, develop]
paths:
- 'pyproject.toml'
- 'src/**'
workflow_dispatch: # Allow manual trigger
permissions:
contents: read
security-events: write # For SARIF upload if added later
jobs:
audit:
name: pip-audit (dependency CVEs)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
- name: Install package and dev dependencies
run: pip install ".[dev]"
- name: Run pip-audit
run: |
pip freeze | awk '!/^python-yarbo(==| @ |$)/' > requirements-audit.txt
pip-audit -r requirements-audit.txt --strict
bandit:
name: bandit (static analysis)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: pip
- name: Install bandit
run: pip install "bandit[toml]"
- name: Run bandit
run: bandit -r src/yarbo/ -c pyproject.toml -ll