Repository navigation
feat: add a security-advisories action shared by coop and osprey - #20
Merged
Merged
Conversation
Moves the advisory listing, cached HMAC state and posting from coop's workflow into a composite action, so each repo keeps only a thin caller workflow with its own environment and secrets. The posting loop moves to post.sh, shared with the main action. Adds a test workflow and Dependabot for the action pins. 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.
See #19 for broader context.
tl;dr: since Github actions don't support security advisories, we have to periodically poll the API to support them. I'm moving the composite action for this into from roostorg/coop#1523 in discord-bot itself so that we can share it across multiple repos (e.g. coop and osprey) instead of duplicating it.
Testing
python3 -m unittest discover -s security-advisories: 14 tests pass. They include an end-to-end run of the list and post steps against a fake GitHub API and a fake Discord webhook. That run checks the message text, that mentions are disabled, that nothing is reposted on the next run, and that a Discord error leaks no advisory data to the log.post.shstill skips draft PRs and still errors on an empty webhook.discord.yml(pull_request_target,@mainpin) are unchanged.