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

Secret appears to be added in new file and only checked on update #98

Open
farmersmurf opened this issue Jan 10, 2019 · 3 comments
Open
Labels
aged Issues that have gone more than 365 days without a response from the requester.

Comments

@farmersmurf
Copy link

farmersmurf commented Jan 10, 2019

I have added a new file call credTest and put a dummy aws secret in it AKIAIOSFODNN7EXAMPLE.

Doing a commit allowed the file to be committed and only once I updated it to AKIAIOSFODNN8EXAMPLE and tried to commit it again, did it prevent me from doing so.

unless the first one wasn't valid in that case it works :)

@mtdowling
Copy link
Contributor

Is this still an issue with version 1.3.0 of git-secrets?

@plygrnd plygrnd added the aged Issues that have gone more than 365 days without a response from the requester. label May 28, 2020
@sourabhDemo
Copy link

sourabhDemo commented Oct 8, 2021

Yes, this is still issue. When I run
git secrets --scan
it scans the new file and successfully finds the secrets.
But when I try to run
git commit -m "Commit message"
it does not scan new file, rather commit the new file. Can you please suggest if I am missing anything.

@sparr
Copy link
Contributor

sparr commented Jun 16, 2023

git commit -m "Commit message" will create an empty commit if you have not added any files. Can you try git commit -a -m "Commit message" to automatically add your changed file (or git add in advance) and confirm that it gets scanned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aged Issues that have gone more than 365 days without a response from the requester.
Projects
None yet
Development

No branches or pull requests

5 participants