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

Options --files-at-commit and --commit results in error #515

Closed
AndrewMasalski opened this issue Feb 1, 2021 · 5 comments
Closed

Options --files-at-commit and --commit results in error #515

AndrewMasalski opened this issue Feb 1, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@AndrewMasalski
Copy link

I am trying to run the scan on our CI using this command:

docker run \
  --tty --rm \
  --name=gitleaks \
  --mount type=bind,source="./",target="/scan" \
  "zricethezav/gitleaks:v7.2.0" \
  --path="/scan" \
  --files-at-commit="latest" \
  --config-path="scan/gitleask-config.toml" \
  --redact \
  --verbose

If I use --files-at-commit or --commit option, gitleaks throws error:

INFO[0000] opening /scan
ERRO[0000] object not found

When I remove --files-at-commit option gitleaks does not throw any error, but it doesn't find any secrets.
Locally the same command works just fine.

Basic Info (please complete the following information):

  • Gitleaks Version: v7.2.0

cc @zricethezav

@raoel
Copy link

raoel commented Sep 6, 2021

could this be related? since it's related to git, and go-git is used in the code? (I don't code Go myself, so I can't patch it :-/ )
go-git/go-git#305

@raoel
Copy link

raoel commented Sep 6, 2021

I'm getting the same error; the last 40-50 commits or so everything worked perfectly, but it stops working on my last commit

@w0rmr1d3r
Copy link
Contributor

Hello!

Can you try with the new version? 7.6.0

It seems that this issue is related to an old version of gitleaks.

Cheers!

@raoel
Copy link

raoel commented Sep 9, 2021

I don't know why, but the issue disappeared? :-/

I upgraded from 7.5.0 to 7.6.0, so it wasn't that old :-) but we'll see how it goes

@w0rmr1d3r
Copy link
Contributor

Okai!
Closing the issue for now, since it seems that it's been fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants