-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.27 KB
/
Copy pathsecurity.yml
File metadata and controls
55 lines (45 loc) · 1.27 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
name: Security
on:
push:
branches: [main]
pull_request:
schedule:
# Weekly, so newly disclosed advisories surface without a code change.
- cron: "17 6 * * 1"
workflow_dispatch:
permissions:
contents: read
jobs:
audit:
name: Dependency audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Install Poetry
run: pipx install poetry==2.2.1
- name: Export the resolved runtime dependency set
run: |
poetry self add poetry-plugin-export
poetry export --without-hashes --format=requirements.txt --output=requirements.txt
- name: Audit dependencies for known vulnerabilities
run: |
python -m pip install --upgrade pip-audit
pip-audit --requirement requirements.txt --strict
codeql:
name: CodeQL analysis
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
steps:
- uses: actions/checkout@v7
- uses: github/codeql-action/init@v3
with:
languages: python
queries: security-and-quality
- uses: github/codeql-action/analyze@v3
with:
category: "/language:python"