Skip to main content
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 with AllowPath.
Grant single-file access with AllowFile.
Access modes: Use PathCovered to check whether a path is covered by an existing directory capability.

Network access

Set the outbound network mode with SetNetworkMode.
Network modes: When using 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

Use Summary for human-readable diagnostics and FSCapabilities for structured filesystem capabilities.
Use Deduplicate to collapse redundant filesystem capabilities, keeping the highest access level for overlapping paths.