From 12699e718a49dd0412dd3ad3abce58aead6552f8 Mon Sep 17 00:00:00 2001
From: Pierre Smeyers <pierre.smeyers@gmail.com>
Date: Fri, 4 Aug 2023 15:38:39 +0200
Subject: [PATCH] fix(report): normalize Gitleaks report

---
 templates/gitlab-ci-gitleaks.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/templates/gitlab-ci-gitleaks.yml b/templates/gitlab-ci-gitleaks.yml
index 62d517c..abe2328 100644
--- a/templates/gitlab-ci-gitleaks.yml
+++ b/templates/gitlab-ci-gitleaks.yml
@@ -231,15 +231,15 @@ gitleaks:
   before_script:
     - *gitleaks-scripts
     - install_ca_certs "${CUSTOM_CA_CERTS:-$DEFAULT_CA_CERTS}"
-    - mkdir -p ./gitleaks
+    - mkdir -p -m 777 reports
     - install_gitleaks_rules
     - git config --global --add safe.directory "${CI_PROJECT_DIR}"
   script:
-    - gitleaks detect ${TRACE+--log-level debug} --source . $gitleaks_rule_opts --report-path ./gitleaks/gitleaks-report.json $GITLEAKS_ARGS
+    - gitleaks detect ${TRACE+--log-level debug} --source . $gitleaks_rule_opts --report-path reports/gitleaks.native.json $GITLEAKS_ARGS
   artifacts:
     name: "$CI_JOB_NAME artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG"
     when: always
     paths:
-      - gitleaks/
+      - reports/gitleaks.*
   rules:
     - !reference [.test-policy, rules]
-- 
GitLab