CapabilitySet is the policy builder used by nono.Apply, QueryContext, and
SandboxState.
CapabilitySet is safe for concurrent use. Call Close when you want to free
native resources immediately; otherwise the Go finalizer releases them later.
Filesystem access
Grant directory access withAllowPath.
AllowFile.
| Constant | Meaning |
|---|---|
nono.AccessRead | Read access |
nono.AccessWrite | Write access |
nono.AccessReadWrite | Read and write access |
PathCovered to check whether a path is covered by an existing directory
capability.
Network access
Set the outbound network mode withSetNetworkMode.
| Constant | Meaning |
|---|---|
nono.NetworkBlocked | Block outbound network access |
nono.NetworkAllowAll | Allow outbound network access |
nono.NetworkProxyOnly | Allow network access through the configured proxy port |
NetworkProxyOnly, set the proxy port explicitly.
Commands and platform rules
AllowCommand and BlockCommand add command allow-list and block-list rules.
AddPlatformRule adds a raw platform-specific rule. On macOS this is a Seatbelt
S-expression. On Linux it is ignored.
Introspection
UseSummary for human-readable diagnostics and FSCapabilities for structured
filesystem capabilities.
Deduplicate to collapse redundant filesystem capabilities, keeping the
highest access level for overlapping paths.