Skip to content

Commit

Permalink
Setup Slack notification
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderM91 committed Oct 15, 2024
1 parent ebbe497 commit 6a9d3c0
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/trufflehog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand All @@ -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
}
]
Expand Down

0 comments on commit 6a9d3c0

Please sign in to comment.