From 6a9d3c0889e1fc259327055a6c5c38c086f41168 Mon Sep 17 00:00:00 2001 From: alexanderM91 Date: Tue, 15 Oct 2024 12:41:59 +0200 Subject: [PATCH] Setup Slack notification --- .github/workflows/trufflehog.yml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/trufflehog.yml b/.github/workflows/trufflehog.yml index 3dc83390..b72abc6a 100644 --- a/.github/workflows/trufflehog.yml +++ b/.github/workflows/trufflehog.yml @@ -51,6 +51,17 @@ jobs: echo "UNVERIFIED_SECRETS=$UNVERIFIED_SECRETS" >> $GITHUB_ENV echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: Debugging - Print Environment Variables + run: | + echo "Chunks: $CHUNKS" + echo "Bytes: $BYTES" + echo "Verified Secrets: $VERIFIED_SECRETS" + echo "Unverified Secrets: $UNVERIFIED_SECRETS" + echo "Scan Duration: $SCAN_DURATION" + echo "Trufflehog Version: $VERSION" + # Check if variables are set in $GITHUB_ENV + cat $GITHUB_ENV + - name: Send Slack Notification id: slack uses: slackapi/slack-github-action@v1.24.0 @@ -65,32 +76,32 @@ jobs: "fields": [ { "title": "Chunks Scanned", - "value": "${{ steps.extract_trufflehog_data.outputs.chunks }}", + "value": "${{ env.CHUNKS }}", "short": true }, { "title": "Bytes Scanned", - "value": "${{ steps.extract_trufflehog_data.outputs.bytes }}", + "value": "${{ env.BYTES }}", "short": true }, { "title": "Verified Secrets", - "value": "${{ steps.extract_trufflehog_data.outputs.verified_secrets }}", + "value": "${{ env.VERIFIED_SECRETS }}", "short": true }, { "title": "Unverified Secrets", - "value": "${{ steps.extract_trufflehog_data.outputs.unverified_secrets }}", + "value": "${{ env.UNVERIFIED_SECRETS }}", "short": true }, { "title": "Scan Duration", - "value": "${{ steps.extract_trufflehog_data.outputs.scan_duration }}", + "value": "${{ env.SCAN_DURATION }}", "short": true }, { "title": "Trufflehog Version", - "value": "${{ steps.extract_trufflehog_data.outputs.version }}", + "value": "${{ env.VERSION }}", "short": true } ]