chore(ci): move CodeQL to a checked-in advanced-setup workflow - #209
Merged
Conversation
Default-setup CodeQL writes its Java and Go dependency cache under a content-derived key that never repeats, so every analysis added a 250-300 MiB Actions cache entry and prune-actions-cache.yml ran hourly to keep the pnpm, Gradle and Trivy caches from being evicted. Nothing in the repository controlled that key. Replace default setup with codeql.yml, which mirrors the existing configuration (actions, go, java-kotlin, javascript-typescript; default suite; weekly schedule; code-scanning and code-quality analysis kinds) and leaves dependency-caching off. With no cache writes there is nothing to prune, so the prune workflow is removed. Default setup must be disabled once this merges; until then GitHub rejects CodeQL uploads from the workflow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016XRddumw4ZNvFqHSd9KSf6
The action rejects it in custom workflows. Code quality stays a separate default-setup toggle for the reviewer to decide on. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016XRddumw4ZNvFqHSd9KSf6
jdwillmsen
force-pushed
the
chore/JDWLABS-450-codeql-advanced
branch
from
August 29, 2026 04:56
27153ce to
dce16fc
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.
Why
prune-actions-cache.ymlexists only to clean up after default-setup CodeQL, which writes its Java/Go dependency cache under content-hash keys that never repeat. Advanced setup leavesdependency-cachingoff by default, so the bloat stops at the source and the prune workflow can go.Measured (2026-08-29)
codeql-*entries = 3.88 GiB (67%), individualcodeql-dependencies-1-Linux-java-*entries 252-303 MiB, three per open PR ref even with hourly pruning.state=configured, languages actions/go/java-kotlin/javascript-typescript, query suitedefault, threat modelremote, schedule weekly. A second dynamic workflow (github-code-quality/codeql, Code quality default setup) also runs and is left alone:codeql-actionrejects theanalysis-kindsinput in custom workflows (GitHub-internal), so code quality cannot be folded in here. It has 0 open findings; whether it keeps running is the reviewer's call (step 2b)./language:<name>, the same analysis origin default setup used.Open alert snapshot (pre-merge)
[{"number":58,"tool":"Trivy","rule":"DS-0026","severity":"low","state":"open","category":".github/workflows/security-scan.yml:scan","url":"https://github.com/jdwlabs/apps/security/code-scanning/58"},{"number":56,"tool":"Trivy","rule":"DS-0026","severity":"low","state":"open","category":".github/workflows/security-scan.yml:scan","url":"https://github.com/jdwlabs/apps/security/code-scanning/56"}]Post-merge manual steps (reviewer)
gh api "repos/jdwlabs/apps/code-scanning/alerts?state=open&per_page=100" --jq '[.[]|{number,tool:.tool.name,state}]'and compare with the JSON above.Analyze (*)checks stay red until this step is done):gh api -X PATCH repos/jdwlabs/apps/code-scanning/default-setup -f state=not-configured.2b. Decide on Code quality default setup (Settings > Code security > Code quality; no REST endpoint). It also runs a Java extractor, so if
codeql-dependencies-*entries keep appearing after step 3, that is where they come from and it should be switched off too.gh workflow run codeql.yml --repo jdwlabs/appsand confirm four greenAnalyze (...)jobs and that no newcodeql-dependencies-*cache entry appears:gh api "repos/jdwlabs/apps/actions/caches?key=codeql-dependencies-1-Linux-java" --jq .total_countshould stop growing.codeql-*entries (3.88 GiB) age out via GitHub's 7-day eviction; delete by hand if pnpm/Gradle evictions are seen before then.Pinned with the house full
vMAJOR.MINOR.PATCHtag convention (seedocs/ci-standards.mdin jdwlabs/.github) oncodeql-actionv4, since v3 is deprecated. Companion docs PR in jdwlabs/.github updates the workflow inventory and the code-scanning strategy.Refs JDWLABS-450.
🤖 Generated with Claude Code
https://claude.ai/code/session_016XRddumw4ZNvFqHSd9KSf6