Skip to content
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

Update global config #1546

Merged
merged 1 commit into from
Oct 4, 2024
Merged

Conversation

rgmz
Copy link
Contributor

@rgmz rgmz commented Oct 4, 2024

Description:

This PR updates the config generation logic to populate the global config programmatically.

The advantages of this are two-fold:

  1. We can generate tests for the global config, e.g. making sure that a pattern is working as expected (not done atm)
  2. The rule validate tests now inherit global allowlist values. This allows us to safely add common offenders, e.g. {{ .Secrets.FOO }} to the global allowlist.

It also organizes the existing [allowlist.paths] entries, and adds a few new ones.

Checklist:

  • Does your PR pass tests?
  • Have you written new tests for your changes?
  • Have you lint your code locally prior to submission?

@rgmz rgmz force-pushed the feat/generate-global-config branch 2 times, most recently from 0acaed2 to 3998f30 Compare October 4, 2024 13:19
@rgmz rgmz force-pushed the feat/generate-global-config branch from 3998f30 to ba6c575 Compare October 4, 2024 13:23
@zricethezav
Copy link
Collaborator

I like it

@zricethezav zricethezav merged commit 82d737d into gitleaks:master Oct 4, 2024
1 check passed
@rgmz rgmz deleted the feat/generate-global-config branch October 4, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants