Skip to content

X22 - Clients without guest credentials

Purpose: The result of the spike for I33I33 (closed): X22-no-guest-credentials: Clients without guest credentialsX22-no-guest-credentials (added to S11-verification-and-spikes in #14). Which common clients break when wb-proxyd removes every credential the guest sends on an inspected host, and which rule fixes them without letting an attacker’s own token through?

Requirements: SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential., SEC06-repo-writesSEC06-repo-writes: Repository-scoped writesGit pushes and repository-mutating API calls are allowed only for the repositories of the projects that have a session in the VM., FR07-toolchain-manifestFR07-toolchain-manifest: Declared toolchainA project's toolchain is declared host-side (on macOS guests, a Brewfile) and reconciled automatically before a session starts., FR08-no-proxy-configFR08-no-proxy-config: No per-tool proxy settingsAllowlisted network destinations work for every tool without per-tool proxy configuration.

Brief: B33-no-guest-credentialsB33-no-guest-credentials: Can the proxy drop every credential the guest sends without breaking its tools?Yes, with conditions.

From X00-indexX00-index: SpikesThe open questions that must be answered by a throwaway prototype before work builds on them, in the order they are taken up.: which common clients (Homebrew against ghcr.io, git, gh, npm, pip, uv, SwiftPM, Go, cargo, Claude Code) break when wb-proxyd removes every guest-supplied Authorization header and cookie on inspected hosts? Registries such as ghcr.io hand out anonymous tokens that the client must send back. Find a rule for those that keeps SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential. and SEC06-repo-writesSEC06-repo-writes: Repository-scoped writesGit pushes and repository-mutating API calls are allowed only for the repositories of the projects that have a session in the VM..

Yes, with conditions. Of the 10 read clients measured, removing every guest credential breaks one, Homebrew. A host-side anonymous binding fixes it, together with pkg-containers.githubusercontent.com in the profile for the bottle redirect. The fix doesn’t forward any value the guest sent.

Client Read operations run Breaks when guest credentials are removed? Why
Homebrew brew fetch of two bottles yes brew sends Authorization: Bearer QQ== to ghcr.io and never runs the token flow. Without it, ghcr.io answers 401.
git git clone over HTTPS no doesn’t send a credential to a public repository
git LFS clone of a repository with four LFS objects no the download addresses are presigned: the credential is in the query string, which the server issued
gh gh api, gh release view no gh refuses to start without a token. With a placeholder token, removing it gives anonymous reads. Forwarding it gives 401.
npm npm view, npm install no sends a configured token, and the registry answers reads without it
pip pip download no same, with index URL credentials
uv uv pip install no same
Go go mod download, through GOPROXY and HTTPS_PROXY no doesn’t send a credential to the module proxy or the checksum database
cargo cargo fetch no doesn’t send a credential for reads
SwiftPM swift package resolve no resolves through git, which sends none
Claude Code claude -p with a placeholder API key not measured the model API always has a binding (X01-model-credentialX01-model-credential: Model credential via the proxyDoes Claude Code work with a placeholder credential while wb-proxyd injects the real one, for each supported authentication mode, including token refresh?). Without one, the removed key gives “Invalid API key” at once, so it ran only under two rules.

gh without any token, and a push with a fake token, fail under every rule, so they say nothing about the rules.

The rule: on an inspected host, wb-proxyd removes Authorization, Proxy-Authorization and Cookie, and every further header that the host’s built-in profile names. It refuses a request with a parameter the profile names as a credential, in the query string or in a form or top-level JSON body. Then it injects the binding’s value, if the host has a binding. A binding may hold a fixed public value instead of a secret, and the package registries profile has one: Authorization: Bearer QQ== on reads of ghcr.io /v2/homebrew/core/.

The spike ran on 2026-10-05 with a throwaway inspecting proxy on localhost and a CA trusted only by each client process, under five rules, against the public services and with no account. Every client ran twice: once as installed, and once with a fake token configured the way a guest holds a placeholder (npm _authToken, pip and uv index URL credentials, GH_TOKEN, .netrc, git URL credentials, CARGO_REGISTRY_TOKEN, HOMEBREW_GITHUB_API_TOKEN).

Client Remove all Remove on writes only Pass issued tokens Inject, fixed token Inject, token flow
Homebrew fail pass fail pass pass
Registry token flow, as docker or oras run it fail pass pass pass pass
gh with a placeholder token pass fail pass pass pass
git, git LFS, npm, pip, uv, Go, cargo, SwiftPM, with or without a placeholder pass pass pass pass pass
  • Remove on writes only: forward guest credentials on GET and HEAD. It forwarded the placeholder gh holds, and GitHub answered 401 “Bad credentials”. It also forwarded the attacker’s token on every GET in the attack script, including a GET to ghcr.io/token with Basic credentials. On ghcr.io that request is how a client asks for a push token, so a GET is not always harmless.
  • Pass issued tokens: forward a bearer token only if the proxy saw the host’s token endpoint issue it, in this session, to a request the proxy had stripped of credentials. It fixed the clients that run the token flow. Homebrew never asks for a token and still failed. It needs the proxy to read token responses and keep per-session state.
  • Inject: both variants passed with all 10 read clients and the token-flow script, and the proxy forwarded none of the guest’s values. With the binding, a client that runs the token flow gets 200 on its first request.
  • No client sent a Cookie header under any rule. The npm registry set Cloudflare cookies (__cf_bm, _cfuvid), and npm didn’t send them back.
  • Claude Code also sent a DD-API-KEY header to Datadog’s log intake. That key is built into Claude Code and is the same for every user. The intake host stays out of the model API profile, so it’s an unknown destination like any other.

The attack script sent a token of its own on writes. The token was fake, so upstream refused it under every rule. The table shows whether the proxy forwarded it.

Request Remove all Writes only Issued Inject
POST api.github.com/user/repos, /gists, /graphql removed removed removed removed
GET api.github.com/user removed forwarded removed removed
GET ghcr.io/token with Basic credentials removed forwarded removed removed
POST a blob upload to ghcr.io removed removed removed removed, or refused on homebrew/core
PUT to registry.npmjs.org, POST to upload.pypi.org removed removed removed removed
x-api-key to api.anthropic.com removed removed removed removed
Cookie on github.com removed forwarded removed removed
An issued anonymous token, then a POST blob upload removed removed removed refused on homebrew/core

Probed with a fake token and no account. A host that reads the value answers 401, and one that ignores it gives the anonymous answer.

Host Header or parameter Answer
api.github.com Authorization 401
api.github.com ?access_token= 400, refused by GitHub
gitlab.com Authorization, PRIVATE-TOKEN 401
gitlab.com ?private_token=, ?access_token= 401
gitlab.com JOB-TOKEN 200
registry.npmjs.org ?token= 200

Added in the review of PR85PR85 (merged): docs(spike): X22-no-guest-credentials resultResult of the X22-no-guest-credentials spike (#33)., with review-probe.sh:

Host Header or parameter Answer
gitlab.com/api/graphql private_token in a form body, or as a top-level JSON key 401
gitlab.com ?private%5Ftoken= 401
gitlab.com ?PRIVATE_TOKEN= 200, names are case-sensitive
gitlab.com ?job_token=, Deploy-Token on a project read 200
codeberg.org (Forgejo) ?token=, ?access_token=, Authorization: token 401

GitLab reads a token from the query string and the body, so a rule that only removes headers would let an attacker’s GitLab token through. GitLab’s source also reads job_token and Deploy-Token on the endpoints that accept them, which a project read doesn’t show. Removing every credential-looking query parameter on every host is no answer either: the LFS and ghcr.io download addresses have token, sig and X-Amz-Signature parameters, and those must pass. So each built-in profile names the parameters its hosts read, and the rule refuses only those. wb-proxyd can’t tell a server’s signature from one the guest computed for its own bucket, so the approval risk check flags shared object-storage hosts instead.

Branch spike/x22-no-guest-credentials, commit 82e4c9f: the proxy, the harness, the probes (including the review probe), and the raw tables.

Status: Answered 2026-10-05: yes, with conditions