Skip to content

Commit a8b94bd

Browse files
authored
ci: add advanced CodeQL workflow (replaces default setup) (#128)
## Summary - GitHub default setup for code scanning (analyzing `actions`, `javascript-typescript`, `rust` with the `default` query suite, `remote_and_local` threat model, weekly schedule) was disabled today (2026-07-20). - The main branch ruleset has a `code_scanning` rule requiring CodeQL results (alerts_threshold: errors, security_alerts_threshold: high_or_higher), so a committed advanced workflow is needed to keep that gate satisfied on PRs. - Adds `.github/workflows/codeql.yml`: a matrix job over `actions`, `javascript-typescript`, `rust` (all `build-mode: none`), triggered on push to main, pull requests into main, and a weekly Monday 09:30 UTC schedule. - `threat-models: [remote, local]` is set via the `init` step's `config` input to match the prior default-setup threat model. - Analysis `category` stays in the `/language:<lang>` form so the 11 previously-dismissed Rust test-code false positives continue to match and their dismissals carry over. ## Test plan - [x] `actionlint .github/workflows/codeql.yml` passes clean - [x] File uses LF line endings (verified via `git ls-files --eol`), no em-dashes - [ ] Confirm the `code_scanning` ruleset check is satisfied once this workflow runs on the PR - [ ] Confirm the 11 previously-dismissed Rust alerts remain dismissed after the first advanced-workflow analysis Generated with Claude Code https://claude.ai/code/session_01QZQVP2tUuTLh8oL31D8heC
1 parent b938756 commit a8b94bd

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
# Weekly, Monday 09:30 UTC - a quiet time with no other scheduled workflow.
10+
- cron: "30 9 * * 1"
11+
12+
permissions:
13+
security-events: write
14+
packages: read
15+
actions: read
16+
contents: read
17+
18+
jobs:
19+
analyze:
20+
name: Analyze (${{ matrix.language }})
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 360
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
include:
27+
- language: actions
28+
build-mode: none
29+
- language: javascript-typescript
30+
build-mode: none
31+
- language: rust
32+
build-mode: none
33+
34+
steps:
35+
- uses: actions/checkout@v7
36+
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@v4
39+
with:
40+
languages: ${{ matrix.language }}
41+
build-mode: ${{ matrix.build-mode }}
42+
# Match the prior default-setup threat model (remote_and_local).
43+
config: |
44+
threat-models:
45+
- remote
46+
- local
47+
48+
- name: Perform CodeQL Analysis
49+
uses: github/codeql-action/analyze@v4
50+
with:
51+
category: "/language:${{ matrix.language }}"

0 commit comments

Comments
 (0)