Skip to content

ci: run CodeQL weekly and on release tags, not on every worker edit - #597

Merged
unohee merged 1 commit into
mainfrom
fix/codeql-at-release-not-per-edit
Sep 10, 2026
Merged

unohee merged 1 commit into
mainfrom
fix/codeql-at-release-not-per-edit

Conversation

@unohee

@unohee unohee commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Why

#589 (AGT-4160) removed CodeQL from the autonomous pipeline. That was correct — a whole-database scan per worker edit costs up to 20 minutes per language and parked runs as security-audit-infra, so pull requests stopped coming out. A security control paid for with the throughput of the thing it protects is not a good trade.

But it left the analysis running nowhere. I checked before merging:

  • .github/ contains no codeql-action/init or analyze step. review-gate.yml uses codeql-action/upload-sarif, which is the ingestion endpoint for any SARIF — it publishes openswarm review's findings, it does not scan.
  • The only codeql database invocation in the tree is src/verify/securityAudit.ts, reached from pairPipeline.ts:178 behind securityAudit?.enabled — now defaulting to false.

So after #589 this repository is analysed by nothing.

What this adds

CodeQL on a weekly schedule, on v* tags, and on demand — the points where 20 minutes is affordable and a finding is still actionable before it reaches users. Not per edit, and not never.

security-extended rather than the default suite: the default is tuned to keep false positives near zero on any repository, and this one is an agent runtime that spawns processes and writes files under a model's instructions.

The cron is 17 4 * * 1 rather than 0 4 — every repository that asks for "weekly" lands on :00, and the shared runner pool feels it.

The pattern

A capability that quietly stops running is the failure this repository spent today removing from three other gates: a CI install that silently skipped (#588), a reviewer that saw 22% of publications (#592), and a deleted-test check that returned "nothing found" when it could not compare (#592). Turning CodeQL off without putting it anywhere would have been the fourth.

🤖 Generated with Claude Code

AGT-4160 (#589) took CodeQL out of the autonomous pipeline and was right to.
A whole-database scan per worker edit costs up to 20 minutes per language and
parked runs as `security-audit-infra`, so pull requests stopped coming out —
a security control paid for with the throughput of the thing it protects.

What it left behind was nothing. `review-gate.yml` only *uploads* SARIF from
`openswarm review` — `codeql-action/upload-sarif` is the ingestion endpoint,
not the scanner — and the only `codeql database` invocation in the tree sits
behind `securityAudit.enabled` in `pairPipeline.ts`, which now defaults off.
After that merge this repository was analysed by nothing.

A capability that quietly stops running is precisely the failure this
repository spent today removing from three other gates: a CI install that
silently skipped, a reviewer that saw 22% of publications, a deleted-test
check that returned "nothing found" when it could not compare.

Weekly, on `v*` tags, and on demand. Those are the points where 20 minutes is
affordable and a finding is still actionable before it reaches users.
`security-extended` rather than the default suite, because the default is
tuned for near-zero false positives on any repository and this one is an agent
runtime that spawns processes and writes files under a model's instructions.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@unohee
unohee merged commit 1a47dbc into main Sep 10, 2026
7 checks passed
@unohee
unohee deleted the fix/codeql-at-release-not-per-edit branch September 10, 2026 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant