Skip to content

Commit f0fdb2d

Browse files
Add quotes to status value (#147)
Whoops, I missed this in my review of #146. Value of status needs to be quoted. Currently the log looks like {"event":"github_secret_scanning", "status":success, "createdAt":"2024-10-30T17:20:07Z", "repo":"getsentry/gocd-jsonnet","pull_request":"https://github.com/getsentry/gocd-jsonnet/pull/83","actor":"IanWoodard"}
1 parent db5a9a8 commit f0fdb2d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/secret-scan.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ jobs:
4545
--certificate-identity-regexp 'https://github\.com/trufflesecurity/trufflehog/\.github/workflows/.+' \
4646
--certificate-oidc-issuer "https://token.actions.githubusercontent.com"
4747
48-
sha256sum --ignore-missing -c trufflehog_${{ steps.trufflehog_release.outputs.latest_release }}_checksums.txt
49-
48+
sha256sum --ignore-missing -c trufflehog_${{ steps.trufflehog_release.outputs.latest_release }}_checksums.txt
5049
5150
- name: Extract TruffleHog
5251
run: |
@@ -67,7 +66,7 @@ jobs:
6766
run: |
6867
curl "${{vars.SECRET_SCAN_PANTHER_WEBHOOK_URL}}" \
6968
--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 }}"}'
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 }}"}'
7170
- name: Fail workflow if secret detected
7271
if: steps.scan.outcome != 'success'
7372
run: exit 1

0 commit comments

Comments
 (0)