ci(security): add CodeQL static analysis workflow - #436
Merged
mikewheeleer merged 1 commit intoJul 26, 2026
Merged
Conversation
Contributor
|
nice one — thanks for picking it up 🙌 |
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.
closes #350
Summary
javascript-typescriptCodeQL pack for the TypeScript source tree (src/), including the 2251-line routing engine atsrc/index.ts.push/pull_requesttomain(path-scoped tosrc/**and CodeQL config files) plus a weekly Monday 04:37 UTC scheduled scan for dormant issues..github/codeql/codeql-config.yml: includessrc/, excludessrc/**/__tests__/**,**/node_modules/**,**/dist/**, and**/coverage/**.queries: security-and-qualitycovering injection, XSS, prototype pollution, hardcoded secrets, unsafe deserialization, and clear-text logging rules against the compiled TypeScript via the CodeQL autobuild step.security-events: writepermission) and additionally archived as a 30-day retention artifact for offline triage.src/__tests__/ciWorkflow.test.ts, 28 passing tests) validating triggers, matrix, permissions, step ordering, path filters, scoping rules, cron format, and ci.yml non-regression.js-yaml@5.2.2+@types/js-yaml@4.0.9as devDependencies for YAML parsing in the workflow tests.docs/CI.mdwith a full CodeQL section covering: trigger conditions, scope, permissions, triage workflow (true-positive/false-positive/won't-fix classification and UI dismissal reasons), comment suppression patterns, 30-day open-alert SLA, local CodeQL CLI reproduction commands, and a common JS/TS rule/CWE reference table.Related Issue
Closes #350
Validation
npm run buildnpm run lintnpm testChecklist
.envfiles, or private credentials.Security Notes
analyzejob uses the minimum required GitHub token permissions:security-events: write(to post SARIF),actions: read,contents: read. No broaderreposcope is requested.src/production code is analyzed; tests, build output, coverage, and third-partynode_modulesare explicitly excluded from the CodeQL database to avoid noisy/irrelevant findings on vendored code.security-and-qualityqueries (both defaultjavascript-queriesand experimental extended taint/data-flow rules). Experimental findings may have a slightly higher false-positive rate; the triage guide indocs/CI.mddocuments the UI dismissal flow + required justification comments to prevent blind suppressions.// codeql[...]) are explicitly documented as a secondary option behind UI dismissal and require security-team sign-off. No suppressions were added in this PR.js-yamltypes + parser).37 4 * * 1, off-peak Monday UTC) detects supply-chain regressions in dependencies or dormant patterns even when no push/PR activity occurs.