Support for Separate Files for Rules and Allowlist in gitleaks
- Dominant language
- Go
- Stars
- 29.4k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hello @zricethezav,
I've been extensively working with gitleaks and found that it would be extremely beneficial to have the capability to utilize separate files for rules and the allowlist.
Background:
Currently, gitleaks supports defining both rules and the allowlist within a singular configuration file. In complex projects with many developers and frequently changing rules, this can become cumbersome. Separating the two lists could greatly enhance manageability and clarity.
Feature Request:
I propose to extend gitleaks to accept separate files for rules and allowlist. For example:
```bash
gitleaks --config-rules=path/to/rules.toml --config-allowlist=path/to/allowlist.toml
```
I believe this change would significantly improve the flexibility and adaptability of gitleaks, especially in larger projects.
Additional Information:
This feature would especially aid teams working in large organizations under stringent security policies, as they'd have the ability to manage their rules and exceptions in a cleaner and more efficient manner.
Thank you for considering this and for all the hard work on this fantastic tool!
Contributor guide
Research direction
Start by tracing gitleaks' command-line configuration handling and how the current single configuration file loads rules and the allowlist. Check how the proposed --config-rules and --config-allowlist inputs should interact with existing configuration behavior. Done means separate files can be supplied and the relevant configuration and CLI tests cover both inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100