Repository navigation
ci: post new security advisories to the security discord channel - #1523
Merged
Merged
Conversation
Poll the repository security advisories API every 15 minutes and post each new triage or draft advisory once (GHSA ID, title, severity, link) to the private security channel. Skips silently until SECURITY_DISCORD_WEBHOOK and ADVISORY_READ_TOKEN are configured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
List new triage and draft advisories in a script and post them with the shared discord-bot action's repository_advisory event instead of calling the Discord webhook directly. State is saved only after posting succeeds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
reitblatt
marked this pull request as ready for review
November 3, 2026 21:18
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Address review: skip manual dispatches from other branches, document the duplicate-post behaviour on a partial batch failure, and use a single import style for unittest in the tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Advisory titles are written by reporters and can reveal the vulnerability. Pin roostorg/discord-bot to the matching commit on #19. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
@cassidyjames Dropped titles and added advisory state (i.e. triaging or draft). @taobojlen @juanmrad can I get a stamp here? |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Context & Requests for Reviewers
Part of #1520 (item 7).
We have pretty poor visibility on security advisory sumissions right now, so we should ping the (private) #security-incidents Discord channel, just like we do for PRs in #coop and #osprey.
When a triage or draft advisory is created, pings #security-incidents with GHSA ID, state (triage or draft), severity and a link to the advisory. Titles are left out, since reporters write them and they can reveal the vulnerability.
Uses @cassidyjames's roostorg/discord-bot action, extended in roostorg/discord-bot#19 with a
repository_advisoryevent.GitHub Actions has no advisory event, so the workflow polls the REST API every 15 minutes (
security-advisories?state=triageandstate=draft).Notes for reviewers:
main. Changing the webhook URL reposts the open advisories (once)permissions: {}, actions pinned by SHA, and aconcurrencygroup without cancel-in-progress to avoid double posts. Mentions are disabled in Discord messages.Requests for reviewers:
.github/scripts/?Tests
Ran manual test against fake repo (https://github.com/reitblatt/advisory-notify-test/), saw notifications in channel w/o sensitive info (as expected):

(Optional) Rollout Plan
main.security-advisory-notifywith deployment branches limited tomain, and in it the secretsSECURITY_DISCORD_WEBHOOK(the private security channel's webhook URL) andADVISORY_READ_TOKEN. Don't create them as repository secrets, which every branch's workflows can read. The token is a fine-grained PAT with resource owner roostorg, limited to this repository, with "Repository security advisories: Read-only". Its owner must be a repository admin or security manager, or triage advisories aren't listed. Until both exist, the workflow skips silently. After creating them, run the workflow manually once to confirm it posts.Release notes
Checklist
Only check items that apply to this PR; leave the rest unchecked.
If you changed anything user-facing (i.e. user interface or APIs):
Did you update related docs?
If the change is notable (refer to Keep a Changelog conventions):
Did you fill in the Release notes section above?
If you changed
db/src/scripts/**and usedCREATE TABLE,ADD COLUMN, orALTER COLUMN:Are as many columns marked
NOT NULLas possible? If some columns can sometimes be null depending on other columns, are thereCHECKconstraints capturing those relationships, and are these also reflected using unions in the associated Kysely types?If you added a new signal in
server/services/signalsService/signals/**:Did you classify every error case as a permanent error (
SignalPermanentError, no retry) or a normal error (retryable)? Any case where the signal can't determine a score should be aSignalPermanentError.