redact-proxy pre-release
Docs menu

Value types

A value the proxy finds is replaced in one of two ways. Most become a typed marker that holds nothing of the value. Certificates and keys, which programs parse and check, become a working stand-in.

Markers#

format
__redacted_<type>_<32 hex>__

__redacted_apikey_8eb80264f15a26eaa6875de564eb49e1__
__redacted_hostname_1ab0c5889561f6997bec59dc32aaf918__

The types#

TypeCoversIn the sandbox
passwordValues under password-like keys, the password in URL userinfo, the password field of a connection stringMarker
passwordhashPassword hashesMarker
privatekeyPEM, OpenSSH and PGP private keysMarker; a key in the same file as its client certificate gets a dummy key
publickeyPublic keysMarker
apikeyProvider API keys, by format (vendored gitleaks rules)Marker
tokenTokens by format or key-name context, long cookies, kubeconfig tokensMarker
jwtJSON Web TokensMarker for the whole token
certificateX.509 certificatesCA certificate: the proxy CA. Client certificate with its key in the same file: a dummy certificate. Otherwise a marker.
ipIP addressesMarker
hostnameInternal hostnames (*.svc.cluster.local, internal, corp, names learned at runtime)Marker
email, phone, card, iban, nationalidPersonal dataMarker, never put back
name, addressPersonal data, reserved: no detector emits these yetDeclare such strings yourself
declaredYour own exact strings: codenames, customer names, anything no detector could knowMarker

Stand-ins#

A program in the sandbox that loads a certificate or checks that a key matches it fails on a marker. Only real objects pass, so the scrub writes real objects that aren't yours:

A stand-in is written only where the file stays valid: base64-encoded where the value was base64, escaped inside a JSON string, as-is where the value was a line of its own (a PEM file). In an indented YAML block the marker stays.

Not stand-ins

A certificate and key in separate files (client-certificate: and client-key: paths) get no stand-in; they stay markers. IPs, hostnames and passwords are markers too, not format-preserving: a tool that parses an IP address gets a marker and breaks. Format-preserving stand-ins for them are not built.

How each kind is handled#

API keys and tokens#

Found by format (gitleaks rules) and by context (key names such as token or secret, JSON keys, environment variable names). Put back per the rules. A provider rule binds some keys to their provider's host, for example a GitHub token to github.com, a Stripe key to api.stripe.com, an OpenAI key to api.openai.com. In paranoid mode, a token a host returns is put back only toward that host.

Passwords and connection strings#

JWTs#

The whole token is one marker. It can't be decoded inside the sandbox.

Private keys#

PEM, OpenSSH and PGP blocks become markers, put back by the same rules as other markers. SSH keys you give with -ssh-key never enter the sandbox; they stay in the proxy and are usable through the agent's ssh-agent socket. A key alone in a file, with no certificate beside it, stays a marker.

IP addresses and hostnames#

IP addresses (IPv4 and IPv6, not version numbers) and internal hostnames become markers. A hostname or IP marker still works as an address: it resolves through the sinkhole, and the gateway connects to the real host. A kubeconfig's server becomes https://<marker>:6443. Public hostnames aren't secrets and stay as they are.

Base64 and other encodings#

Cookies#

A Set-Cookie value of 16 characters or more becomes a token marker. In paranoid mode it is put back only toward the host that set it, in the auth position; in default mode it resolves toward any allowlisted host, like any other marker.

Personal data#

Emails, phone numbers, card numbers, IBANs and national IDs become markers and are never put back to any host. Names and postal addresses have marker types but no detector yet; declare the ones that matter. A tool result with more personal-data values than the proxy's -dump-limit (default 50) is withheld.

Git output#

Every email in git's output is redacted, authors' included. Tracked secret files are read-only for the agent. See Git.

Declared secrets#

Exact, case-sensitive strings you name yourself, for values no detector could know. The proxy reads them with -declared-file, and redactproxy discover -out writes such a file. redactproxy launch does not take a declared-secrets file yet.