Skip to content

Commit db5a9a8

Browse files
authored
Update Secret Scan Log Forwarding (#146)
* send failed result to panther * rename variables * remove unnecessary `<` * add continue on error * send logs to panther for all scans * remove redundant " * bump trufflehog to 3.82.13 * missing double quote
1 parent cb8c3b9 commit db5a9a8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/secret-scan.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
# echo "latest_tag_name=$LATEST_TAG_NAME" >> "$GITHUB_OUTPUT"
3030
# echo "latest_release=$LATEST_RELEASE" >> "$GITHUB_OUTPUT"
3131
run: |
32-
echo "latest_tag_name=v3.80.3" >> "$GITHUB_OUTPUT"
33-
echo "latest_release=3.80.3" >> "$GITHUB_OUTPUT"
32+
echo "latest_tag_name=v3.82.13" >> "$GITHUB_OUTPUT"
33+
echo "latest_release=3.82.13" >> "$GITHUB_OUTPUT"
3434
3535
- name: Download and verify TruffleHog release
3636
run: |
@@ -64,11 +64,10 @@ jobs:
6464
fi
6565
- name: Send Alert to Panther
6666
id: alert
67-
if: steps.scan.outcome != 'success'
6867
run: |
6968
curl "${{vars.SECRET_SCAN_PANTHER_WEBHOOK_URL}}" \
7069
--header "Authorization: Bearer ${{ secrets.SECRET_SCAN_PANTHER_WEBHOOK_HEADER }}" \
71-
--data '{"event":"github_secret_scanning_failed", 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 }}"}'
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 }}"}'
7271
- name: Fail workflow if secret detected
7372
if: steps.scan.outcome != 'success'
7473
run: exit 1

0 commit comments

Comments
 (0)