-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: add option to set config from env var with toml content #1662
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
feat: add option to set config from env var with toml content #1662
Conversation
b9ea1be
to
415ea16
Compare
@zricethezav this would simplify a lot for us, WDYT? |
@rgmz What do you think about this feature? Anything missing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple comments; seems like a straightforward change.
94ee348
to
6321dca
Compare
Everything looks good to me. Ball is in @zricethezav's court now to merge. |
README.md
Outdated
@@ -73,6 +73,31 @@ cd gitleaks | |||
make build | |||
``` | |||
|
|||
### Load Configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bufferoverflow this section should go after the Pre-commit section and before the Configuration section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zricethezav I just changed accordingly with a9074dd
Co-authored-by: Richard Gomez <32133502+rgmz@users.noreply.github.com>
34c9cd8
to
a9074dd
Compare
…ks#1662) * feat: add option to set config from env var with toml content * Update README.md Co-authored-by: Richard Gomez <32133502+rgmz@users.noreply.github.com> * fix: check if config provided by GITLEAKS_CONFIG_TOML can be loaded * docs: move load configuration section to have it before configuration --------- Co-authored-by: Richard Gomez <32133502+rgmz@users.noreply.github.com>
…ks#1662) * feat: add option to set config from env var with toml content * Update README.md Co-authored-by: Richard Gomez <32133502+rgmz@users.noreply.github.com> * fix: check if config provided by GITLEAKS_CONFIG_TOML can be loaded * docs: move load configuration section to have it before configuration --------- Co-authored-by: Richard Gomez <32133502+rgmz@users.noreply.github.com>
Description:
Sometimes it's easier to set an environment variable with the config file content instead of providing a file to the environment where gitleaks is used.
E.g., setting an instance variable on a self-hosted GitLab with the new option
GITLEAKS_CONFIG_TOML
containing the content of the Gitleaks toml file is much simpler then downloading a file or deploy a config file to all runners.Checklist: