Skip to content

Commit

Permalink
Add build failure and exceptions file
Browse files Browse the repository at this point in the history
  • Loading branch information
rasa-jmac committed Oct 14, 2022
1 parent 6cbcce8 commit f0fb9e8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/security-scans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,14 @@ jobs:
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CODESECURITY_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Fail build if a secret is found
if: steps.trivy.outcome == 'failure'
run: |
echo "=========================================================="
echo "| This build has failed because Trivy detected a secret. |"
echo "=========================================================="
echo "1. Check the step 'Run Trivy vulnerability scanner' for output to help you find the secret."
echo "2. If the finding is a false positive, add it as an entry to trivy-secret.yaml in the root of the repo to suppress the finding."
echo "3. If the finding is valid, the security team can help advise your next steps."
exit 1
4 changes: 4 additions & 0 deletions trivy-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
allow-rules:
- id: example/path/to/the/file.py
description: Why are you adding this as an exception?
path: example/path/to/the/file.py

0 comments on commit f0fb9e8

Please sign in to comment.