Skip to content

Commit f2a9fd9

Browse files
authoredNov 7, 2024
Update secret-scan.yml (#148)
1 parent f0fdb2d commit f2a9fd9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎.github/workflows/secret-scan.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@ jobs:
6464
- name: Send Alert to Panther
6565
id: alert
6666
run: |
67-
curl "${{vars.SECRET_SCAN_PANTHER_WEBHOOK_URL}}" \
68-
--header "Authorization: Bearer ${{ secrets.SECRET_SCAN_PANTHER_WEBHOOK_HEADER }}" \
69-
--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 }}"}'
67+
if [[ -n "${{vars.SECRET_SCAN_PANTHER_WEBHOOK_URL}}" ]]; then
68+
curl "${{vars.SECRET_SCAN_PANTHER_WEBHOOK_URL}}" \
69+
--header "Authorization: Bearer ${{ secrets.SECRET_SCAN_PANTHER_WEBHOOK_HEADER }}" \
70+
--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 }}"}'
71+
fi
7072
- name: Fail workflow if secret detected
7173
if: steps.scan.outcome != 'success'
7274
run: exit 1

0 commit comments

Comments
 (0)
Please sign in to comment.