docker canary injects a fake registry entry into ~/.docker/config.json with a credHelpers mapping pointing to a non-existent credential helper. When Docker attempts to authenticate against the fake registry hostname — via docker pull, docker login, or programmatic registry access — it triggers the Snare callback.
What gets planted
~/.docker/config.json
Reliability: Medium
Fires when an agent attempts todocker pull or docker login to the specific fake registry hostname. Agents that enumerate ~/.docker/config.json and attempt to authenticate with listed registries will trigger this.
Agents that only use Docker locally (without pulling from this specific registry) won’t fire it.
Trigger conditions
- Agent runs
docker pull registry.acme-internal.io/<any-image> - Agent runs
docker login registry.acme-internal.io - Programmatic Docker client (Python
dockerSDK, Go Docker client) authenticates against the fake hostname - Agent enumerates
credHelpersand attempts to resolve credentials for each configured registry
False positives
Near-zero. The fake registry hostname is generated to be implausible. Nothing in your normal Docker workflow would legitimately targetregistry.acme-internal.io.
If you have existing entries in ~/.docker/config.json, Snare merges the new key into credHelpers without overwriting the rest of your config.
Plant
Teardown
credHelpers key from ~/.docker/config.json. Does not touch other Docker config entries.