Add failure notification to weekly security scan#982
Open
kitcommerce wants to merge 2 commits intonextfrom
Open
Add failure notification to weekly security scan#982kitcommerce wants to merge 2 commits intonextfrom
kitcommerce wants to merge 2 commits intonextfrom
Conversation
added 2 commits
March 13, 2026 12:19
When Brakeman or bundler-audit fails, a 'notify_failure' job opens a GitHub issue with a direct link to the failed Actions run. The job is gated by 'if: failure()' so it only runs on failure — no noise on a clean scan. Notification mechanism: - GitHub-native (actions/github-script + issues.create) - No external SaaS required - Requires issues:write permission on the notify_failure job Fixes #977
3 tasks
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.
Summary
Adds a
notify_failurejob to the weekly security scan workflow. When Brakeman or bundler-audit fails, the job opens a GitHub Issue with a direct link to the failed Actions run, so failures are actively surfaced rather than sitting silently in the Actions UI.Changes
notify_failurejob to.github/workflows/weekly-security-scan.ymlif: failure()— runs only on scan failure, never on successactions/github-script@v7to callissues.createwith a link to the failed runissues: writepermission scoped to thenotify_failurejob (principle of least privilege)Notification design
if: failure()on the scan jobVerification
The workflow already includes
workflow_dispatch, so a test run can be triggered manually. To simulate failure, temporarily replace a scan command withexit 1, run viaworkflow_dispatch, confirm an issue is opened, then revert.Client Impact
None expected. Change is scoped to CI/workflow files only and has no effect on downstream client implementations.
Fixes #977