Type Alias: SrtBinarySandboxOptions
ts
type SrtBinarySandboxOptions = {
cwd?: string;
policy?: SandboxPolicy;
};Defined in: src/batteries/sandbox/node/srt_enforcer.ts:794
Options for srtBinarySandbox.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
cwd? | string | The DEFAULT working directory, used when the invocation carries none — the invocation's own cwd wins. Falls back to the current process directory when neither names one. Remarks ONE effective directory is computed from those layers and used for BOTH the SRT profile and the returned invocation's cwd, so the profile and the spawn can never disagree. That matters because SRT derives its git safe.directory injection and (on Linux) its mandatory-deny scan from this directory: a profile generated for one directory while the executor spawns in another is a sandbox that does not describe the process it is supposedly enforcing. | src/batteries/sandbox/node/srt_enforcer.ts:818 |
policy? | SandboxPolicy | The per-invocation policy this wrapper applies. Defaults to the enforcer's own session policy. Remarks This is the SAME per-call policy contract SandboxPolicyEnforcer.run takes, so it is admitted identically: the FILESYSTEM section is baked into this child's profile (and replaces the session baseline for it, exactly as run() does), while a NETWORK section that differs from the live session is refused with E_SANDBOX_NETWORK_GRANT_UNSUPPORTED. Omitted means the enforcer's established session policy, which is the only policy that can never diverge from the session's network state. | src/batteries/sandbox/node/srt_enforcer.ts:806 |