Repository navigation
feat(malware-scan): Google Chat alert when the CI scan finds malware - #32
Merged
Merged
Conversation
…malware The reusable workflow takes an optional MALWARE_ALERT_WEBHOOK secret. On a failed scan it posts repo, branch, actor, the first 10 HIGH rule/path pairs and the run link (no code snippets) with plain curl, threaded per repo. A separate message is sent when the scanner cannot run. Skipped when the secret is absent. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Org secrets aren't readable by private repos on GitHub Free. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
Added webhook alert for team to get into the incident quickly |
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.
A failed malware scan only notifies the person who pushed, and in this attack that is the compromised account. This PR alerts the team's Google Chat space instead.
Changes
.github/workflows/malware-scan.ymlMALWARE_ALERT_WEBHOOKsecret, so existing callers keep working unchanged.RULE path:linefindings and the run link.jq --argand sent with plaincurl, with no third-party action.github.event.forced), since this attack arrives by force-push.continue-on-errorso a Chat outage can't hide the real failure.malware-scan/workflow.yml: the caller template passes only this one secret, notsecrets: inherit.malware-scan/README.md: a new "Alerts (Google Chat)" section covering setup, message contents and rotating the webhook. Setup uses a repository secret per project; a repo can point at its own space.Testing
curlstubbed, against real scanner output. The malware message, the "could not run" message and the skip-without-secret path all behaved correctly.FORCED: false/true), each as its own message.Before relying on it (owner)
MALWARE_ALERT_WEBHOOKin each project that should alert. Organisation secrets are not an option: on GitHub Free, private repos can't read them.secrets:block and bump the pinned SHA.🤖 Generated with Claude Code