chore: add debug flag to Trufflehog run command#379
Open
Conversation
|
|
tolzhabayev
reviewed
Nov 12, 2025
| shell: bash | ||
| run: | | ||
| ./bin/trufflehog filesystem "${FOLDER}" \ | ||
| ./bin/trufflehog filesystem "${FOLDER}" --debug \ |
Contributor
There was a problem hiding this comment.
What would an example output be?
xnyo
reviewed
Nov 14, 2025
| shell: bash | ||
| run: | | ||
| ./bin/trufflehog filesystem "${FOLDER}" \ | ||
| ./bin/trufflehog filesystem "${FOLDER}" --debug \ |
Member
There was a problem hiding this comment.
I got a more informative output with this argument instead:
Suggested change
| ./bin/trufflehog filesystem "${FOLDER}" --debug \ | |
| ./bin/trufflehog filesystem "${FOLDER}" --log-level=5 \ |
The --debug flag logs more or less the same thing that's logged in the GitHub Actions annotation:
2025/11/14 17:53:37 [updater parent] run
2025/11/14 17:53:37 [updater parent] checking for updates...
2025/11/14 17:53:38 [updater parent] failed to get latest version: already up to date
2025/11/14 17:53:38 [updater parent] starting /opt/homebrew/bin/trufflehog
2025/11/14 17:53:38 [updater child#1] run
2025/11/14 17:53:38 [updater child#1] start program
2025-11-14T17:53:38+01:00 info-2 trufflehog trufflehog 3.91.0
🐷🔑🐷 TruffleHog. Unearth your secrets. 🐷🔑🐷
2025-11-14T17:53:38+01:00 info-2 trufflehog starting scanner workers {"count": 10}
2025-11-14T17:53:38+01:00 info-2 trufflehog starting detector workers {"count": 80}
2025-11-14T17:53:38+01:00 info-2 trufflehog starting verificationOverlap workers {"count": 10}
2025-11-14T17:53:38+01:00 info-2 trufflehog starting notifier workers {"count": 10}
2025-11-14T17:53:38+01:00 info-0 trufflehog running source {"source_manager_worker_id": "xM5V6", "with_units": true}
2025-11-14T17:53:38+01:00 info-2 trufflehog enumerating source {"source_manager_worker_id": "xM5V6"}
::warning file=tests/simple-frontend-pnpm/provisioning/dashboards/dashboard.json,line=101,endLine=101::Found unverified NpmToken result 🐷🔑
2025-11-14T17:53:38+01:00 info-0 trufflehog finished scanning {"chunks": 1451, "bytes": 8887046, "verified_secrets": 0, "unverified_secrets": 1, "scan_duration": "372.441833ms", "trufflehog_version": "3.91.0", "verification_caching": {"Hits":0,"Misses":1,"HitsWasted":0,"AttemptsSaved":0,"VerificationTimeSpentMS":289}}
2025-11-14T17:53:38+01:00 info-2 trufflehog exiting with code 183 because results were found
2025/11/14 17:53:38 [updater parent] prog exited with 183
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recently, we had a problem in the csp plugin with trufflehog returning an error in CI, but not giving us any more information.
Let's run the command with
--debugso that we get more information about the errors.