S07-11 - HTTP Policy
Purpose: The HTTP rules of inspected hosts, the built-in profiles, and the parts a user can turn off.
Design
Section titled “Design”HTTP policy
Section titled “HTTP policy”This page serves 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.. Rules match, in the OpenShell policy schema (S09-policy-credentials-auditS09-policy-credentials-audit: Policy, Credentials, Certificates and AuditWhere policy comes from, how secrets are held, how TLS inspection is trusted, and what is recorded.):
- method and path, per host. A WebSocket upgrade is matched as a
GETby its method and path, and its messages aren’t matched in V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there.. - GraphQL operation type and name, in the built-in profiles only. A
user or repository file with any
protocolbutrestis refused at load (S09-01-policy-filesS09-01-policy-files: Policy FilesWhere policy is written, the network policy schema Wraith Box accepts, how the prover sees it, and narrowing by program and project., “Implemented keys”).
Each inspected host enforces its rules by default. A host and port can
be set to audit while a new rule is tried out. Violations are then
logged but allowed (S07-07-hosts-and-modesS07-07-hosts-and-modes: Hosts and ModesHow wb-proxyd binds a stream to its name, which upstream addresses it refuses, and the inspect, pass and audit modes., “Modes, per host”).
The boundary check sees a host and port in audit as the whole host
on that port, every method and path. So it passes only when the
boundary allows every one (S09-01-policy-filesS09-01-policy-files: Policy FilesWhere policy is written, the network policy schema Wraith Box accepts, how the prover sees it, and narrowing by program and project., “Audit as the whole host”).
The built-in profiles are git hosting, model API and package registries.
Covered hosts
Section titled “Covered hosts”Each built-in profile covers these exact hosts, and no subdomain of them. A covered host is a guarded host (S07-07-hosts-and-modesS07-07-hosts-and-modes: Hosts and ModesHow wb-proxyd binds a stream to its name, which upstream addresses it refuses, and the inspect, pass and audit modes., “Guarded hosts”). “Covered only” means the profile doesn’t allow a request to it. The GraphQL path is the one the GraphQL lock protects (S09-02-precedenceS09-02-precedence: PrecedenceHow the policy sources merge, how the mode of each host and port resolves, and how the merge works for a VM with more than one project.).
| Host | Profile | Kind | Allowed | GraphQL path |
|---|---|---|---|---|
github.com |
git hosting | GitHub | yes | |
api.github.com |
git hosting | GitHub | yes | /graphql |
codeload.github.com |
git hosting | GitHub | yes | |
ssh.github.com |
git hosting | GitHub | covered only | |
gist.github.com |
git hosting | GitHub | yes | |
uploads.github.com |
git hosting | GitHub | yes | |
objects.githubusercontent.com |
git hosting | GitHub | yes | |
gitlab.com |
git hosting | GitLab | yes | /api/graphql |
altssh.gitlab.com |
git hosting | GitLab | covered only | |
codeberg.org |
git hosting | Gitea and Forgejo | yes | |
api.anthropic.com |
model API | yes | ||
platform.claude.com |
model API | yes | ||
registry.npmjs.org |
package registries | yes | ||
pypi.org |
package registries | yes | ||
files.pythonhosted.org |
package registries | yes | ||
crates.io |
package registries | yes | ||
static.crates.io |
package registries | yes | ||
index.crates.io |
package registries | yes | ||
proxy.golang.org |
package registries | yes | ||
sum.golang.org |
package registries | yes | ||
ghcr.io |
package registries | yes | ||
pkg-containers.githubusercontent.com |
package registries | yes | ||
formulae.brew.sh |
package registries | yes |
raw.githubusercontent.com isn’t covered. It is outside the model API
profile (“model API”), and no other profile in this table names it.
Whether to cover it is open (I560I560 (open): policy: cover raw.githubusercontent.com under the GitHub kind?Follow-up from the reviews of PR #559 (#488, the built-in host catalog).). A host a project’s remotes name
gets the git hosting profile too, so it is covered while that project
has a session in the VM.
git hosting
Section titled “git hosting”- Reads are allowed.
git-receive-packand mutating API calls are allowed only for the repositories of the projects with a session in the VM. Those come from each project’s host repository remotes, plus explicit additions. Any process in the VM can then write to them (T11-shared-vm-grantsT11-shared-vm-grants: Projects in one VM share network grantsThe host sees one guest address per VM, and can't tell which project user, session or program opened a connection.).- Gists, repository creation and forks are denied.
A write outside the project set is refused with
git-write-outside-project-set, and the gists, creation and fork
denies with git-create-denied (S07-19-request-decisionsS07-19-request-decisions: Request DecisionsHow wb-proxyd decides a request on an inspected host: the order of the steps, their rule names, what a git hosting write is, and what audit relaxes.).
GraphQL mutations are denied unless the operation name is allowlisted. This operation filter applies to every request to the GraphQL endpoint of a built-in host, whatever the source of the rule that allows it. A user or repository rule on that endpoint is a load error (S09-02-precedenceS09-02-precedence: PrecedenceHow the policy sources merge, how the mode of each host and port resolves, and how the merge works for a VM with more than one project.).
The prover can’t model GraphQL rules. The boundary check sees each one
as POST to its GraphQL path on its host. The boundary then limits
whether that endpoint is reachable, not which operations are allowed
(S09-04-boundary-checkS09-04-boundary-check: Boundary CheckThe check of a project's policy against the boundary policy with OpenShell's prover, and which policy it checks when., “Built-in profiles in the check”).
Git LFS isn’t in the profile, and fails in V1V1-initial: Initial versionThe first version: what it delivers, what it leaves out, and the milestones that get there. (S08-workspace-and-gitS08-workspace-and-git: Workspace and Git Round TripHow code gets into the guest and how the agent's work gets back out, without sharing the host filesystem., “Out of scope”).
The built-in kinds also name the hosts on which their forges serve
SSH on port 443: ssh.github.com for GitHub, and altssh.gitlab.com
for GitLab.
- The profile doesn’t allow a request to them, but it covers them. So they are guarded hosts (S07-07-hosts-and-modesS07-07-hosts-and-modes: Hosts and ModesHow wb-proxyd binds a stream to its name, which upstream addresses it refuses, and the inspect, pass and audit modes., “pass”).
- They can’t be pass hosts or have a raw TCP entry. So SSH to them always meets the first-byte check (S07-15-non-http-streamsS07-15-non-http-streams: Non-HTTP StreamsHow wb-proxyd checks the protocol of each stream, and what it does with SSH, other protocols and raw TCP., “SSH”).
model API
Section titled “model API”The profile holds the paths Claude Code 2.1.289 reached on two hosts
in 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?. The model credential binding covers four
paths of api.anthropic.com (S07-08-requests-and-credentialsS07-08-requests-and-credentials: Requests and CredentialsThe form of each request wb-proxyd sends upstream, and how it removes the guest's credentials and injects bound ones., “Named places”).
On api.anthropic.com:
| Path | What it is | Injection |
|---|---|---|
/v1/messages |
the model | yes |
/api/claude_code/policy_limits |
the organization’s limits | yes |
/api/claude_code/settings |
remote managed settings | yes |
/api/claude_cli/bootstrap |
yes | |
/api/eval/ |
feature flag evaluation | yes |
/mcp-registry/v0/servers |
the public MCP server registry | no |
/api/hello |
a reachability check | no |
The last two are allowed without injection, because Claude Code sent them no credential.
Claude Code reaches /api/eval/ only when
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC is unset in the guest
(S06-08-projects-and-sessionsS06-08-projects-and-sessions: Projects and Sessions Inside a VMHow projects map onto guest users and sessions onto worktrees, and how Claude Code runs in the guest., “Claude Code in the guest”). That was
so in the second pass of the C06-model-apiC06-model-api: Model APIThe test cases for the model credential: its placeholder, the scan for the placeholder in whole requests, what is injected on the model API, the event log, and Claude Code end to end. run. Its allow stays,
because that variable isn’t the control. Feature flags may change what
Claude Code does, and what it does without them wasn’t measured.
On platform.claude.com: /v1/oauth/hello, a reachability check of
the login host. The binding doesn’t cover it.
No policy file can allow a POST to a path that starts with the string
/v1/oauth/token on the profile’s hosts. Such a rule is a load error with the rule
model-token-path (S09-02-precedenceS09-02-precedence: PrecedenceHow the policy sources merge, how the mode of each host and port resolves, and how the merge works for a VM with more than one project., “The OAuth token paths”).
-
Event log denied.
/api/event_logging/onapi.anthropic.comis Anthropic’s event log. It receives the model credential and usage data. It is a built-in deny of the profile, logged with the rulemodel-event-log.- Like the archive deny, it holds whatever the guest sets, and whatever a policy file allows.
- It matches the canonical path.
- Built-in denies, this one included, are evaluated before any allow.
-
No percent-escapes. On the profile’s hosts,
api.anthropic.comandplatform.claude.com,wb-proxydrefuses a request whose path holds any percent-escape. It is logged with the rulemodel-path-escape. None of the paths Claude Code sent in 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? has one. This one rule closes encoded letters, either hex case,%2Fand double encoding around the event log deny. -
Outside the profile. These have no exact-path entry, and each is an unknown destination like any other host:
- Datadog’s log intake,
http-intake.logs.us5.datadoghq.com(S07-10-anonymous-credentialsS07-10-anonymous-credentials: Anonymous CredentialsHow wb-proxyd answers hosts that want a token even for public reads, without forwarding the guest's token., “Accepted gaps”); downloads.claude.ai, the updater and the plugin marketplace;raw.githubusercontent.com, the changelog.
The guest’s Claude Code is set not to ask for them (S06-08-projects-and-sessionsS06-08-projects-and-sessions: Projects and Sessions Inside a VMHow projects map onto guest users and sessions onto worktrees, and how Claude Code runs in the guest., “Claude Code in the guest”), but the profile is the control. The updater would fetch and run a binary past SEC07-dep-gateSEC07-dep-gate: Dependency gatePackage downloads (npm, PyPI, Go modules, crates) are refused when the version is younger than a minimum age or has a known vulnerability at or above a severity threshold..
raw.githubusercontent.comserves any file of any public repository. - Datadog’s log intake,
-
Methods. 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? recorded paths, not methods.
/v1/messagesand/api/eval/are allowed forPOST, the others forGETandHEAD. -
Parts. The profile has one part,
model, with every allow rule above.
package registries
Section titled “package registries”Metadata and downloads only. Publish and upload endpoints are denied.
- npm, PyPI, crates.io and the Go module proxy.
sum.golang.orgread-only:/lookup/,/latestand/tile/. The module proxy doesn’t serve the checksum database.- Homebrew bottles:
ghcr.ioonly for GET and HEAD of/v2/homebrew/core/..., with the anonymous binding (S07-10-anonymous-credentialsS07-10-anonymous-credentials: Anonymous CredentialsHow wb-proxyd answers hosts that want a token even for public reads, without forwarding the guest's token.), andghcr.io/tokendenied;pkg-containers.githubusercontent.comGET and HEAD only, because each bottle download redirects there with a signed query string (X22-no-guest-credentialsX22-no-guest-credentials: Clients without guest credentialsWhich 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?);formulae.brew.shread-only.
Every method other than GET, HEAD and OPTIONS on a registry host
is refused with registry-publish, whatever rule allows it. A request
to ghcr.io/token is refused with registry-token.
Deciding a request
Section titled “Deciding a request”wb-proxyd decides each request in the order of
S07-19-request-decisionsS07-19-request-decisions: Request DecisionsHow wb-proxyd decides a request on an inspected host: the order of the steps, their rule names, what a git hosting write is, and what audit relaxes..
Profile parts
Section titled “Profile parts”Each built-in profile is split into named parts. Every allow rule of a profile belongs to one part. All parts are on by default.
A built-in deny, such as the git hosting profile’s archive deny, belongs to no part. It applies whatever parts are on. Turning a part off therefore can’t remove a deny.
- Switches. The global policy and a project’s network policy turn a part off with a Wraith Box extension key. Repository configuration has no such key. A repository configuration rule on a built-in host whose part is off is a load error that names the part (NFR06-explained-refusalsNFR06-explained-refusals: OperabilityEvery refusal names the rule that caused it and how to change it.).
- Effect. A part that is off is not in the effective policy. The
requests put in the part (S07-19-request-decisionsS07-19-request-decisions: Request DecisionsHow wb-proxyd decides a request on an inspected host: the order of the steps, their rule names, what a git hosting write is, and what audit relaxes.) are refused,
whatever other rule allows them, from any project or approval.
- A request refused this way is logged with the rule
profile-part-off. - A host whose built-in rules are all in parts that are off is refused at DNS with the same rule, and no approval event (S07-04-dns-refusalsS07-04-dns-refusals: DNS RefusalsHow wb-netd refuses a name: approval events, the hold before each refusal, quiet refusals, and the answer that is the same for every reason.).
- A request refused this way is logged with the rule
- Bindings. A credential binding covers the hosts and paths of the
parts that are on, and nothing of a part that is off. With only
giton, the GitHub binding is injected into git’s transport and nowhere else. - What parts don’t change. These hold whatever parts are on:
- the removal of guest credentials in the places a profile names (S07-08-requests-and-credentialsS07-08-requests-and-credentials: Requests and CredentialsThe form of each request wb-proxyd sends upstream, and how it removes the guest's credentials and injects bound ones., “Credential replacement”);
- the lock on a built-in host’s kind, mode and rules (S09-02-precedenceS09-02-precedence: PrecedenceHow the policy sources merge, how the mode of each host and port resolves, and how the merge works for a VM with more than one project.).
- Per VM. A part is off in a VM when the global policy, or any project with a session in the VM, turns it off. Turning a part off is a limit, and the VM takes the strictest value of a limit (S07-01-per-vm-policyS07-01-per-vm-policy: Enforced per VMWhy the VM is the unit the gateway enforces, how the policies of its projects combine, and what happens when they conflict or change.). The result doesn’t depend on the order in which sessions started.
- Narrowing. Turning a part off only narrows. It needs no boundary check to pass (S07-01-per-vm-policyS07-01-per-vm-policy: Enforced per VMWhy the VM is the unit the gateway enforces, how the policies of its projects combine, and what happens when they conflict or change., “Policy changes while sessions run”). Turning a part back on widens. So does a session end that removes the last project that turned a part off (S07-01-per-vm-policyS07-01-per-vm-policy: Enforced per VMWhy the VM is the unit the gateway enforces, how the policies of its projects combine, and what happens when they conflict or change., “Session end”).
wb policy explain shows each part, whether it is on, and the policy
that turned it off. A request refused because its part is off names
the part and that policy (NFR06-explained-refusalsNFR06-explained-refusals: OperabilityEvery refusal names the rule that caused it and how to change it.).
GitHub parts
Section titled “GitHub parts”The GitHub kind of the git hosting profile has these parts:
| Part | Rules |
|---|---|
git |
git’s smart HTTP transport on github.com: the info/refs advertisement, and the git-upload-pack and git-receive-pack requests of a repository. So fetch, pull and push. Push stays limited to the repositories above. |
rest |
the REST API on api.github.com, and release asset uploads on uploads.github.com |
graphql |
the GraphQL API, POST api.github.com/graphql |
web |
reads of github.com and objects.githubusercontent.com |
With only git on, git can fetch, pull and push to github.com, and
every API request, REST and GraphQL, is refused.
Other parts
Section titled “Other parts”| Profile | Kind | Part | Rules |
|---|---|---|---|
| git hosting | GitLab | git |
git’s smart HTTP transport on gitlab.com |
| git hosting | GitLab | rest |
the REST API, /api/v4/ on gitlab.com |
| git hosting | GitLab | graphql |
the GraphQL API, POST gitlab.com/api/graphql |
| git hosting | GitLab | web |
every other rule of the GitLab kind |
| git hosting | Gitea and Forgejo | git |
git’s smart HTTP transport |
| git hosting | Gitea and Forgejo | rest |
the REST API, /api/v1/ |
| git hosting | Gitea and Forgejo | web |
every other rule of the kind |
| model API | model |
every allow rule of the profile | |
| package registries | npm |
registry.npmjs.org |
|
| package registries | pypi |
pypi.org and files.pythonhosted.org |
|
| package registries | crates |
crates.io, static.crates.io and index.crates.io |
|
| package registries | go |
proxy.golang.org and sum.golang.org |
|
| package registries | homebrew |
ghcr.io, pkg-containers.githubusercontent.com and formulae.brew.sh |
Gitea and Forgejo have no GraphQL API, so their kind has no graphql
part. In policy, a part is named by its profile (git-hosting,
model-api or package-registries), its kind (github, gitlab or
gitea, and none outside git hosting) and its name.
Decisions
Section titled “Decisions”The model API paths
Section titled “The model API paths”The model API profile lists the paths Claude Code reached in 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?.
- Decided: I60I60 (closed): X01-model-credential: API key mode via the proxySplit from #15 (X01-model-credential) during triage on 2026-10-04. (B60-model-credentialB60-model-credential: Can Claude Code in the guest hold only a placeholder while the proxy adds the real subscription token?Yes, for a long-lived token from claude setup-token.).
Profile parts
Section titled “Profile parts”Built-in profiles are split into parts a user can turn off, and turning a part off only narrows.
- Decided: I35I35 (closed): X24-openshell-artifacts: OpenShell artifactsX24-openshell-artifacts (added to S11-verification-and-spikes in #14) (B35-openshell-artifactsB35-openshell-artifacts: Do the OpenShell parts the specs reuse exist as assumed?Yes, with conditions.).
Status: Draft