Run untrusted code.
Govern every byte it sends.
zeroness is a capability and identity mesh for Cloudflare Sandboxes. Code starts with zero network and zero secrets. You allow exactly what it needs with createGovernedSandbox, identity is injected at egress, and every crossing is logged.
Credentials live in the Broker and are injected at egress. Dump the filesystem and you get nothing reusable.
createGovernedSandbox gives the container no direct internet and routes every request through the Broker.
Every crossing is allowed, denied, or gated, and recorded with the identity that was used.
A control plane for code you did not write.
AI agents and user-submitted code need real compute. zeroness gives it to them without giving away your network or your keys.
What you build on top.
The same move every time: start the untrusted process with nothing, grant the minimum, keep the secret out of the box, log the boundary.
Three pieces. One boundary.
The sandbox runs the code. The Broker decides and holds every secret. The Egress Worker enforces. Nothing trusted sits next to the untrusted process.
Wrap the sandbox
createGovernedSandbox returns your container class with no direct internet and all HTTPS intercepted. One line, drop-in over @cloudflare/sandbox.
import { getSandbox, Sandbox as Base } from "@cloudflare/sandbox";
import { createGovernedSandbox } from "@zeroness/core";
export { ContainerProxy } from "@cloudflare/containers";
// no direct internet, all outbound HTTPS intercepted
export const Sandbox = createGovernedSandbox(Base);
Declare the policy
Default-deny, then allow the hosts you trust. Secrets stay in the Broker and become identity injected at egress, never handed to the box.
await registerGovernedSession(env.ZERONESS_BROKER, env.Sandbox, "user-1", {
policy: { default: "deny", allow: [
{ host: "api.github.com", methods: ["GET"] },
{ host: "api.stripe.com", identity: "cap:stripe" },
] },
resources: { stripe: { accessToken: env.STRIPE_RO } },
});
Run it, governed
Allowed hosts return 200 with brokered identity. Everything else is blocked by policy. Every crossing is audited.
$ curl https://api.github.com/repos/cloudflare/workers-sdk
200 allowed, identity injected at egress
$ curl https://api.stripe.com/v1/charges
403 zeroness: blocked by policy (default deny)
$ env | grep -i token
# nothing. the secret never enters the box.
Audit that plugs into your stack.
The Broker keeps a live, per-session trail you can query, and emits every event onto Cloudflare's own log pipeline. No logging code, no extra infrastructure.
- Workers Logs captures each line automatically, 7-day retention, filter on
zn = "audit". - Logpush ships the same events to R2, S3, Splunk, Datadog, or an HTTPS endpoint for durable, SIEM-ready retention.
- One config flag turns it on. The Durable Object
/auditAPI stays for interactive use.
// one structured line per event, captured by Workers Logs
{"zn": "audit", "event": "egress:deny",
"sid": "user-1", "detail": { "reason": "default deny" }}
// wrangler.jsonc: capture for 7 days, then push anywhere
"observability": { "enabled": true },
"logpush": true // -> R2 / S3 / Splunk / Datadog
Up in three commands.
The starter scaffolds the governed sandbox, the Broker, and a default-deny policy. Point it at your Cloudflare account and ship.
npm create zeroness@latest my-appcd my-app && pnpm installpnpm deploy