feat(cve-scan): make the slack notify event allowlist an input - #224
Merged
Conversation
vcauesantos
marked this pull request as ready for review
August 15, 2026 00:45
Piotr1215
reviewed
Aug 17, 2026
Piotr1215
left a comment
Contributor
There was a problem hiding this comment.
Looks good. One CI test issue to fix before moving the tag.
Piotr1215
approved these changes
Aug 17, 2026
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.
cve-scanhas only ever posted to Slack onscheduleandrelease, hardcoded in the manifest'sif:. That default is the right one and it stays: a channel that pings every time an engineer pokes an action is a channel people stop reading. What it did not account for is that aworkflow_callcallee sees the caller's event name.vcluster-pro'srelease.yamlis dispatch-only by design (DEVOPS-1050), so its pre-release pipeline shows up asworkflow_dispatchon the release path as much as the manual one, and could never satisfy the allowlist no matter what it passed. Rather than go unnotified, that caller hand-rolled its own Slack step, which covers two outcomes where this action covers four. Config errors and cancelled scans go silent there.So the allowlist becomes an input.
notify-eventsdefaults toschedule,release, which leaves every existing caller exactly where it was, and widening it becomes a caller's decision rather than an edit to this file. It is still an allowlist, so a new trigger has to opt in deliberately instead of starting to post by surprise.The matching sits in
run.sh, next to wherenotifyis already resolved, for the same reason that comparison moved out of YAML in the first place: a repo variable typed asTRUEused to drop every future notification with nothing anywhere able to annotate why. A comma-separated event list carries that same failure mode with more ways to fumble it, so the list tolerates case and whitespace, matches entries whole soreleasecannot matchprerelease, warns and falls back to the default when it arrives empty, and leaves a::notice::naming the event and the list whenever it blocks one. The two switches stay independent, the way they were as separate gates:notifyandnotify-eventsboth have to admit a run before anything posts, so an unrecognised value on one cannot carry a run past the other.Since the message was being touched anyway, it also regains the findings link that only the caller-side version had. When the scanner produced a SARIF, the Slack message now links to the Security tab filtered to the ref that was scanned. It is derived from
github.refrather than taken as an input, so it cannot drift from the refupload-sarifdefaults to; a caller passing the URL itself could let the two disagree. The filter is load-bearing rather than cosmetic: without it the tab shows the default branch, so an RC scanned from a tag reads as empty. It sits outside the code fence because Slack will not linkify inside one.One risk carries over, and it is narrow. A cancel landing before
run.shresolves leaves the gate unapplied, so a cancelled run could post where the old YAML check would have stopped it. That is the same posture an unrecognisednotifyvalue already gets, unresolved gates resolving toward notifying, and the cancelled arm exists precisely so a killed scan does not pass unnoticed. It is documented inaction.ymlnext to that arm rather than left to be discovered.Twelve bats cases cover the gate, none of them reachable from a manifest
if:, which is the concrete argument for where the logic lives.make test-cve-scanis 109 pass and 0 fail, and shellcheck, actionlint, zizmor andmake check-docsare all clean. The action's own input table is regenerated by auto-doc; the hand-maintained input list in the repo README is updated too, sincecheck-docsonly compares the generated block and would not have caught it. Nocomposite-smokescenario was added: that job cannot observe this input without a real scan, and it already documents the same limitation forseverity-thresholdandblock-on-findings. Nothing reaches callers untilcve-scan/v1is advanced after merge.References DEVOPS-1292