Repository navigation
Triage privately reported security advisories into Discord - #53
Merged
Merged
Conversation
Adds an advisory triage capability for repository_advisory.reported. A sandboxed agent follows the bundled advisory-triage skill and the workflow posts the verdict, assessment, draft reporter reply, and fix brief to a private Discord channel, since GitHub's API can't comment on advisories.
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.
Changes
repository_advisory.reported), a sandboxed agent triages the report and Factory posts the result to a private Discord channel. GitHub's API can't comment on advisories, so maintainers read it in Discord and decide what to post. Nothing is ever said to the reporter automatically.skills/advisory-triage/skill assumes a report is not a vulnerability until exploitation is shown. The agent builds a reproduction, checks the repository's other advisories for duplicates and precedent, and returns a verdict (vulnerability,not-vulnerability,duplicate,needs-information), a full assessment, a draft reporter reply, and a fix brief another agent can implement. It never fixes anything.PRIVATE_REPORTSunderadvisories/.advisoriessection infactory.yml, on by default; the model defaults totriage.model. The checkout reuses triage's install and build commands. Requires theDISCORD_BOT_TOKENsecret (already set) and theDISCORD_SECURITY_CHANNEL_IDvariable (set inwrangler.jsonc). The GitHub App must also subscribe to the Repository advisory event.Testing
tests/router.test.ts:reportedadvisories route to advisory triage;publishedand invalid GHSA ids don't.tests/advisory-contracts.test.ts: coordinator/agent/sandbox ids, and validation of the triage result.tests/advisory-output.test.ts: advisory normalization and rendering, known-advisory pagination, Discord message formatting (untrusted text neutralized, limits respected), destination config, and the bundled skill.tests/discord-client.test.ts: JSON and multipart posts with mentions disabled, nonce dedupe, thread recovery, error surfacing, and message splitting.tests/config.test.ts: updated for the newadvisoriesdefaults, plus override parsing.Docs
advisoriesconfig, and the Discord and GitHub App setup.