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

Change --list to only search for secrets section and not everything #166

Closed
wants to merge 1 commit into from
Closed

Conversation

mobilutz
Copy link

@mobilutz mobilutz commented May 15, 2020

Description of changes:

I stumbled over a problematic situation, because my git config had some content with secrets in it. The config that had this in it is:

[branch "ll-INV-add-git-secrets"]
	remote = origin
	merge = refs/heads/ll-INV-add-git-secrets

When running git secrets --list, it showed me two files because the regex is not looking for the section but just for any secrets.* string.

With this change, git secrets --list only returns the configuration in the secrets section of git

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sparr
Copy link
Contributor

sparr commented Jun 21, 2023

Good catch on the misbehavior and fix! The pattern should also have a literal dot, so it won't match secretsfoo. However, this will be addressed more thoroughly by #215, so I'm going to close this PR. Thank you for the contribution, though.

@sparr sparr closed this Jun 21, 2023
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