Skip to content
2 min read · 363 words

Interface: SandboxPolicy ​

Defined in: src/batteries/sandbox/types.ts:50

Assembly-facing policy. Reads allow by default; writes and network deny by default.

Properties ​

PropertyModifierTypeDescriptionDefined in
filesystemreadonly{ allowGitConfig?: boolean; allowRead?: readonly string[]; allowWrite?: readonly string[]; denyRead?: readonly string[]; denyWrite?: readonly string[]; disabled?: boolean; gitSafeDirectories?: readonly string[]; mandatoryDenySearchDepth?: number; }Filesystem rules; disabled is a kill switch and deliberately does not unify axis defaults.src/batteries/sandbox/types.ts:52
filesystem.allowGitConfig?readonlybooleanWhether .git/config is included in the mandatory deny set.src/batteries/sandbox/types.ts:58
filesystem.allowRead?readonlyreadonly string[]Read rules use deny-then-allow precedence.src/batteries/sandbox/types.ts:54
filesystem.allowWrite?readonlyreadonly string[]Write rules use allow-only semantics; deny wins inside the allow list.src/batteries/sandbox/types.ts:56
filesystem.denyRead?readonlyreadonly string[]-src/batteries/sandbox/types.ts:55
filesystem.denyWrite?readonlyreadonly string[]-src/batteries/sandbox/types.ts:57
filesystem.disabled?readonlybooleanWhen true, no filesystem rules apply.src/batteries/sandbox/types.ts:53
filesystem.gitSafeDirectories?readonlyreadonly string[]Git safe directories passed to spawned children.src/batteries/sandbox/types.ts:59
filesystem.mandatoryDenySearchDepth?readonlynumberLinux mandatory-deny scan depth.src/batteries/sandbox/types.ts:60
networkreadonly{ allowedDomains?: readonly string[]; deniedDomainReasons?: Readonly<Record<string, string>>; deniedDomains?: readonly string[]; disabled?: boolean; }Network rules. An absent allow list means deny all unless disabled. Remarks disabled means that SRT's network configuration key is omitted entirely. SRT decides whether to create a network namespace from the presence of that key; its NetworkConfigSchema has no schema-valid allow-all domain pattern ("*" is explicitly rejected). Consequently disabled means no network namespace restriction, rather than an allow-all domain entry.src/batteries/sandbox/types.ts:71
network.allowedDomains?readonlyreadonly string[]-src/batteries/sandbox/types.ts:74
network.deniedDomainReasons?readonlyReadonly<Record<string, string>>Model-readable reasons for denied domains.src/batteries/sandbox/types.ts:76
network.deniedDomains?readonlyreadonly string[]-src/batteries/sandbox/types.ts:75
network.disabled?readonlybooleanOmit SRT's network key, avoiding --unshare-net, when true.src/batteries/sandbox/types.ts:73