-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gitleaks ignores default config and doesn't merge configs #876
Comments
Hi @adamdecaf, this isn't a bug as |
That would be great. I've got ~100 repositories to manage and while we do template codebases I was hoping to rely on the default config. Having overrides would be a big help to us. |
@zricethezav, I am echoing with @adamdecaf. It will be great if there is a separate config to allow users to customize the global allowlists without overwriting the default config. |
Thanks, I hear you guys. I'm thinking of ways to introduce this. In the meantime if you want this feature expedited consider reaching out to me for a maintenance and support agreement https://gitleaks.io/products.html Some design restrictions I want to impose:
So a config might look something like title = "repo foo gitleaks config"
[extends]
url = "https://github.com/zricethezav/gitleaks/config/baseconfig.toml"
# path = "path/to/base/config.toml"
# useDefault = true Only one cc @adamdecaf |
That would work for us! I can help out on a PR if you're interested. |
@adamdecaf certainly, if you're up for it. I probably won't be able to get to this for at least another week or two |
Can you tell us how to access/list the default config so we can create a custom config based on the default? |
What's the current status on this? I'm undecided wether or not to implement a workaround as long as extending configs is not yet available. |
Hello, |
I have a branch I'm working on locally and still deciding on the design of this. Next month or two probably, or maybe next week. idk |
@adamdecaf @very-doge-wow @foolioo @wolfch-elsevier I just merged #926. Check out the updated https://github.com/zricethezav/gitleaks#configuration section for instructions on how to use this new feature. Feel free to pull down master and try it out before I release it sometime this week with |
@zricethezav Awesome, thanks! Will test it out. |
@zricethezav Is there a way to extend from a default config which is hosted somewhere else than GitHub? The reason being that I'm running gitleaks inside an isolated CI/CD environment which doesn't have access to GitHub directly, but only to a generic GitHub mirror inside an Artifactory server. Meaning: I would need to be able to use something like this: [extend]
path = "https://some.artifactory.internal/artifactory/some-repo/gitleaks-config.toml" |
@very-doge-wow not at the moment. What I recommend is pulling in |
But won't |
@very-doge-wow, nope. https://github.com/zricethezav/gitleaks/blob/master/config/config.go#L186-L206 https://github.com/zricethezav/gitleaks/blob/master/config/config.go#L13-L14 |
Okay perfect. Then that solves my problem! Thanks. 🏅 |
@zricethezav awesome! Looking forward to upgrading to a new version with this feature included 😄 |
With the release of https://github.com/zricethezav/gitleaks/releases/tag/v8.9.0 I'm gonna close out this issue. Thanks for being patient and hope you get some value out of the new feature. Feel free to re-open or continue the discussion 👍🏻 |
Describe the bug
If I have a config like the following zero secrets are detected. I'm unable to specify a few allow directives.
gitleaks reports no secrets, but there are some. This is likely due to gitleaks thinking
--config
should replace the default config, but that's not what I want.Expected behavior
It would be nice to have a way to allow a few entries as many projects require dummy keys.
Basic Info (please complete the following information):
cc @zricethezav
The text was updated successfully, but these errors were encountered: