fix: gitleaks logic
Security Scan / Security Audit (push) Has been cancelled

This commit is contained in:
2025-12-11 15:31:20 -08:00
parent 08fb8ae470
commit 01e015d0e0
+3 -8
View File
@@ -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