Skip to content

Commit

Permalink
update gitleaks.yml for output on console
Browse files Browse the repository at this point in the history
  • Loading branch information
iamramashishsharma authored Jul 15, 2024
1 parent 7cfd0b5 commit f24a489
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
if: always()
run: |
echo "### Gitleaks detected secrets" >> $GITHUB_STEP_SUMMARY
jq -r '.runs[0].results[] | "🔴 *File:* \(.locations[].physicalLocation.artifactLocation.uri)\n - *Secret:* \(.message.text)\n - *Rule ID:* \(.ruleId)"' results.sarif >> $GITHUB_STEP_SUMMARY
echo "| 🔴 *File* | *Secret* | *Rule ID* |" >> $GITHUB_STEP_SUMMARY
echo "| --- | --- | --- |" >> $GITHUB_STEP_SUMMARY
jq -r '.runs[0].results[] | "| \(.locations[].physicalLocation.artifactLocation.uri) | \(.message.text) | \(.ruleId) |"' results.sarif >> $GITHUB_STEP_SUMMARY
cat $GITHUB_STEP_SUMMARY
# cat results.sarif | jq '.runs[0].results[] | {message: .message.text, ruleId: .ruleId, locations: .locations[].physicalLocation.artifactLocation.uri}'
continue-on-error: true

0 comments on commit f24a489

Please sign in to comment.