Skip to main content

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.

Code & CI
Updated

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 notifyOnRotation adds a follow-up notification when the secret is rotated, and heartbeatInterval sends heartbeats every 1, 2, 6, 12, or 24 hours.[7]

Detections, hunts, and triage

Triage a live leaked credentialTriage
When TruffleHog reports a Live secret, an agent lists every location it appears in, who committed it and when, and checks the provider's activity for use of the key before closing or escalating with the evidence attached.[4][6][7]
Hunt from a leaked GitHub tokenHunt
Cotool hunts start from a hypothesis, such as a stolen GitHub token used to clone private repositories, and test it against audit logs. A TruffleHog finding for a GitHub token gives that hunt a concrete credential and the repositories where it leaked.[3][7]
Alert on findings as they arriveDetection
Built-in detections run on ingested TruffleHog findings, and an agent investigates each alert they raise.[1][2]

Example query

Verify a TruffleHog webhook signaturebash
TOKEN="mySecretToken"
BODY='{"source_type":"SourceType_SOURCE_TYPE_GIT",...}'
echo -n "${TOKEN}${BODY}" | sha256sum
# Compare the output with the X-Hub-Signature header

With 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]

PermissionAccess
API Key ID and API Key SecretAuthenticate requests to the TruffleHog API for secrets, locations, and sources.[5]Read
Webhook notifier tokenSigns each webhook payload in the X-Hub-Signature header so the receiver can verify it came from TruffleHog.[7]Read
  • Webhook notifiers are a TruffleHog Enterprise feature. Of the notifiers TruffleHog lists, only stdout is available in the open-source version.[7][8]
  • Turn on notifyOnRotation so rotations arrive as follow-ups, and set a heartbeat interval so a quiet notifier can be told apart from a broken one.[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 Secret field next to the secret type, the Verified flag, 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

  1. Changelog (Cotool docs) · accessed November 22, 2026
  2. Detections are code (Cotool Detect) · accessed November 22, 2026
  3. Threat hunting (Cotool Hunt) · accessed November 22, 2026
  4. Respond to every signal (Cotool Respond) · accessed November 22, 2026
  5. User Enablement Guide (TruffleHog Docs) · accessed November 22, 2026
  6. Terminology (TruffleHog Docs) · accessed November 22, 2026
  7. Webhook notifier (TruffleHog Docs) · accessed November 22, 2026
  8. Notify results (TruffleHog Docs) · accessed November 22, 2026

Related integrations

All integrations

Use cases with TruffleHog

Related reading

Attackers are scaling with tokens

Cotool helps defenders operate at machine speed. See how security teams are scaling Detection & Response.

Book a demo