Docker Registry Credentials (config.json auths)
Detects container-registry credentials stored inline in a Docker client config.json (~/.docker/config.json), or in the same JSON once decoded from a Kubernetes kubernetes.io/dockerconfigjson pull secret. When no credential store is configured, docker login writes each registry's username and password to the auths object as one base64 string (auth), and may store an identitytoken or registrytoken. Base64 is an encoding, not encryption, so anyone holding the file can push and pull images as that account.
- Type
- regex
- Engine
- boost_regex
- Confidence
- medium
- Confidence justification
- Medium confidence. The auths/auth structure and its base64 encoding come from the Docker CLI source and the Kubernetes documentation, and the nesting is distinctive, but "auth" is a common JSON key and a base64 run has no checksum, so the value cannot be validated and a rotated or sample credential looks the same as a live one. Enforce tiers therefore require the enclosing auths object.
- Jurisdictions
- global
- Regulations
- Criminal Code Act 1995 (Cth), Computer Fraud and Abuse Act, Computer Misuse Act 1990
- Frameworks
- CIS Controls, ISO 27001, NIST CSF, SOC 2
- Data categories
- credentials, security
- Scope
- narrow
- Risk rating
- 8
- Platform compatibility
- Purview: Compatible, GCP DLP: Compatible, Macie: Compatible, Zscaler: Compatible, CrowdStrike DLP: Compatible, Palo Alto: Adapted from Purview, Netskope: Adapted from Purview
Pattern
(?-i)("auth"\s*:\s*"[A-Za-z0-9+/]{12,}={0,2}")
Corroborative evidence keywords
auths, docker login, config.json, dockerconfigjson, credsStore, registry
Proximity: 300 characters
Should match
"auth": "ZGVwbG95Ym90OkFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaMDEyMzQ1"— Exact 65 probe - auth key with a base64 value and no auths object{ "auths": { "registry.internal.corp:5000": { "auth": "ZGVwbG95Ym90OkFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaMDEyMzQ1" } } }— Exact 75 probe - pretty-printed config.json for a private registry{ "auths": { "https://index.docker.io/v1/": { "auth": "Y2ktcnVubmVyOjAxMjM0NTY3ODlBQkNERUZHSElK" } } }— Exact 85 probe - tab-indented config.json with the Docker Hub registry key{"auths":{"ghcr.io":{"username":"svc-build","password":"abcdefghijklmnopqrstuvwxyz0123456789","auth":"c3ZjLWJ1aWxkOmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OQ=="}}}— Exact 85 probe - compact JSON as decoded from a Kubernetes .dockerconfigjson secret{ "auths": { "registry.internal.corp": { "auth": "ZGVwbG95Ym90OkFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaMDEyMzQ1" }, "mirror.internal.corp": { "auth": "Y2ktcnVubmVyOjAxMjM0NTY3ODlBQkNERUZHSElK" } } }— Exact 85 probe - two distinct auth entries in one file{ "auths": { "registry.internal.corp": { "identitytoken": "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" } } }— Exact 75 probe - identity token stored in place of a username and password
Should not match
{"auths": {"https://index.docker.io/v1/": {}}, "credsStore": "desktop"}— Credential-store configuration - the auths entry is empty and the secret is in the OS keychain{"credHelpers": {"registry.internal.corp": "secretservice"}}— Credential-helper configuration with no inline credential{"auths": {"https://index.docker.io/v1/": {"auth": "c3R...zE2"}}}— Truncated value as printed in the Kubernetes documentation{"auths": {"registry.internal.corp": {"auth": "<base64 of username:password>"}}}— Placeholder in place of the encoded credential{"transport": {"auth": "c2VydmljZTpBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWg=="}}— An auth key outside an auths object (discovery only)Documentation example: {"auths": {"https://index.docker.io/v1/": {"auth": "ZGVwbG95Ym90OkFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaMDEyMzQ1"}}}— Complete config with registry context, vetoed on every tier by the documentation-example framingRun docker login so the auths section of config.json is populated.— Prose that names the structure without a value
Known false positives
- Documentation and tutorials that show a config.json with an invented but well-formed base64 value, such as the encoding of user:password. Mitigation: The shared template exclusion vetoes documentation framing; truncated and angle-bracket placeholders do not match the base64 class. Decode remaining hits to confirm the account.
- Other JSON documents that use an "auth" key for a base64 value outside a Docker configuration. Mitigation: Those reach only the discovery tier. Enforce tiers require an "auths" object opening nearby.
- Config files whose registry password or token has since been rotated or expired (cloud registry tokens are short-lived). Mitigation: The pattern cannot test liveness. Treat a match as a credential to rotate and move to a credential store.
References
- Docker docs, docker login (without a credential store, credentials are stored base64-encoded in $HOME/.docker/config.json; credsStore and credHelpers)
- docker/cli source, AuthConfig (JSON keys username, password, auth, serveraddress, identitytoken, registrytoken)
- docker/cli source, ConfigFile (the auths key; auth is standard base64 of username:password)
- Kubernetes docs, Pull an Image from a Private Registry (config.json auths example; .dockerconfigjson decodes to the same JSON)
- StepSecurity, ChainDrop npm worm, 4 August 2026 (lists ~/.docker/config.json among the credential files harvested)