Skip to content
Snippets Groups Projects
Commit 91587a38 authored by Clement's avatar Clement Committed by Pierre Smeyers
Browse files

fix(rules): always use default config file

parent 669be7db
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment