ci(security): add CodeQL static analysis - #63
Merged
Merged
Conversation
CodeQL ran in three of twelve fleet repos. This repo was not one of them, so
nothing read its source for injection, unsafe patterns or over-broad workflow
permissions -- cargo audit, cargo deny and OSV all read the dependency list
rather than the code.
Two jobs, matching the fleet form:
analyze-actions scans the workflow definitions themselves -- untrusted
input reaching a run block, permissions wider than needed,
unpinned references. Applies to any repo with workflows.
analyze-rust scans the crate source.
Copied from aletheia rather than from workflow/templates/ci/codeql.yml, which
is the stalest copy of this file in the fleet (kanon#3644). The template carries
no timeout-minutes on either job -- so a hung CodeQL run reaches GitHub's
six-hour default -- pins an older actions/checkout, and sets `permissions: {}`
where aletheia states an explicit default-deny with its reasoning attached.
Sourcing eight repos from the template would have planted those three
regressions everywhere at once.
Asserted before writing that every job carries a timeout, because that is the
specific thing the template is missing and the specific thing nobody notices
until a job has been running for six hours.
Free on a public repository, and scheduled weekly rather than per-PR so it adds
no latency to the merge path.
Gate-Passed: kanon 0.13.0 +stages:fmt,check,clippy,nextest,lint sha:a0863c73cab7a4320a7a15aff6dd882b68971fa5
forkwright
force-pushed
the
ci/add-codeql
branch
from
August 25, 2026 01:11
a51ec92 to
7b61895
Compare
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.
CodeQL ran in three of twelve fleet repos. This one was not among them, so nothing read its source for injection paths, unsafe patterns, or over-broad workflow permissions —
cargo audit,cargo denyand OSV all read the dependency list, not the code.What this adds
analyze-actionsrunblock, permissions wider than needed, unpinned referencesanalyze-rustScheduled weekly plus on push to
main, so it adds no latency to the merge path. Free on a public repository.Sourced from aletheia, not from the template
workflow/templates/ci/codeql.ymlis the stalest copy of this file in the fleet (kanon#3644). It differs from aletheia's live version in three ways, all regressions:timeout-minuteson either job. A hung CodeQL run reaches GitHub's six-hour default.actions/checkoutpin — v6 where aletheia is on v7.0.1.permissions: {}where aletheia states an explicitcontents: readdefault-deny with the reasoning attached.Copying the template into eight repos would have planted those three regressions everywhere at once. The rollout script asserts every job carries a
timeout-minutesbefore writing — that being the specific thing the template lacks, and the specific thing nobody notices until a job has been running six hours.Part of a fleet-wide pass
Eight public repos are getting this.
typikonanddioptrontakeanalyze-actionsalone — they carry no Cargo manifest, so a Rust scan would analyse nothing and fail looking for a build.gnomonis skipped: it is private and its Actions minutes are exhausted (kanon#3638), so it would gain nothing today.