Skip to content

Commit 4e7750b

Browse files
Update secret-scanning.yml
Added future comments to send an alert via email or Teams. To be worked on in future versions.
1 parent bf2132f commit 4e7750b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/secret-scanning.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,20 @@ jobs:
6969
"tool_name": "MSDO-CredScan"
7070
}
7171
EOF
72+
73+
# - name: Alert to Microsoft Teams on secret detection
74+
# if: github.repository_visibility == 'public'
75+
# run: |
76+
# echo "Checking for CredScan findings in SARIF..."
77+
# gzip -cd msdo.sarif.base64 | base64 -d > decoded.sarif || true
78+
# findings=$(jq '.runs[].results | length' decoded.sarif 2>/dev/null || echo 0)
79+
80+
# if [ "$findings" -gt 0 ]; then
81+
# echo "\uD83D\uDEA8 Secrets detected: $findings"
82+
# curl -H 'Content-Type: application/json' -d '{
83+
# "title": "\u26A0\uFE0F MSDO CredScan Alert",
84+
# "text": "**Secrets detected in '${{ github.repository }}' on branch '${{ github.ref_name }}'**\nTotal findings: '"$findings"'"
85+
# }' ${{ secrets.TEAMS_WEBHOOK_URL }}
86+
# else
87+
# echo "\u2705 No secrets found."
88+
# fi

0 commit comments

Comments
 (0)