Skip to content

Commit a54de38

Browse files
Add second destination for secret-scan output (#158)
1 parent 19249b5 commit a54de38

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/secret-scan.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,18 @@ jobs:
6161
else
6262
trufflehog git file://. --only-verified --github-actions --fail --exclude-detectors="datadogtoken"
6363
fi
64-
- name: Send Alert to Panther
64+
- name: Send Alert to SIEM
6565
id: alert
6666
run: |
6767
if [[ -n "${{vars.SECRET_SCAN_PANTHER_WEBHOOK_URL}}" ]]; then
6868
curl "${{vars.SECRET_SCAN_PANTHER_WEBHOOK_URL}}" \
6969
--header "Authorization: Bearer ${{ secrets.SECRET_SCAN_PANTHER_WEBHOOK_HEADER }}" \
7070
--data '{"event":"github_secret_scanning", "status":"${{steps.scan.outcome}}", "createdAt":"${{ github.event.pull_request.created_at }}", "repo":"${{ github.repository }}","pull_request":"https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}","actor":"${{ github.event.pull_request.user.login }}"}'
7171
fi
72+
if [[ -n "${{vars.SECRET_SCAN_SIEM_WEBHOOK_URL}}" ]]; then
73+
curl "${{vars.SECRET_SCAN_SIEM_WEBHOOK_URL}}" \
74+
--data '{"event":"github_secret_scanning", "status":"${{steps.scan.outcome}}", "createdAt":"${{ github.event.pull_request.created_at }}", "repo":"${{ github.repository }}","pull_request":"https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}","actor":"${{ github.event.pull_request.user.login }}"}'
75+
fi
7276
- name: Fail workflow if secret detected
7377
if: steps.scan.outcome != 'success'
7478
run: exit 1

0 commit comments

Comments
 (0)