diff --git a/templates/gitlab-ci-gitleaks.yml b/templates/gitlab-ci-gitleaks.yml index 4c263f4ebeefa4e61ac1f981ae8d903522df59cd..c5b6234d698fe4c81120c7ad6688d844f34cf8cf 100644 --- a/templates/gitlab-ci-gitleaks.yml +++ b/templates/gitlab-ci-gitleaks.yml @@ -196,17 +196,13 @@ stages: } function install_gitleaks_rules() { - # If present, import gitleaks rules found inside the git repository (in place of the default + Orange rules) if [[ -f ".gitleaks.toml" ]] then log_info "Using custom Gitleaks rules from project (\\e[33;1m.gitleaks.toml\\e[0m)" - cp .gitleaks.toml ./gitleaks/rules.toml - export gitleaks_rule_opts="--config ./gitleaks/rules.toml" elif [[ "$GITLEAKS_RULES" ]] then log_info "Using Gitleaks rules from env (\\e[33;1m\$GITLEAKS_RULES\\e[0m)" - echo "$GITLEAKS_RULES" > ./gitleaks/rules.toml - export gitleaks_rule_opts="--config ./gitleaks/rules.toml" + echo "$GITLEAKS_RULES" > .gitleaks.toml else log_info "No Gitleaks rules found: use default" fi