Skip to content
Detectors

Scanner deep dive

Generic

Slug: genericMaintainer view: on. Activate to switch to the plain view.

Overview

Generic secret key that may provide access to sensitive data or systems.
From the detector’s Description() in source
Provider and detector details

Summary

ProviderNo provider details added yet.

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

  • RegexkeyPatgeneric.go:56 (opens TruffleHog source on GitHub)Only code file

    (\b[\x21-\x7e]{16,64}\b)
    Show as a diagram

    Must appear near: “pass”, “token”, “cred”, “secret” or “key”

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.
Prefix regex
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.

pkg/detectors/generic · Scanner

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

No verification is implemented at this revision. The detector returns candidate matches.

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
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.

A missing analyzer is not evidence the credential has no further access.

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

Every fact on this page was parsed from trufflesecurity/trufflehog at 2325546, unless a row below says otherwise.

2325546
ad2f9a4
Parser
trufflehog-detectors-analyzers-v12
Extraction
intel-detector-v7

8 of 16 evidence rows need attention

Evidence rows that need attention
FieldStatusValueSource
lastSeenAt2026-11-25T16:33:44.855ZNo citation
rotationGuideNone extractedFile
verify.httpMethodsNone extractedFile
verify.statusCodesNone extractedFile
timeoutNone extractedFile
rateLimitNone extractedFile
errorHandlingNone extractedFile
verify.urlsNone extractedFile
All 16 evidence rows
All evidence rows
FieldStatusValueSource
descriptionGeneric secret key that may provide access to sensitive data or systems.File
keywordspass, token, cred, secret, keyFile
detectorTypesGenericFile
filesgeneric.goFile
patterns(\b[\x21-\x7e]{16,64}\b)File
patternTypeprefix_regexFile
statusactiveFile
lastSeenAt2026-11-25T16:33:44.855ZNo citation
rotationGuideNone extractedFile
verify.hasVerifyNoFile
verify.httpMethodsNone extractedFile
verify.statusCodesNone extractedFile
timeoutNone extractedFile
rateLimitNone extractedFile
errorHandlingNone extractedFile
verify.urlsNone extractedFile
Parser completeness
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Unknown
  • Field status: Unknown
  • Field status: Unknown
  • Field status: Unknown
  • Field status: Unknown
  • Field status: Unknown
  • Field status: Not scanned
Package files (1)
  • generic.go