diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index 9afe686..9412cb7 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -66,7 +66,7 @@ jobs: echo -e $SCAN_RESULTS - name: Send notification to Slack id: slack - if: always() && github.event_name == 'schedule' && steps.scan.outcome == 'failure' + if: always() && (needs.BuildAndScan.outputs.CVE_HIGH > 0 || needs.BuildAndScan.outputs.CVE_CRITICAL > 0) uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d #v2.0.0 with: payload: |