Repository navigation
feat(digest): survey CodeQL default setup in the daily digest - #216
Merged
Merged
Conversation
standards.sh already walks every non-archived repo once per owner. It now also reads code-scanning/default-setup for each one and records a codeql object: configured, not-configured (the finding), no-code-security, exempt with a class, or unreadable. render.sh adds a "CodeQL" section in the same style as "Branch protection": exempt classes counted with their reason, not-configured and unreadable repos in a table, and a plain "could not be verified" statement when every read failed. no-code-security is a private repo whose 403 body says Code Security or Advanced Security must be enabled. It is not exempt: those repos are listed by name under their own heading, because buying Code Security is an open cost decision. The state needs that exact body message on a repo the listing says is private. Any other 403, including "Resource not accessible by integration", is unreadable. The message is matched on the response body, because stderr can carry unrelated text before gh's line. Exempt classes: forks, and not-configured with no detected languages. The endpoint needs Administration: read, so all three token mints now request it. GitHub rejects a token request for a permission the installation has not granted (not observed here), so the grant must be in place before this runs. Fixtures: dev-env (configured), nightowlstudiollc/cleanroom and smartwatermelon/claude-config-backup (403s) are real 2026-10-21 captures; the rest are a real body with one field changed. Advances #166
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.
Do not merge until Administration: Read is granted on all three dependabot-digest-swm installations; the token mint requests it.
GitHub rejects an installation-token request for a permission the installation has not granted, so merging early would fail the mint step and with it the whole digest, not just the new section. I did not observe that failure here; it is GitHub's documented behavior.
What it does
Adds a "CodeQL" section to the daily Dependabot digest, the recurring check recommended in #166.
standards.shalready walks every non-archived repo once per owner; the same loop now readsGET repos/{o}/{r}/code-scanning/default-setupand records acodeqlobject per repo:configured.state == "configured"not-configuredno-code-securityexemptfork, orno-supported-language(not configured, emptylanguages)unreadable.state, malformed JSON, no fork flag when one is neededA permission 403 can never become
no-code-security. That state requires the exact paid-product message in the response body,(HTTP 403)from gh, andprivate == truefrom the installation listing. The match uses the body, not stderr, because locally stderr carried an unrelatedrealpath: environmentprefix whenBASH_ENVwas unset. That noise predates this change and hits the protection probe too.If every read is unreadable, the section says CodeQL setup could not be verified and names the likely cause (no
Administration: Read). It does not report a clean result.The open cost question
This PR advances #166; it does not close it. Whether to buy GitHub Code Security for nightowlstudiollc stays open on #166 for Andrew. Until then, those private repos appear by name in every digest under "Scanning off: paid Code Security not bought", with the cost decision called out as open. They are not exempt and not hidden.
Other changes
permission-administration: readon all threecreate-github-app-tokensteps..protectionis replaced. That sentence is now: verified by run 39661428846 (40 surveyed, 38 required, 2 exempt, 0 unreadable). That run result came from the coordinator; I did not re-check it.scripts/dependabot-digest/line mentions CodeQL default setup..prettierignore: one deliberately truncated JSON fixture, which prettier cannot parse.Fixtures
smartwatermelon/dev-env(configured, actions),nightowlstudiollc/cleanroom(403 "Code Security must be enabled"),smartwatermelon/claude-config-backup(403 "Advanced Security must be enabled"). Prettier reformatted them; content is unchanged.[]; configured with[]; unknown stateenabled; integration-permission 403 on a private repo; paid-product 403 on a public repo and on a repo with no private flag; truncated JSON.nightowlstudiollc/jordan-paddock-pitchnow readsconfigured(actions). The Sweep all repos in all orgs to confirm CodeQL is enabled #166 table row saying it has no supported language is out of date.Each new assertion was checked against a deliberate break: 18 mutations, each one caught by at least one assertion.
Not verified