How to scan a remote repo with gitleaks

1.2k Views Asked by At

I'm trying to scan a remote repo using Gitleaks (https://github.com/gitleaks/gitleaks).

I'v read the doc and a couple of examples, showing that you can use --access-token and --repo-url to scan a remote repository but now that i built the sources i get an "unknow flag".

Do you have an idea on how to do it with the new version ? or is it an alternative version of gitleaks ?

Have a nice day !

1

There are 1 best solutions below

0
On BEST ANSWER

See https://github.com/gitleaks/gitleaks/issues/1035#issuecomment-1317365634 :

*v8.0.0 removed all network activity. I.e, gitleaks does not handle cloning repos anymore. You can do something like:

git clone {repo}
cd {repo}
gitleaks detect

gitleaks doesn't check remote repositories — it clones them locally. So you can clone yourself and then run gitleaks.