ci: restore CodeQL code scanning workflow#265
Merged
Conversation
The GitHub-managed default code scanning setup was turned off (default-setup = not-configured), so no analysis runs to re-evaluate alerts. The 13 open 'actions/missing-workflow-permissions' alerts were already fixed by #211 but stay open with nothing to close them. Add an advanced-setup CodeQL workflow (actions + javascript-typescript) so a run on main re-scans the now-hardened workflows and auto-closes the stale alerts. The workflow itself follows least privilege: top-level permissions {} plus narrow per-job grants.
Contributor
There was a problem hiding this comment.
Pull request overview
Restores GitHub Code Scanning by adding an “advanced setup” CodeQL workflow so the repository’s workflow-permission alerts can be re-evaluated and auto-closed after a fresh scan on main.
Changes:
- Adds
.github/workflows/codeql.ymlto run CodeQL onpush/pull_requesttomainplus a weekly schedule. - Configures CodeQL to analyze
actionsandjavascript-typescriptwith least-privilege permissions and concurrency control.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+23
to
+25
| analyze: | ||
| name: Analyze (${{ matrix.language }}) | ||
| runs-on: ubuntu-latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The 13 open code-scanning alerts (
actions/missing-workflow-permissions) are stale. Their root cause — workflows not declaring least-privilegeGITHUB_TOKENpermissions — was already fixed in #211; every workflow now sets explicit permissions.They remain open only because GitHub's default code-scanning setup was turned off (
default-setup = not-configured), so no analysis has run since 2025-12-31 to re-evaluate and close them.What
Add an advanced-setup CodeQL workflow scanning
actions+javascript-typescript. Once merged, a run onmainre-scans the now-hardened workflows, finds 0actionsresults, and GitHub auto-closes all 13 stale alerts.permissions: {}plus narrow per-job grants, so it introduces no new alerts.rustis intentionally omitted to keep CI light (it needs a full project build); it can be added later if wanted.mainscan