forked from MudwoodLabs/pyrxd
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.95 KB
/
Copy pathcodeql.yml
File metadata and controls
53 lines (46 loc) · 1.95 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
name: CodeQL
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Weekly re-scan, Mondays 06:00 UTC. Catches CVEs that land in
# CodeQL's queries after our last code change.
- cron: "0 6 * * 1"
# Cancel old runs when a new push lands on the same branch/PR. See ci.yml.
# Scheduled runs use refs/heads/main as their ref; they don't normally
# overlap with push/PR events so concurrency cancellation is safe.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
analyze:
name: Analyze (Python)
runs-on: ubuntu-latest
permissions:
security-events: write
packages: read
timeout-minutes: 360
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Initialize CodeQL
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
languages: python
# security-extended (NOT security-and-quality): the full security ruleset
# WITHOUT the code-quality queries. ruff (B/SIM/F families), mypy and bandit
# already own the quality/style space and run in `task ci` + the pre-push hook,
# so the quality queries are redundant — they only re-surface, POST-merge, the
# residue ruff can't model (idiomatic `...` Protocol stubs, pytest.raises,
# deliberately `# noqa`'d code) as recurring false-positive noise. Keep security
# coverage here; catch quality issues pre-merge where they belong.
queries: security-extended
# Excludes non-shipped spike/demo dirs from scanning (see config).
config-file: ./.github/codeql/codeql-config.yml
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
with:
category: "/language:python"