From 01e015d0e082e19be60bb838d0d391e9484d40c8 Mon Sep 17 00:00:00 2001 From: Naomi Carrigan Date: Thu, 11 Dec 2025 15:31:20 -0800 Subject: [PATCH] fix: gitleaks logic --- .gitea/workflows/security.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/security.yml b/.gitea/workflows/security.yml index fcf6914..fbf70d8 100644 --- a/.gitea/workflows/security.yml +++ b/.gitea/workflows/security.yml @@ -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