From 4eaca6d6eea44c26eff502aac4374ad9f438db2f Mon Sep 17 00:00:00 2001 From: sean wibisono Date: Mon, 26 Oct 2026 10:48:44 +1100 Subject: [PATCH] UID2-7333: make individual vuln-scan Slack alert opt-in Co-Authored-By: Claude Opus 5.5 --- .../workflows/shared-vulnerability-scan-failure-notify.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/shared-vulnerability-scan-failure-notify.yaml b/.github/workflows/shared-vulnerability-scan-failure-notify.yaml index 27b33073..dc69ed9d 100644 --- a/.github/workflows/shared-vulnerability-scan-failure-notify.yaml +++ b/.github/workflows/shared-vulnerability-scan-failure-notify.yaml @@ -37,6 +37,10 @@ on: its base image) and scanned. When empty (the default), image mode builds via Maven as before. type: string default: '' + slack_notify: + description: If true, posts an individual Slack alert on scan failure. + type: boolean + default: false secrets: SLACK_WEBHOOK: required: false @@ -134,7 +138,7 @@ jobs: continue-on-error: true - name: Notify Slack on Vulnerability Scan Failure - if: ${{ steps.vulnerability-scan.outcome == 'failure' }} + if: ${{ inputs.slack_notify && steps.vulnerability-scan.outcome == 'failure' }} env: SLACK_COLOR: danger SLACK_MESSAGE: ':x: Vulnerability scan failed. Please review details: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}. Check past alerts before acting and log new actions to avoid duplicate efforts.'