by ekorondy · 1mo ago · 0 comments
gVisor vs a full VM is a real tradeoff. Most agent failures that actually hurt are not sandbox escapes. They are the agent acting as you with a coarse OAuth grant, or reading a secret that was sitting in the environment. A cheaper box does not fix that.
You still need an egress allowlist the guest cannot rewrite, credentials that never enter the guest, and a hard call budget per task. I would pay more for that broker layer than for another 2x cheaper sandbox.
Two questions: Could a policy layer like Box run inside your gVisor sandboxes, or would it need your full-VM tier? And on price, have you compared against AgentCore Runtime? It bills CPU only while active, which targets the same bursty pattern you’re optimizing for.
The awkward part is deciding how narrow to make those rules. An allowed endpoint can still do something you didn’t want. Are method/path restrictions enough for your use case?
The same POST /messages can mean "save a draft" or "send to the customer." The same invoice endpoint can list or charge. Host and method filters stop random hosts. They do not encode intent.
What I want on top is an effect class per call: read vs write vs irreversible. Irreversible stays human-gated or hits a hard deny. Everything else can keep a budget and an audit trail. Revoking the proxy session is good. Stopping a bad action that was still in policy is better.
Do you think it would make sense to add something like rules for JSON content for plain HTTP requests and argument rules for MCP tool calls?
Two things I'd watch. First, default-deny on fields the rule doesn't know about, so a new argument can't slip through. Second, let rules check values, not just whether a field is present. Amount over a limit, recipient outside an allowlist, an empty filter. That's where most of the "in policy but still wrong" actions live.
For MCP I'd also let the tool author tag each action as read, write, or irreversible, and treat anything untagged as irreversible. Then argument rules are the override, not the only line of defense.
I am actively working on exactly this. Once its ready, will post here on HN.