Changelog
* 31650f0 Feature: Adding the ability to extend configuration files (926)
* 0d47165 Add fix for issue 915 (916)
Example partial base config demonstrating how you can extend configs:
toml
Title for the gitleaks configuration file.
title = "8.9.0 example title"
Extend the base (this) configuration. When you extend a configuration
the base rules take precendence over the extended rules. I.e, if there are
duplicate rules in both the base configuration and the extended configuration
the base rules will override the extended rules.
Another thing to know with extending configurations is you can chain together
multiple configuration files to a depth of 2. Allowlist arrays are appended
and can contain duplicates.
useDefault and path can NOT be used at the same time. Choose one.
[extend]
useDefault will extend the base configuration with the default gitleaks config:
https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml
useDefault = true
or you can supply a path to a configuration. Path is relative to where gitleaks
was invoked, not the location of the base config.
path = "common_config.toml"
...
rules, allowlists, etc