What this change means
Credential parts changed, Pairing logic changed. Changes how the detector verifies or what it treats as the credential.
Scanner deep dive
The Dockerhub detector looks for pieces of a credential that belong together. The code names fields such as “pat” and “username”.
ProviderNo provider details added yet.
Runs on any connection. Triggered by keywords in the content, after decoding.How TruffleHog works
Docker is a platform used to develop, ship, and run applications. Docker access tokens can be used to authenticate and interact with Docker services. Dockerhub is a cloud-based repository in which Docker users and partners create, test, store and distribute container images. Dockerhub personal access tokens (PATs) can be used to access and manage these container images.
The v1 detector checks decoded text containing “docker” for a possible credential.
v1 regex 1dockerhub.go:32 (opens TruffleHog source on GitHub)
(?im)(?:user|usr|-u|id)\S{0,40}?[:=\s]{1,3}[ '"=]?([a-zA-Z0-9]{4,40})\bMust appear near: “docker”
v1 regex 2dockerhub.go:36 (opens TruffleHog source on GitHub)
\b([a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12})\bMust appear near: “docker”
v1 regex 3dockerhub.go:36 (opens TruffleHog source on GitHub)
\b([a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12})\bMust appear near: “docker”
| v1v1/dockerhub.go | v2v2/dockerhub.go | |
|---|---|---|
| Keywords |
|
|
| Regexes |
|
|
v1 regex 1dockerhub.go:32 (opens TruffleHog source on GitHub)
(?im)(?:user|usr|-u|id)\S{0,40}?[:=\s]{1,3}[ '"=]?([a-zA-Z0-9]{4,40})\bMust appear near: “docker”
v1 regex 2dockerhub.go:36 (opens TruffleHog source on GitHub)
\b([a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12})\bMust appear near: “docker”
v1 regex 3dockerhub.go:36 (opens TruffleHog source on GitHub)
\b([a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12})\bMust appear near: “docker”
Used by more than one variant, or not tied to one variant’s files in what was read from source.
Regex
\b((?i)(?:[a-z0-9!#$%&'*+/=?^_\x60{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_\x60{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\]))\bMust appear near: “docker”
What this detector does at each step of the TruffleHog pipeline.
Any one of these in the decoded text wakes the detector.
Verification. When a scan allows it, TruffleHog tests a match by calling the provider. A scan can turn this off for every detector or for this one. Atlas only describes this; it never tests credentials. How the verify decision works
Analyzer.Dockerhub Analyzer
Each variant checks a found key its own way. Compare their requests and how answers are judged below.
The detection and verification evidence on this page comes from the Open Source implementation. Check the Enterprise coverage guide for product availability.
Probably not, but not certain: the source declares no changes, and many checks use POST only to read. POST can change data, so check the source if it matters.
| v1v1/dockerhub.go | v2v2/dockerhub.go | |
|---|---|---|
| Request | POSThttps://hub.docker.com/v2/users/logindockerhub.go:111 (opens TruffleHog source on GitHub) | POSThttps://hub.docker.com/v2/auth/tokendockerhub.go:111 (opens TruffleHog source on GitHub) |
| Key is sent as | JSON token field | JSON secret fielddockerhub.go:109 (opens TruffleHog source on GitHub) |
| How answers are judged |
If a result looks wrong, work through these steps. They’re built from the request and status rules above. The Atlas doesn’t send anything.
Each variant checks keys its own way. Use the one that matches your key’s format (see Detection above).
No command for this check. The key goes in a request body whose other fields aren't recorded here.
No command for this check. The key goes in a request body whose other fields aren't recorded here.
No provider doc recorded for this check yet. Look up the API docs for hub.docker.com and compare what they say each status means.
Include the status code and response you got. Never include the key.
The CLI prints verified findings to stdout. Use --json for structured output.
Example scan output · credential redacted
✅ Found verified result 🐷🔑
Detector Type: Dockerhub
Decoder Type: PLAIN
Raw result: [redacted]Terminal printer sourceWith --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 verified Dockerhub result 🐷🔑GitHub Actions printer sourceLegacy compatibility. --json-legacy writes pre-v3 JSON for Git, GitLab, and GitHub sources only.
When Enterprise verifies that a secret is live, a configured notifier can alert your team. The finding is also available through the Enterprise API.
Optional analysis
In Open Source, run trufflehog analyze separately from the scan. Enterprise runs enabled self-discovery analyzers on first discovery of a supported live secret.
Reads the scope claim from the login JWT and binds the highest-ranked one to each repository.
4 permission names in source
Alert delivery has no documented ordering relative to analysis. How Analyze runs.
Use the provider’s instructions for this credential.
Revocation instructions
Docker Hub documents personal and organization access tokens separately. Each can be deactivated or deleted from its own settings. Use the instructions for the token owner.
Provider documentation checked by Atlas on .
TruffleHog’s source doesn’t name a token type or require a fixed prefix for this detector.
Written in the detector’s source by its authors. Shown as written: this doesn’t say what each page covers.
3 scanners have a confirmed match.
docker_organization_access_tokenPush protection yes · Validity check nodocker_personal_access_tokenPush protection yes · Validity check no1 recorded change since Sep 18, 2026; 1 still needs review.
Credential parts changed, Pairing logic changed. Changes how the detector verifies or what it treats as the credential.
Facts on this page were read from trufflesecurity/trufflehog at commit 2325546.