Agent Sandbox Containment Workflow
Layer 1 of the agent containment stack: every tool call executes in an ephemeral container, and any path outside the workspace is denied and logged as a security event.
Build, provenance and registry lanes: an artifact is only accepted when its attestation matches the build that produced it, and a hijacked repo sends it back to build.
Copy and paste the following FlowZap code into a project in your FlowZap account to see this template diagram.
build { # Build
n1: circle label:"Start"
n2: rectangle label:"Build from a hijacked repo"
n3: rectangle label:"Publish artifact and attestation"
n1.handle(right) -> n2.handle(left)
n2.handle(right) -> n3.handle(left)
n3.handle(bottom) -> provenance.n4.handle(top) [label="Artifact and attestation"]
}
provenance { # Provenance
n4: rectangle label:"Compare source, build and binary"
n5: diamond label:"Attestation matches"
n6: rectangle label:"Promote to production"
n7: circle label:"End"
n4.handle(right) -> n5.handle(left)
n5.handle(right) -> n6.handle(left) [label="yes"]
n6.handle(right) -> n7.handle(left)
n5.handle(bottom) -> registry.n8.handle(top) [label="no"]
}
registry { # Registry
n8: rectangle label:"Quarantine and alert"
n8.handle(bottom) -> build.n2.handle(bottom) [label="Back to build"]
}
Install the MCP packagenpm install -g flowzap-mcpMCP documentation
Layer 1 of the agent containment stack: every tool call executes in an ephemeral container, and any path outside the workspace is denied and logged as a security event.
Layer 2 of the agent containment stack: a permission gate checks the whitelist and path scope before execution, and aborts the call with a logged denial when the scope does not match.
Layer 3 of the agent containment stack: dangerous tool calls are suspended and sent to a human reviewer, who approves or aborts the operation before anything executes.
Layer 4 of the agent containment stack: arguments are sanitized, secrets stripped and the action trace written to the SIEM before execution continues.
The full containment stack in one diagram: sandbox, permission gate, HITL approval and SIEM audit applied in sequence around a single dangerous tool call.
Closing-proof workflow across detection, remediation and assurance: measure the fix rather than the reaction, rate the outage risk and refuse closure without evidence.