Skip to content

Conversation

@anaivanov
Copy link

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 --debug so that we get more information about the errors.

@CLAassistant
Copy link

CLAassistant commented Nov 12, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ xnyo
❌ anaivanov
You have signed the CLA already but the status is still pending? Let us recheck it.

@anaivanov anaivanov changed the title Add debug flag to Trufflehog run command chore: add debug flag to Trufflehog run command Nov 12, 2025
shell: bash
run: |
./bin/trufflehog filesystem "${FOLDER}" \
./bin/trufflehog filesystem "${FOLDER}" --debug \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would an example output be?

@grafana-plugins-platform-bot grafana-plugins-platform-bot bot moved this from 📬 Triage to 🔬 In review in Plugins Platform / Grafana Community Nov 12, 2025
@xnyo xnyo self-assigned this Nov 14, 2025
shell: bash
run: |
./bin/trufflehog filesystem "${FOLDER}" \
./bin/trufflehog filesystem "${FOLDER}" --debug \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

Labels

None yet

Projects

Status: 🔬 In review

Development

Successfully merging this pull request may close these issues.

4 participants