Skip to content

S07-11 - HTTP Policy

Purpose: The HTTP rules of inspected hosts, the built-in profiles, and the parts a user can turn off.

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.):

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.

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.

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 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”).

Metadata and downloads only. Publish and upload endpoints are denied.

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.

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..

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.

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.).

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.

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.

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?.

Built-in profiles are split into parts a user can turn off, and turning a part off only narrows.

Status: Draft