This keeps happening
AUG 2025 · NX
Malicious Nx releases on npm made local AI coding CLIs hunt for secrets, then posted them to public GitHub repos.
sourceMAR 2026 · GITGUARDIAN
28.6M new secrets leaked on public GitHub in 2025; Claude Code co-authored commits leaked at about twice the base rate.
sourceAUG 2026 · ZENITY LABS
Copycat agent skills on the skills.sh registry were later changed to make agents collect SSH keys and cloud credentials.
sourceNOV 2026 · GITGUARDIAN
Claude Code keeps approved commands, inline secrets included, in a local file. Many of those files ended up on GitHub.
sourceOCT 2025 · LEGIT SECURITY
Hidden text in a pull request could make GitHub Copilot Chat leak secrets and private code. Since fixed.
sourceJUL 2025 · TRACEBIT
A poisoned README could make Gemini CLI silently send the user's environment variables to a server. Since fixed.
sourceNOV 2025 · PROMPTARMOR
Hidden text on a web page could steer Google's Antigravity agent into reading .env and sending the credentials out.
sourceMAY 2025 · INVARIANT LABS
A planted public issue could steer an agent using GitHub's MCP server into leaking private repo data into a public PR.
sourceJAN 2025 · WIZ RESEARCH
DeepSeek left a database open to the internet with over a million log lines, including chat history and API keys.
sourceMAY 2025 · OPENAI
A US court made OpenAI keep ChatGPT and API output logs, deleted chats included, from May to late September 2025.
source
Public reports. Links go to the sources.
redact-proxy lets it use them without seeing them. So you can let it run.
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.
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.
- 01 · before the session
Scrub into an overlay
Secret files, the
-env-fileand mounted credential files get marker copies and stand-ins. The real values go into the proxy's encrypted store. - 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.
- 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.
- 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.
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 →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 →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 →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.
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 →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.
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 →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 →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_tokensincluded. 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;
passthroughhosts 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.
-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.
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# 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