-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
The instructions in the repo's README for scanning a local git repo don't work:
https://github.com/trufflesecurity/trufflehog?tab=readme-ov-file#9-scan-a-local-git-repo
TruffleHog Version
trufflehog 3.91.2
Expected Behavior
Local git repo should be scanned.
Actual Behavior
When running trufflehog git file://test_keys --results=verified,unknown, it fails cloning the repo, even though the repo exists and was already cloned in the previous step.
2025-12-02T15:19:20-05:00 error trufflehog error running scan {"error": "failed to scan Git: error preparing repo: failed to clone file Git repo (file://C:%5CUsers%5Ccorey.goldberg%5Ccode%5Ctest_keys): could not clone repo: , error executing git clone: exit status 128, ssh: Could not resolve hostname file: Name or service not known\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n"}
Steps to Reproduce
run commands:
$ git clone [email protected]:trufflesecurity/test_keys.git
$ trufflehog git file://test_keys --results=verified,unknown
Environment
- Windows 11 (using Bash)
Additional Context
I can scan a local repo fine by cloning it and then running a filesystem scan:
$ git clone [email protected]:trufflesecurity/test_keys.git
$ trufflehog filesystem test_keys --results=verified,unknown
... but that's not how the instructions say to scan a local git repo.
averymd