generated from nhcarrigan/template
This commit is contained in:
@@ -69,21 +69,16 @@ jobs:
|
||||
|
||||
- name: Run Gitleaks secret scan
|
||||
run: |
|
||||
gitleaks detect --source . --report-path gitleaks-results.json --report-format json --no-git
|
||||
gitleaks detect --source . --report-path gitleaks-results.txt --report-format txt
|
||||
gitleaks detect --source ./src --report-path gitleaks-results.json --report-format json --no-git
|
||||
|
||||
- name: Display Gitleaks scan results
|
||||
if: always()
|
||||
run: |
|
||||
if [ -f gitleaks-results.txt ]; then
|
||||
if [ -f gitleaks-results.json ]; then
|
||||
echo "=== Gitleaks Secret Scan Results ==="
|
||||
cat gitleaks-results.txt
|
||||
cat gitleaks-results.json
|
||||
else
|
||||
echo "No secrets detected by Gitleaks"
|
||||
fi
|
||||
if [ -f gitleaks-results.json ] && [ -s gitleaks-results.json ]; then
|
||||
echo "=== Gitleaks JSON Results ==="
|
||||
cat gitleaks-results.json
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user