Cotool + TruffleHog
Connect TruffleHog Enterprise to Cotool so agents investigate leaked credentials, where each one appears, and whether it is still live, with findings ingested.
The short answer
TruffleHog Enterprise scans sources such as GitHub, Slack, Jira, and S3 for credentials, tests whether each one still works, and records every place it was found. Cotool added TruffleHog in release 0.76.0 with managed log ingestion and built-in detections, so a leaked key becomes an alert that an agent investigates.[1][2][6]
How it connects: Two paths carry TruffleHog data. Agents query the TruffleHog API with an API Key ID and API Key Secret generated in the web app, and findings arrive through a TruffleHog webhook notifier, which POSTs each newly found secret to an HTTPS URL and can sign the payload with a token.[1][5][7]
What Cotool uses from TruffleHog
- Secrets
- Each secret has a type from the detector that found it, a verification result, and a triage state. TruffleHog marks a secret Live when a safe, read-only call to the provider confirmed it works, and Rotated/Deactivated when a once-live secret later failed verification.[5][6]
- Secret locations
- Where a secret appears. For a Git source, TruffleHog's example payload names the repository, file, line, commit, link, commit timestamp, and commit email.[7]
- Sources and scanners
- Sources are the integrations TruffleHog scans, configured in a local file or the web UI. Scanners do the scanning and verification, either hosted by Truffle Security in an isolated tenant environment or self-hosted in your network.[6]
- Webhook findings
- A webhook notifier sends a POST for each new secret. Setting
notifyOnRotationadds a follow-up notification when the secret is rotated, andheartbeatIntervalsends heartbeats every 1, 2, 6, 12, or 24 hours.[7]
Detections, hunts, and triage
Example query
TOKEN="mySecretToken"
BODY='{"source_type":"SourceType_SOURCE_TYPE_GIT",...}'
echo -n "${TOKEN}${BODY}" | sha256sum
# Compare the output with the X-Hub-Signature headerWith the default sha256 method, the signature is a SHA-256 hash of the token followed by the raw request body. Use the exact bytes received, and reject payloads whose hash doesn't match the header.[7]
Setup and permissions
In TruffleHog, open Settings > API Keys, click Generate API Key, name the key, choose an expiration (Never, 1 day, 7 days, 3 months, or 1 year), and copy the API Key ID and API Key Secret before closing the dialog.[5]
| Permission | Access | Why |
|---|---|---|
| API Key ID and API Key SecretAuthenticate requests to the TruffleHog API for secrets, locations, and sources.[5] | Read | Authenticate requests to the TruffleHog API for secrets, locations, and sources.[5] |
| Webhook notifier tokenSigns each webhook payload in the X-Hub-Signature header so the receiver can verify it came from TruffleHog.[7] | Read | Signs each webhook payload in the X-Hub-Signature header so the receiver can verify it came from TruffleHog.[7] |
How Cotool works with TruffleHog
- Cotool added TruffleHog in release 0.76.0, alongside Vercel, Jamf Pro, Material Security, and Zoom, each with managed log ingestion and built-in detections.[1]
- Cotool detections are Python code. Agents investigate every alert they raise, and each verdict feeds back into the detection that fired it.[2]
- When a Cotool hunt returns findings, the agent backtests and ships a new detection so the same pattern is covered next time.[3]
FAQ
- Does a TruffleHog webhook payload contain the secret itself?
- Yes. TruffleHog's example webhook payload includes a
Secretfield next to the secret type, theVerifiedflag, and the source metadata. Treat the receiving endpoint as sensitive and sign payloads with a token.[7] - What is the difference between Live and Rotated secrets in TruffleHog?
- A Live secret was verified as active. A Rotated/Deactivated secret was verified as live at one point and has since been verified as not live, while Not Live means it was tested and never verified.[6]
Sources
- Changelog (Cotool docs) · accessed November 22, 2026
- Detections are code (Cotool Detect) · accessed November 22, 2026
- Threat hunting (Cotool Hunt) · accessed November 22, 2026
- Respond to every signal (Cotool Respond) · accessed November 22, 2026
- User Enablement Guide (TruffleHog Docs) · accessed November 22, 2026
- Terminology (TruffleHog Docs) · accessed November 22, 2026
- Webhook notifier (TruffleHog Docs) · accessed November 22, 2026
- Notify results (TruffleHog Docs) · accessed November 22, 2026


