TOML Configuration Reference

Complete settings for AppContainer (AC / LPAC) and Restricted Token modes β€” every key, its default, and whether it is mandatory, optional, or unavailable.

Configuration Fundamentals

Every config must have a [sandbox] section. Everything else defaults to deny-all / disabled. Omitting a setting never grants more access. Wrong-mode keys, unknown keys, and unknown sections are all configuration errors (exit 128).

πŸ“ Minimal valid config

[sandbox]
token = 'appcontainer'

Two lines. All other sections are optional. No access is granted by omission β€” defaults are deny-all / disabled.

⚠️ Config limits

Config filemax 1 MB
Path lengthmax 32,768 chars
Rules per sectionmax 256 in [allow.*], [deny.*], [registry]
β›” Wrong-mode keys are rejected

Using an AC-only key (e.g. network) in an RT config, or an RT-only key (named_pipes, integrity) in an AC config, is a configuration error β†’ exit 128. Unknown keys/sections are also rejected.

All Settings

● Required ● Optional (safe default) ● N/A β€” error if used

[sandbox]

both modes
KeyValuesDefaultAC / LPACRestrictedNotes
token'appcontainer' / 'lpac' / 'restricted'β€”RequiredRequiredIsolation model
integrity'low' / 'medium'β€”N/ARequiredlow = strongest; medium = wider compatibility
stricttrue / falsefalseN/AOptionalExclude user SID from restricting list. Forces explicit grants for user-owned resources. Default false.
workdirabsolute path'inherit'OptionalOptionalChild cwd. Default: inherited from Sandy's cwd

[allow.deep] / [allow.this] β€” File and folder grants

both modes

All keys optional (default []). Two scopes: [allow.deep] applies recursively (OI|CI inheritance); [allow.this] applies to the named object only (instant, no child walk). Same access keys in both scopes.

KeyDefaultAC / LPACRTPermission granted
read[]OptionalOptionalRead files, list dirs. Does NOT grant execute.
write[]OptionalOptionalCreate/modify files. Does NOT grant read.
execute[]OptionalOptionalRead + execute files, list dirs
append[]OptionalOptionalAppend-only. Cannot overwrite or read.
delete[]OptionalOptionalDelete only. No read or write.
all[]OptionalOptionalFull access: read+write+execute+delete. Strips WRITE_DAC, WRITE_OWNER, FILE_DELETE_CHILD.
run[]OptionalOptionalExecute only, no read (can't copy binary)
stat[]OptionalOptionalRead attributes only
touch[]OptionalOptionalModify attributes only
create[]OptionalOptionalCreate new files/subdirs, no overwrite
πŸ’‘ Allow-inside-deny pipeline (restricted token only)

In Restricted Token mode, you can carve exempt subtrees inside denied areas. All allow/deny entries are merged and sorted by depth β€” deny applied before allow at each level. An allow inside a deny automatically strips the deny ACEs first. Example: [deny.deep] all = ['C:\repos'] + [allow.deep] all = ['C:\repos\snipps'].

[deny.deep] / [deny.this] β€” Block specific permissions

Restricted only

Not available in AppContainer / LPAC mode (kernel ignores DENY ACEs for AC SIDs). All keys optional (default []). Same access keys and scope semantics as allow. [deny.deep] is recursive; [deny.this] applies to the single object only. Deny is surgical β€” only the specified permission type is blocked. deny.write does NOT block delete.

KeyDefaultMechanism (Restricted Token only)
read[]Real DENY_ACCESS ACE
write[]Real DENY_ACCESS ACE. Does NOT block delete.
execute[]Real DENY_ACCESS ACE
append[]Real DENY_ACCESS ACE
delete[]Real DENY_ACCESS ACE
all[]Real DENY_ACCESS ACE (all bits)
run[]Real DENY_ACCESS ACE
stat[]Real DENY_ACCESS ACE
touch[]Real DENY_ACCESS ACE
create[]Real DENY_ACCESS ACE
⚠️ AppContainer / LPAC does not support deny rules

The Windows kernel ignores DENY_ACCESS ACEs for AppContainer SIDs. Sandy rejects [deny.*] for AppContainer / LPAC mode at config validation time (exit 128). Use Restricted Token mode for deny rules.

[privileges] β€” Sandbox capabilities

both (mode-gated keys)
KeyTypeDefaultAC / LPACRTDescription
networkboolfalseOptionalN/AOutbound internet. RT mode: always allowed.
lanbool / stringfalseOptionalN/ALAN + loopback. false Β· 'with localhost' Β· 'without localhost'.
named_pipesboolfalseN/AOptionalAllow CreateNamedPipeW. Required for Flutter, Chromium, Bun/Node IPC.
desktopbooltrueN/AOptionalWinSta0 + Desktop access. Default true. Set false only for headless services.
stdinbool / absolute pathfalseOptionalOptionalfalse=NUL; true=inherit parent stdin; absolute path=redirect from file
clipboard_readboolfalseOptionalOptionalAllow reading from the system clipboard
clipboard_writeboolfalseOptionalOptionalAllow writing to the system clipboard
child_processesbooltrueOptionalOptionalAllow spawning child processes. Set false only for strictly single-process scripts.

[registry] β€” Registry key grants

Restricted only

Not available in AppContainer / LPAC mode β€” AC uses a fixed private registry hive automatically. Most HKLM\Software and HKCU keys are already readable via BUILTIN\Users in RT.

KeyDefaultAC / LPACRTDescription
read[]N/AOptionalGrant read access to specific registry keys
write[]N/AOptionalGrant write access to specific registry keys

[environment] β€” Environment variables

both modes
KeyTypeDefaultAC / LPACRTDescription
inheritboolfalseOptionalOptionaltrue: pass full parent env; false: clean env + essential Windows vars + pass list
passstring array[]OptionalOptionalSpecific vars to include when inherit = false

Always passed when inherit = false

SYSTEMROOT Β· SYSTEMDRIVE Β· WINDIR Β· OS Β· TEMP Β· TMP Β· COMSPEC Β· PATHEXT Β· LOCALAPPDATA Β· APPDATA Β· USERPROFILE Β· HOMEDRIVE Β· HOMEPATH Β· PROCESSOR_ARCHITECTURE Β· NUMBER_OF_PROCESSORS

[limit] β€” Resource constraints

both modes
KeyUnitDefaultAC / LPACRTDescription
timeoutseconds0OptionalOptionalKill root process after N seconds. 0=no limit. After the root exits (or is killed on timeout), Sandy waits for all descendant processes in the job to finish before cleanup. Sandy exits 130 on timeout.
memoryMB0OptionalOptionalJob-wide memory cap. 0=no limit. Enforced via job objects.
processescount0OptionalOptionalMax active process count. 0=no limit.
πŸ”’ Limits are fail-closed

If a limit is configured but cannot be enforced (job object failure), Sandy terminates the child and exits with code 129. The sandbox never runs with unenforced limits.

Availability Summary

One-glance view of every key and its status per mode.

🟒 Required πŸ”΅ Optional πŸ”΄ N/A β€” error if used
Section / KeyDefaultAC / LPACRestricted
[sandbox]β€”RequiredRequired
 tokenβ€”RequiredRequired
 integrityβ€”N/ARequired
 strictfalseN/AOptional
 workdir'inherit'OptionalOptional
[allow.deep] / [allow.this][]OptionalOptional
[deny.deep] / [deny.this][]N/AOptional
[privileges]β€”mode-gated
 networkfalseOptionalN/A
 lanfalseOptionalN/A
 named_pipesfalseN/AOptional
 desktoptrueN/AOptional
 stdinfalseOptionalOptional
 clipboard_readfalseOptionalOptional
 clipboard_writefalseOptionalOptional
 child_processestrueOptionalOptional
[registry][]N/AOptional
 read / write[]N/AOptional
[environment]β€”OptionalOptional
 inheritfalseOptionalOptional
 pass[]OptionalOptional
[limit]β€”OptionalOptional
 timeout / memory / processes0OptionalOptional

Permission Bit Reference

Exact Windows access masks per [allow.*] level. write β‰  read, and read β‰  execute.

LevelKeyKey Windows bitsNotes
ReadreadFILE_READ_DATA, FILE_READ_EA, FILE_READ_ATTRIBUTES, READ_CONTROL, SYNCHRONIZECannot load DLLs β€” no FILE_EXECUTE
WritewriteFILE_WRITE_DATA, FILE_APPEND_DATA, FILE_WRITE_EA, FILE_WRITE_ATTRIBUTES, READ_CONTROL, SYNCHRONIZE, FILE_READ_ATTRIBUTESCannot list/read contents
ExecuteexecuteAll Read bits + FILE_EXECUTEStandard (RX) β€” minimum to run programs
AppendappendFILE_APPEND_DATA, FILE_READ_ATTRIBUTES, SYNCHRONIZECannot overwrite existing data
DeletedeleteDELETE, FILE_READ_ATTRIBUTES, SYNCHRONIZENo read or write
AllallFILE_ALL_ACCESS & ~(FILE_DELETE_CHILD | WRITE_DAC | WRITE_OWNER)Full data control. WRITE_DAC, WRITE_OWNER, FILE_DELETE_CHILD intentionally stripped.
RunrunFILE_EXECUTE, FILE_READ_ATTRIBUTES, SYNCHRONIZEExecute only, no read (can’t copy binary)
StatstatFILE_READ_ATTRIBUTES, SYNCHRONIZEAttributes only
TouchtouchFILE_WRITE_ATTRIBUTES, FILE_READ_ATTRIBUTES, SYNCHRONIZEModify attributes only
CreatecreateFILE_ADD_FILE, FILE_ADD_SUBDIRECTORY, FILE_READ_ATTRIBUTES, SYNCHRONIZECreate new files/subdirs, no overwrite