Repository navigation
Conversation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
There was a problem hiding this comment.
Pull request overview
Adds a missing GitHub CodeQL workflow so the repository’s main branch ruleset requirement (code_scanning with alerts_threshold: errors) can evaluate and unblock PR merges. The workflow runs CodeQL for both the Rust workspace (manual cargo build --workspace) and JavaScript/TypeScript (source-only extraction), on PRs, pushes to main/v3, and a weekly schedule.
Changes:
- Introduces
.github/workflows/codeql.ymlto run CodeQL analysis forrustandjavascript-typescript. - Configures triggers for
pull_request,push(main/v3), and weekly cron runs. - Uses least-privilege permissions and the
security-and-qualityquery pack, with manual Rust build integration.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| with: | ||
| components: rustfmt, clippy |
The `main` branch ruleset has a `code_scanning` requirement (CodeQL, `alerts_threshold: errors`) but no CodeQL workflow existed, so every PR to main was blocked indefinitely — the rule can't pass without a scan to evaluate. This adds the missing workflow. Coverage - `rust`: extracts the workspace via `cargo build --workspace`. Uses the same stable Rust + Go toolchain as `ci.yml`'s rust job so cuengine's Go FFI build keeps working under CodeQL's extractor. - `javascript-typescript`: source-only extraction, no build. Covers .ts, .tsx, .js, and `<script>` blocks inside .vue files (the JS/TS extractor reads Vue SFCs natively). Query pack: `security-and-quality`. The ruleset only blocks on `errors`, so quality-pack warnings/notices surface in the Security tab without gating PR merges. Triggers: pull_request + push to main/v3 (so the ruleset auto-merge clears immediately after a green run) and a weekly cron (so newly- published queries flag regressions on existing code without a push). Permissions: least-privilege — `security-events: write` for findings upload, `actions: read`/`contents: read` for the extractor. No `run:` step consumes untrusted external input.
The `main` branch ruleset requires CodeQL (`alerts_threshold: errors`) but no CodeQL workflow exists. Every PR targeting `main` is blocked indefinitely because the rule cannot evaluate without a scan. This adds the missing workflow so v3 → main (PR #1) and future merges can clear.
Coverage
Query pack: `security-and-quality`. Ruleset only blocks on `errors`, so quality-pack `warning`/`notice` items surface in the Security tab without gating merges.
Triggers
Permissions
Least-privilege: `security-events: write` for findings upload, `actions: read`/`contents: read` for the extractor. No `run:` step consumes untrusted external input.
What clears after this lands
PR #1 (v3 → main) has `autoMergeRequest` armed for squash; once a CodeQL run posts a passing analysis on v3, the ruleset's `code_scanning` requirement clears and the queue picks up the merge.
If the first scan returns actual `error`-level findings, I'll fix them in a follow-up before #1 can land — but the expectation on a Rust + TS codebase this shape is a clean scan or only `warning`/`notice` items.