Skip to main content

Layer 8 · place

sandbox

blocks/8-place/sandbox.yaml

layer 8place
1entity
5commands
2events
1view
11refusals
5KPIs

What a workload can reach: an isolation level, the paths it may write, the hosts and ports it may connect to, and the secrets it may read, by name only. Default deny: a reach no rule names is refused. A secret's value is never part of the contract.

Depends on​

  • shared · layer 0 · 4 references

Used by​

  • runtime · layer 8 · 6 references

Entities​

Sandbox​

One set of reach rules a workload runs under.

Identified by sandbox_id (SandboxId).

fieldtype
isolationIsolationLevel
writable_pathslist of Path
egresslist of EgressRule
secret_grantslist of SecretName

Lifecycle of Sandbox

ActiveRetiredretireActiveRetiredretire
Ends in Retired.

Commands​

CheckEgress​

Check an egress.

Called by: Enforcer.

fieldtype
sandbox_idSandboxId
hostHost
portinteger
outcomewhenresult
unknown refusedno such SandboxUnknownSandbox: No sandbox has this identity.
retired refusedstate == RetiredSandboxIsRetired: The sandbox is retired; it allows nothing.
denied refusednot (some r in egress with r.host == input.host and r.port == input.port)EgressDenied: No egress rule names this host and port.
allowedotherwiseleaves the Sandbox as it is

CheckSecretRead​

Check a secret read.

Called by: Enforcer.

fieldtype
sandbox_idSandboxId
nameSecretName
outcomewhenresult
unknown refusedno such SandboxUnknownSandbox: No sandbox has this identity.
retired refusedstate == RetiredSandboxIsRetired: The sandbox is retired; it allows nothing.
denied refusednot (some s in secret_grants with s == input.name)SecretDenied: No grant names this secret.
grantedotherwiseleaves the Sandbox as it is

CheckWrite​

Check a write.

Called by: Enforcer.

fieldtype
sandbox_idSandboxId
pathPath
outcomewhenresult
unknown refusedno such SandboxUnknownSandbox: No sandbox has this identity.
retired refusedstate == RetiredSandboxIsRetired: The sandbox is retired; it allows nothing.
denied refusednot (some p in writable_paths with p == input.path)WriteDenied: The path is not writable in this sandbox.
allowedotherwiseleaves the Sandbox as it is

DefineSandbox​

Define a sandbox.

Called by: Operator.

fieldtype
isolationIsolationLevel
writable_pathslist of Path
egresslist of EgressRule
secret_grantslist of SecretName
outcomewhenresult
definedotherwisecreates a Sandbox in Active; emits SandboxDefined

RetireSandbox​

Retire a sandbox.

Called by: Operator.

fieldtype
sandbox_idSandboxId
outcomewhenresult
unknown refusedno such SandboxUnknownSandbox: No sandbox has this identity.
retiredotherwisemoves the Sandbox Active → Retired; emits SandboxRetired
wrong-state refusedthe Sandbox is in a state that does not allow itSandboxStateConflict: The sandbox is not in a state this command acts from.

Events​

eventfieldsemitted by
SandboxDefinedsandbox_id SandboxId, isolation IsolationLevelDefineSandbox
SandboxRetiredsandbox_id SandboxIdRetireSandbox

Views​

viewrowsfields
Sandboxes
Sandboxes
each Sandboxsandbox_id SandboxId, isolation IsolationLevel, writable_paths list of Path, egress list of EgressRule, secret_grants list of SecretName, state State

Types​

typeisvalues or fields
EgressRulea recordhost Host, port integer
Host
A host name or address, matched exactly.
an identifier or valuestring
Path
A path in the file system the workload sees, matched exactly.
an identifier or valuestring
SecretName
The name a secret is granted by; the value never appears.
an identifier or valuestring

KPIs​

5 KPIs from the KPI catalogue. A gate must be zero for a variant of an architecture to count.

Correctness​

KPIunitbettergatestatus
secrets_left_session
Confirmed secrets in the arguments of a tool call whose effect leaves the sandbox.
How: ExposureDetected events with class Secret, channel ToolInput and verdict Gap, on a tool of category Network, Message or Execute. Must be 0.
countlowergatecomputed today
source: docs/kpis.md
secrets_in_prompts
Confirmed secrets in a prompt.
How: ExposureDetected events with class Secret, channel Prompt and verdict Gap. Not a gate, because the owner pasting a value is not an agent leaking one; it still reaches the model provider.
countlower–computed today
source: docs/kpis.md
secrets_in_tool_output
Confirmed secrets in the result of a tool call.
How: ExposureDetected events with class Secret, channel ToolOutput and verdict Gap. Not a gate, because the value entered the context but did not leave. Unconfirmed matches (verdict Unk) are listed apart for review.
countlower–computed today
source: docs/kpis.md
attacks_through_exec_scope
Attack cases that got through the exec scope in an attack suite.
How: In a fixed suite of attack cases, ToolCallCompleted of a call that the exec scope should have stopped. Must be 0. Report tasks done under the scope beside it, because a scope that blocks work is no answer.
countlowergateplanned
source: research/2609.08371

Quality​

KPIunitbettergatestatus
egress_denied_attempts
Tool calls refused because they reach outside the sandbox.
How: ToolCallDecided refusals on tools of category Network or Message, or Execute with an outward effect, per sandbox.
countlower–planned
source: design

Settings​

The settings a part of this block carries in an architecture document. agenticspec sim check refuses any other setting (setting_unknown) and a value outside its type (setting_invalid), and a part that lacks a setting marked required in the default column; the contract copies a setting into the ports it narrows. The last rows of each table are the settings every part takes. What no setting here types (a file, a path, an audience, the use of a model) goes into the part's notes, a map with free keys and values that the check takes as written and nothing reads.

A part sandbox:

settingtypeunitdefaultcontractwhat
isolationenum IsolationLevel: none, process, container, user_kernel, micro_vmevery portHow the sandbox isolates what runs in it.
egresspart listevery portThe parts and the endpoints of the architecture (endpoints:) the sandbox may reach.
secretsstring listevery portThe secrets what runs in the sandbox may read, by name (^[a-z][a-z0-9-]*$): the sandbox block's secret grants. A deployment asks a part of the unit of the part its per names to declare each.
countinteger of at least 11How many copies of the part run.
perpartOne copy of the part for each copy of the named part.
notesnotesFree notes on the part, a map with keys and values of any kind: what no setting of its block types. The check takes any map; the simulator, the search and the contract never read it.