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

Not scanned except the first file #66

Closed
t13a opened this issue Feb 2, 2018 · 6 comments
Closed

Not scanned except the first file #66

t13a opened this issue Feb 2, 2018 · 6 comments
Labels

Comments

@t13a
Copy link
Contributor

t13a commented Feb 2, 2018

  • Arch Linux
  • bash 4.4.012
  • git 2.16.1
  • git-secrets at master

Here is how to reproduce.

$ echo harmless > some.crt
$ echo forbidden > some.key # should be matched
$ git add -A
$ git secrets --scan some.crt some.key
(cause no errors)

pre-commit hook has same problem, since the internal behavior is almost the same as this.

$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    new file:   some.crt
    new file:   some.key

$ git commit -m 'commit'
 2 files changed, 2 insertions(+)
 create mode 100644 some.crt
 create mode 100644 some.key
(secret was committed)

I have fixed this problem so I will send a pull request soon.

P.S.
I have also passed test/pre-commit-hook.bats and found a small error. After this fix, all tests are passed successfully. But why did this fail while others are succeeded?

t13a added a commit to t13a/git-secrets that referenced this issue Feb 2, 2018
-  filenames are treated as array (whitespace/newline consideration)
@t13a
Copy link
Contributor Author

t13a commented Feb 2, 2018

Hmmm, I failed some tests on Travis CI. I will check it after I get up tomorrow.
https://travis-ci.org/awslabs/git-secrets/builds/336661419

@t13a
Copy link
Contributor Author

t13a commented Feb 3, 2018

I'm not sure there are other environmental dependence problems, but I fixed one.
https://travis-ci.org/awslabs/git-secrets/builds/336837712

This part is serious, so I will report it when found.

@hyandell
Copy link
Contributor

Confirmed, only running on the first file for me.

@hyandell hyandell added the bug label Apr 19, 2018
@rix0rrr
Copy link

rix0rrr commented Jul 17, 2018

This is still broken. Any chance of getting an update here?

@mtdowling
Copy link
Contributor

Sorry for the delay. I've merged #67, so this is now resolved. Thanks for your contribution!

@t13a
Copy link
Contributor Author

t13a commented Aug 11, 2018

Never mind. I'm glad you came back! Thank you for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants