From f0fdb2dab3ac41e976613b91079e776e0df6d642 Mon Sep 17 00:00:00 2001 From: geoffg-sentry <165922362+geoffg-sentry@users.noreply.github.com> Date: Wed, 30 Oct 2024 14:30:27 -0400 Subject: [PATCH] Add quotes to status value (#147) Whoops, I missed this in my review of https://github.com/getsentry/.github/pull/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"} --- .github/workflows/secret-scan.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/secret-scan.yml b/.github/workflows/secret-scan.yml index 175dba4..f81f3f6 100644 --- a/.github/workflows/secret-scan.yml +++ b/.github/workflows/secret-scan.yml @@ -45,8 +45,7 @@ jobs: --certificate-identity-regexp 'https://github\.com/trufflesecurity/trufflehog/\.github/workflows/.+' \ --certificate-oidc-issuer "https://token.actions.githubusercontent.com" - sha256sum --ignore-missing -c trufflehog_${{ steps.trufflehog_release.outputs.latest_release }}_checksums.txt - + sha256sum --ignore-missing -c trufflehog_${{ steps.trufflehog_release.outputs.latest_release }}_checksums.txt - name: Extract TruffleHog run: | @@ -67,7 +66,7 @@ jobs: run: | curl "${{vars.SECRET_SCAN_PANTHER_WEBHOOK_URL}}" \ --header "Authorization: Bearer ${{ secrets.SECRET_SCAN_PANTHER_WEBHOOK_HEADER }}" \ - --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 }}"}' + --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 }}"}' - name: Fail workflow if secret detected if: steps.scan.outcome != 'success' run: exit 1