Repository navigation
feat(digest): survey Dependabot security alerts in the daily digest - #220
Merged
Merged
Conversation
On 2026-10-21 alerts were off on 8 repos and nothing flagged it. The
survey now reads GET repos/{o}/{r}/vulnerability-alerts per repo and
renders a "Dependabot alerts" section after CodeQL.
- 204 is on. A 404 whose body message is exactly "Vulnerability alerts
are disabled." is off, and off is always a gap: no class is exempt.
- Everything else is unreadable with its reason: a 403, a bare
"Not Found" 404 (how GitHub hides what a token cannot see), the
disabled message on a non-404, or a body on success.
- An all-unreadable survey says nothing was verified and names
Administration: Read, as the CodeQL section does.
The endpoint needs administration=read (response header, both 204 and
404). The App already holds it for CodeQL, so no grant changes. The
workflow comments and runbook now say the grant serves both.
Tests: on, off and unreadable cases, including known-bad 404 and 403
shapes. The stub now echoes a 404 body's message as real gh does, and
section slices end at the next section instead of at "---".
This was referenced Oct 22, 2026
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.
What
The daily digest now reports, per repo, whether Dependabot security alerts are on. A new "Dependabot alerts" section follows CodeQL and uses the same layout: a count line, a table of gaps and unreadable repos, "No gaps" only when there are none, and an explicit message when every read failed.
On 2026-10-21, alerts turned out to be off on 8 repos (7 NOS repos plus smartwatermelon/vpn-lan-bridge), and nothing flagged it.
How each state is decided
GET repos/{owner}/{repo}/vulnerability-alerts, per non-archived repo:Vulnerability alerts are disabled.Not Found404, the disabled message on a non-404, a body on successA bare 404 is how GitHub hides a resource the token cannot see, so it never counts as off. Unreadable never counts as on or off. If every read fails, the section says nothing was verified and names
Administration: Readas the likely cause.There is no exempt class. Off is a gap on every repo, forks included.
Credentials: no App change needed
On both the 204 and the 404 responses, the endpoint returns
X-Accepted-GitHub-Permissions: administration=read(captured 2026-10-21). Thedependabot-digest-swmApp already holds Administration: read for the CodeQL section, and the workflow already asks for it. The workflow comments and the credentials runbook now say that this grant serves both sections, so nobody prunes it thinking only CodeQL uses it.What is not verified: the exact response an App token without Administration would get. I could not mint such a token. The test fixture for that case copies the CodeQL section's
Resource not accessible by integration403. Whatever that response turns out to be, the probe reports it as unreadable, because only the exact disabled-message 404 counts as off.Decision for Andrew
A live survey with a user token on 2026-10-21 found one repo still off:
twistedmelonman/Instapaper-MCP, a fork. The protection and CodeQL sections exempt forks by recorded decision. No such decision exists for alerts, so this PR flags the fork. Turn alerts on there, or record a fork exemption, and the row goes away.Tests
test-standards.shcovers on (204, public and private), off (fork and non-fork), and unreadable. The unreadable cases include known-bad shapes: a bareNot Found404, a 403 that carries the disabled message, an integration 403, and a body returned on success. A mutation check that treats every 404 as off makes the suite fail. Render tests cover the all-unreadable, all-on, missing-field and malformed cases.Two test fixes were needed:
---. CodeQL is no longer the last section, and macOS sed does not support\|alternation.