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

Local git repo: how to tell if Trufflehog actually scanned it? #3251

Open
TheTechromancer opened this issue Aug 27, 2024 · 1 comment
Open

Comments

@TheTechromancer
Copy link

TheTechromancer commented Aug 27, 2024

When running trufflehog on a local repo, I get the same output whether or not the path exists:

Output for nonexistent path:

$ trufflehog --debug git file:///tmp/nonexistent.git
2024/08/27 14:44:59 [updater parent] run
2024/08/27 14:45:00 [updater parent] checking for updates...
2024/08/27 14:45:00 [updater parent] failed to get latest version: already up to date
2024/08/27 14:45:00 [updater parent] starting /home/bls/.local/bin/trufflehog
2024/08/27 14:45:01 [updater child#1] run
2024/08/27 14:45:01 [updater child#1] start program
2024-08-27T14:45:01-04:00	info-2	trufflehog	trufflehog 3.81.9
🐷🔑🐷  TruffleHog. Unearth your secrets. 🐷🔑🐷

2024-08-27T14:45:01-04:00	info-2	trufflehog	starting scanner workers	{"count": 12}
2024-08-27T14:45:01-04:00	info-2	trufflehog	starting detector workers	{"count": 48}
2024-08-27T14:45:01-04:00	info-2	trufflehog	starting verificationOverlap workers	{"count": 12}
2024-08-27T14:45:01-04:00	info-2	trufflehog	starting notifier workers	{"count": 3}
2024-08-27T14:45:01-04:00	info-1	trufflehog	cloned repo	{"path": "/tmp/nonexistent.git"}
2024-08-27T14:45:01-04:00	info-0	trufflehog	running source	{"source_manager_worker_id": "bdRKl", "with_units": true}
2024-08-27T14:45:01-04:00	info-2	trufflehog	enumerating source	{"source_manager_worker_id": "bdRKl"}
2024-08-27T14:45:01-04:00	info-0	trufflehog	finished scanning	{"chunks": 0, "bytes": 0, "verified_secrets": 0, "unverified_secrets": 0, "scan_duration": "3.075326ms", "trufflehog_version": "3.81.9"}
2024/08/27 14:45:01 [updater parent] prog exited with 0

Output for real path:

$ trufflehog --debug git file:///tmp/existent.git
2024/08/27 14:47:58 [updater parent] run
2024/08/27 14:47:59 [updater parent] checking for updates...
2024/08/27 14:47:59 [updater parent] failed to get latest version: already up to date
2024/08/27 14:47:59 [updater parent] starting /home/bls/.local/bin/trufflehog
2024/08/27 14:48:00 [updater child#1] run
2024/08/27 14:48:00 [updater child#1] start program
2024-08-27T14:48:00-04:00	info-2	trufflehog	trufflehog 3.81.9
🐷🔑🐷  TruffleHog. Unearth your secrets. 🐷🔑🐷

2024-08-27T14:48:00-04:00	info-2	trufflehog	starting scanner workers	{"count": 12}
2024-08-27T14:48:00-04:00	info-2	trufflehog	starting detector workers	{"count": 48}
2024-08-27T14:48:00-04:00	info-2	trufflehog	starting verificationOverlap workers	{"count": 12}
2024-08-27T14:48:00-04:00	info-2	trufflehog	starting notifier workers	{"count": 3}
2024-08-27T14:48:00-04:00	info-1	trufflehog	cloned repo	{"path": "/tmp/existent.git"}
2024-08-27T14:48:00-04:00	info-0	trufflehog	running source	{"source_manager_worker_id": "6Uric", "with_units": true}
2024-08-27T14:48:00-04:00	info-2	trufflehog	enumerating source	{"source_manager_worker_id": "6Uric"}
2024-08-27T14:48:00-04:00	info-0	trufflehog	finished scanning	{"chunks": 0, "bytes": 0, "verified_secrets": 0, "unverified_secrets": 0, "scan_duration": "3.065292ms", "trufflehog_version": "3.81.9"}
2024/08/27 14:48:00 [updater parent] prog exited with 0

How can I make sure trufflehog is actually scanning the repo?

Thanks

@rgmz
Copy link
Contributor

rgmz commented Aug 28, 2024

Related to #3005.

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

No branches or pull requests

2 participants