Repository navigation
Add daily security advisory digest to Slack - #21
Merged
Merged
Conversation
repository_advisory webhooks don't reliably fire for Triage-state reports submitted via GitHub's "Report a vulnerability" form until a maintainer acts on them, so advisories like nf-core/rnaseq's GHSA-pq68-g636-8gwf can sit unnoticed. This polls the org-wide security-advisories API once a day, diffs against DynamoDB state, and posts new/changed advisories to #security. If the check itself fails (e.g. missing security-manager role or token scope), that's posted to Slack too rather than only logged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds docs/security-advisories.md (how it works, config, one-time GitHub/Slack setup) and a short README mention/link. No channel name is called out explicitly, just "a private Slack channel for the core team". Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
3 of 4 tasks
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.
Summary
scheduler/oncall_jobs.pypattern) that polls GitHub's org-wide security-advisories API and posts anything new/changed to the private#securitySlack channel.repository_advisorywebhooks don't reliably fire for Triage-state reports submitted via GitHub's "Report a vulnerability" form until a maintainer/researcher formally acts on them — that's why nf-core/rnaseq's GHSA-pq68-g636-8gwf sat unnoticed. Polling once a day is enough; only a handful of advisories fire per year.GET /orgs/{org}/security-advisoriesendpoint (one call covers every repo) rather than iterating repos individually, diffing(state, updated_at)against DynamoDB (ADVISORY#{repo}/{ghsa_id}keys, followingdb/oncall.py's pattern).#securitytoo, not just logged — per feedback that failures should never be silent._slack_linkescaping inscheduler/oncall_jobs.py.Setup required before this works
GITHUB_TOKEN's account needs to be added as an org owner or security manager for nf-core (Settings → Access → Security managers), plus either therepository_advisories:writescope (classic PAT) or the "Repository security advisories" permission set to Write (fine-grained PAT). Until that's done, the daily check will post a clear failure notice to#securityrather than fail silently.Test plan
pytest— 560 tests pass, including new coverage intests/test_security_advisories.py(pagination/cursor-following, error propagation, DB round-trips, digest posting, diff/dedupe logic, and mrkdwn-escaping of attacker-controlled advisory text)ruff check/ruff format --check— cleanmypy src/— clean#securityreceives the digest once the token has the right org role/scope in production🤖 Generated with Claude Code