ci(security): add CodeQL code scanning for JS/TS - #6158
Merged
Conversation
Adds a CodeQL workflow alongside the existing gitleaks SAST job, scoped to the javascript-typescript extractor — one build-free pass over the whole apps/ + packages/ TypeScript surface. Runs on PRs, pushes to main, and weekly on a schedule so newly published queries get applied to already-merged code. Go, Python, and Rust are out of scope for now; the job carries a comment saying why for each. The shared config keeps the default (low-noise) query suite for this first rollout and drops vendored source and build output. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
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. |
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.
Adds CodeQL static analysis to CI. The repo has a
sast.ymltoday, but it onlyruns gitleaks (secret scanning) — there is no static analysis of the code
itself. This adds it.
Scoped to
javascript-typescripton purpose: one extractor covers.js/.jsx/.ts/.tsxand needs no build, so a single build-free pass covers thewhole
apps/+packages/TypeScript surface (~3.3k files).What's here
.github/workflows/codeql.yml— oneanalyzejob: checkout → init → analyze..github/codeql/codeql-config.yml— query suite and path exclusions.Triggers follow
test.yml: PRs tomain, pushes tomain, plus a weekly cron.The cron matters more than it looks — CodeQL ships new queries continuously, and
a scheduled run against the default branch is what applies them to code that
already merged.
Concurrency cancels superseded PR runs only; pushes to
maineach keep their ownalert set. Permissions are
contents: readat the workflow level, withsecurity-events: writeandpackages: readscoped to the job. Actions arepinned to full commit SHAs with version comments, matching the convention
sast.ymldocuments.Notes for review
rollout so the initial alert list stays actionable.
security-extendedis inthe config, commented, ready to switch on once the baseline is triaged.
first run's real duration and tightening it.
test.ymlgates jobs through a
changesjob to avoid that; I kept this always-on sinceit's a security scan, but it's an easy change if the CI minutes bother you.
main. Triage is separatefrom this PR — nothing here blocks a merge on findings.
Summary by cubic
Adds CodeQL code scanning for JS/TS to CI to surface security issues early. CI previously only ran gitleaks; this adds a build-free
javascript-typescriptanalysis on PRs, pushes tomain, and a weekly scan.security-extendedis prepped but commented out.node_modulesis auto-excluded by the extractor.mainplus a weekly cron; PR runs cancel on updates, pushes keep separate alert sets.main; no developer action required to adopt.Written for commit d09c73d. Summary will update on new commits.