Skip to content

Commit

Permalink
gitleaks
Browse files Browse the repository at this point in the history
  • Loading branch information
iamramashishsharma authored Jul 15, 2024
1 parent 7d242a1 commit 7cfd0b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ jobs:
- name: Output Gitleaks results to console
if: always()
run: |
cat results.sarif | jq '.runs[0].results[] | {message: .message.text, ruleId: .ruleId, locations: .locations[].physicalLocation.artifactLocation.uri}'
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
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 7cfd0b5

Please sign in to comment.