Skip to content

feat: post repository security advisories - #19

Merged
reitblatt merged 2 commits into
mainfrom
reitblatt/repository-advisories
Nov 4, 2026
Merged

reitblatt merged 2 commits into
mainfrom
reitblatt/repository-advisories

Conversation

@reitblatt

@reitblatt reitblatt commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Extends the bot to add support for repository security advisory events, so Coop (roostorg/coop#1523) and later Osprey can announce newly reported or drafted advisories in a private security channel.

GitHub Actions has no advisory event, so when using this action, you will need to create a scheduled workflow to list the new advisories and pass them in. See the above coop PR for an example of how to do this.

Testing

Add a repository_advisory event that posts only the GHSA ID, title,
severity and link, so a scheduled workflow can announce unpublished
advisories. New optional event and payload-path inputs let a workflow
pass advisories in, one message per payload in the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@reitblatt
reitblatt marked this pull request as ready for review November 3, 2026 21:18
Advisory titles are written by reporters and can reveal the vulnerability,
so post the GHSA ID, state, severity and link only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@cassidyjames cassidyjames left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits/feedback but nothing blocking

Comment thread action.yml
WEBHOOK: ${{ inputs.webhook-url }}
run: |
if [ ! -s "$RUNNER_TEMP/discord.json" ]; then
echo "Skipping: draft or bot pull request"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
echo "Skipping: draft or bot pull request, or no advisories"

Comment thread action.yml
Comment on lines +43 to +44
# Stay under Discord's webhook rate limit when posting several
$first || sleep 1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is prooooobably fine, though I wonder if we should increase the sleep to give ourselves some wiggle room. I looked up the Discord webhook rate limit and their official recommendation is to parse response headers in case of rate limiting which seems… a lot more complex for this use case.

Comment thread message.jq Resolved
@reitblatt
reitblatt merged commit 308d8cc into main Nov 4, 2026
@reitblatt
reitblatt deleted the reitblatt/repository-advisories branch November 4, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants