Skip to content
Detectors

Scanner deep dive

Generic

Slug: genericMaintainer view: off. Activate to show technical details for maintainers.

Overview

Generic secret key that may provide access to sensitive data or systems.
TruffleHog’s own description of this detector
Provider and detector details

Summary

ProviderNo provider details added yet.

  • Keyword + nearby pattern
  • Doesn’t verify
  • Unchanged since Sep 18, 2026
  • Source at 2325546

Runs on any connection. Triggered by keywords in the content, after decoding.How TruffleHog works

How detection works

The Generic detector looks for a single value in text that resembles a credential. It uses the word “pass” to narrow its search.

Matching rules and source
Keywords
  • pass
  • token
  • cred
  • secret
  • key

Regex

How it works

  1. Skips any text that doesn’t contain “pass”, “token” or “cred” (2 more). This keeps scanning fast.
  2. Looks for text matching its pattern.
  3. Reports each remaining match as a possible Generic credential. It isn’t known to work until it’s verified.
Regular expression near a keyword
One value
Guards against false matches
Not found in source
Not found in source

How it behaves

What this detector does at each step of the TruffleHog pipeline.

Keywords

Any one of these in the decoded text wakes the detector.

  • pass
  • token
  • cred
  • secret
  • key

generic.go line 52 (opens TruffleHog source on GitHub)

Behavior

Multi-part
No
Match window
512 bytes on each side of a keyword
ahocorasickcore.go line 159 (opens TruffleHog source on GitHub)
Custom endpoints
No
Cloud endpoint
None
Randomness check
None in this detector's own code
False-positive check
The shared word lists

Verification. This detector reports matches without calling the provider. Atlas only describes this; it never tests credentials. How the verify decision works

Analyzer.None in the open-source code.

In short

Wakes on “pass”, “token”, “cred”, “secret” or “key” and reports matches without testing them. A default scan skips it.

How verification works

This detector reports possible matches. This version has no follow-up check.

The detection and verification evidence on this page comes from the Open Source implementation. Check the Enterprise coverage guide for product availability.

Verification walkthrough
Errors, timeouts and rate limits
Not found in source
Not found in source

Read candidate findings

Open Source · Standard output (stdout)

The CLI prints candidate matches to stdout without a live check. Use --json for structured output.

Example scan output · credential redacted

Found unverified result 🐷🔑❓
Detector Type: Generic
Decoder Type: PLAIN
Raw result: [redacted]
Terminal printer source
CI formats

With --github-actions, GitHub Actions displays this workflow command as a warning on the indicated file and line.

::warning file=config/example.env,line=8,endLine=8::Found unverified Generic result 🐷🔑
GitHub Actions printer source

Legacy compatibility. --json-legacy writes pre-v3 JSON for Git, GitLab, and GitHub sources only.

Optional analysis

No analyzer is recorded for this detector, so Atlas shows no access assessment.

Rotation resources

Atlas has no rotation guide for this detector.

Token types

TruffleHog’s source doesn’t name a token type or require a fixed prefix for this detector.

The detector’s source links no vendor pages.

Coverage in other scanners

No confirmed matches in the available catalogs.

  • BetterleaksNo confirmed match
  • GitHub Secret ProtectionNo confirmed match
  • GitleaksNo confirmed match
  • KingfisherNo confirmed match

Changes

No changes to Generic since Sep 18, 2026, when Atlas started recording.

When TruffleHog changes this detector, the changed fields, the pull request and the source diff appear here for review.

Browse all changesSource history on GitHub

Source

Facts on this page were read from trufflesecurity/trufflehog at commit 2325546.

2325546
ad2f9a4