Skip to content

Added the ability to add standard strings to .gitleaks.toml.#1023

Merged
pedro-psb merged 1 commit intopulp:mainfrom
ggainey:gitleaks_template
Mar 30, 2026
Merged

Added the ability to add standard strings to .gitleaks.toml.#1023
pedro-psb merged 1 commit intopulp:mainfrom
ggainey:gitleaks_template

Conversation

@ggainey
Copy link
Copy Markdown
Contributor

@ggainey ggainey commented Mar 27, 2026

Creates the file if it doesn't already exist.

return
old_toml["allowlist"][key] = sorted(old_values.union(new_values))
else:
old_toml["allowlist"][key] = sorted(set(data["allowlist"][key]))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Copy Markdown
Member

@pedro-psb pedro-psb Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be convenient to add/merge a ".gitleaks.toml" to the plugin's check-manifest ignore section (not only to the bootstrap). Otherwise the CI will fail (if it didn't had the gitleaks already) and it will require us to add that manually.

Creates the file if it doesn't already exist.
@ggainey ggainey force-pushed the gitleaks_template branch from ec10d26 to f08fb41 Compare March 30, 2026 17:49
# MANIFEST.in is small enough to look at the whole thing at once
manifest_contents = manifest.read_text()
if ".gitleaks.toml" not in manifest_contents:
manifest.write_text(manifest_contents + "\nexclude .gitleaks.toml")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@pedro-psb pedro-psb merged commit 5f3df7a into pulp:main Mar 30, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants