Files
dot/config/nono/profile.schema.json

2485 lines
104 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://nono.sh/schemas/nono-profile.schema.json",
"title": "nono Profile",
"description": "A nono profile definition that configures sandbox capabilities, filesystem access, network policy, and other security settings for running untrusted processes.",
"type": "object",
"additionalProperties": false,
"properties": {
"$schema": {
"type": "string",
"description": "JSON Schema URI for editor validation and autocompletion."
},
"extends": {
"oneOf": [
{ "type": "string" },
{
"type": "array",
"items": { "type": "string" },
"minItems": 1
},
{ "type": "null" }
],
"description": "Name of a base profile (or array of base profiles) to inherit from. All fields from the base profile are used as defaults, with this profile's values taking precedence. When an array is given, bases are merged left-to-right before the child is applied. Shared transitive bases are deduplicated: each profile is resolved at most once."
},
"meta": {
"$ref": "#/$defs/ProfileMeta",
"description": "Profile metadata including name, version, description, and author."
},
"security": {
"$ref": "#/$defs/SecurityConfig",
"description": "Security configuration for process-level isolation modes (signal, IPC, process info, capability elevation, WSL2 proxy policy)."
},
"groups": {
"$ref": "#/$defs/GroupsConfig",
"description": "Group composition: include and exclude policy group names resolved from policy.json."
},
"commands": {
"$ref": "#/$defs/CommandsConfig",
"description": "Command allow/deny lists applied during sandbox setup."
},
"filesystem": {
"$ref": "#/$defs/FilesystemConfig",
"description": "Filesystem access rules specifying which directories and files the sandboxed process can read or write."
},
"network": {
"$ref": "#/$defs/NetworkConfig",
"description": "Network access configuration including proxy settings, credential injection, and port allowlists."
},
"diagnostics": {
"$ref": "#/$defs/DiagnosticsConfig",
"description": "Diagnostic output controls. These settings do not change sandbox enforcement."
},
"linux": {
"$ref": "#/$defs/LinuxConfig",
"description": "Linux-specific hardening controls."
},
"env_credentials": {
"$ref": "#/$defs/SecretsConfig",
"description": "Maps keystore account names (or op://, bw://, apple-password://, env:// URIs) to environment variable names. Secrets are loaded from the system keystore at startup."
},
"secrets": {
"$ref": "#/$defs/SecretsConfig",
"description": "Alias for env_credentials. Maps keystore account names to environment variable names."
},
"environment": {
"oneOf": [
{ "$ref": "#/$defs/EnvironmentConfig" },
{ "type": "null" }
],
"description": "Controls which environment variables are passed to the sandboxed process. By default all variables are inherited."
},
"command_policies": {
"$ref": "#/$defs/CommandPoliciesConfig",
"description": "tool-sandbox command-control policy. tool-sandbox activates only when commands is non-empty; broker-mediated enforcement is available on Linux and macOS, with platform-specific capability limits."
},
"workdir": {
"$ref": "#/$defs/WorkdirConfig",
"description": "Working directory access configuration controlling whether and how the current working directory is shared with the sandboxed process."
},
"hooks": {
"$ref": "#/$defs/HooksConfig",
"description": "Hook configurations for target applications. Maps application names to their hook definitions."
},
"session_hooks": {
"$ref": "#/$defs/SessionHooks",
"description": "Session lifecycle hooks. Scripts run outside the sandbox with host privileges before and after the sandboxed process."
},
"rollback": {
"$ref": "#/$defs/RollbackConfig",
"description": "Rollback snapshot configuration controlling which files are excluded from undo snapshots."
},
"undo": {
"$ref": "#/$defs/RollbackConfig",
"description": "Alias for rollback. Controls which files are excluded from undo snapshots."
},
"open_urls": {
"oneOf": [
{ "$ref": "#/$defs/OpenUrlConfig" },
{ "type": "null" }
],
"description": "Supervisor-delegated URL opening configuration for OAuth2 login flows and similar operations. When present, replaces the base profile's config entirely. When absent or null, inherits from the base profile. To clear inherited permissions, provide an explicit empty object with allow_origins: [] and allow_localhost: false."
},
"allow_launch_services": {
"oneOf": [
{ "type": "boolean" },
{ "type": "null" }
],
"description": "Opt-in gate for temporary direct LaunchServices opens on macOS. Must be paired with the CLI flag --allow-launch-services. Set to null to inherit from the base profile."
},
"allow_gpu": {
"oneOf": [
{ "type": "boolean" },
{ "type": "null" }
],
"description": "Opt-in gate for GPU access (Metal/IOKit on Apple Silicon macOS, render nodes on Linux). Intel Macs are not yet supported. Must be paired with the CLI flag --allow-gpu. Set to null to inherit from the base profile."
},
"interactive": {
"type": "boolean",
"description": "Deprecated. Parsed for backward compatibility but ignored. Supervised mode preserves TTY by default.",
"deprecated": true
},
"packs": {
"type": "array",
"items": { "type": "string" },
"description": "Pack dependencies verified at launch. Each entry is a namespace/name reference to an installed pack."
},
"command_args": {
"type": "array",
"items": { "type": "string" },
"description": "Extra arguments appended to the child command at launch. Supports variable expansion (e.g. $NONO_CONFIG, $NONO_PACKAGES)."
},
"credential_capture": {
"type": "object",
"description": "Maps logical credential names to supervisor-side commands or provider subprocesses used by custom_credentials entries with credential_key: \"cmd://<name>\". Captures run lazily when the proxy first needs the credential; captured material is injected by the proxy and never exposed to the sandboxed child.",
"additionalProperties": {
"$ref": "#/$defs/CredentialCaptureEntry"
}
},
"credential_providers": {
"type": "object",
"description": "Maps provider names to declarative OAuth capture providers. Providers describe token endpoints to capture, API origins where phantom tokens may be resolved, optional credential-store detection, and optional lifecycle helper commands.",
"additionalProperties": {
"$ref": "#/$defs/CredentialProviderDef"
}
},
"credential_routes": {
"type": "array",
"description": "Binds declarative credential providers to sandbox-visible phantom credentials and optional endpoint policy.",
"items": {
"$ref": "#/$defs/CredentialRouteDef"
},
"default": []
},
"unsafe_macos_seatbelt_rules": {
"type": "array",
"items": { "type": "string" },
"description": "macOS-only. Expert escape hatch: raw Seatbelt S-expression rules applied verbatim to the sandbox policy. Each entry must be a valid S-expression, e.g. \"(allow iokit-open)\". Rules are validated at load time and rejected if malformed. Ignored on Linux. Surfaced prominently in 'nono profile show' output. If a rule pattern becomes common, prefer promoting it to a typed first-class capability instead."
},
"allow_parent_of_protected": {
"oneOf": [
{ "type": "boolean" },
{ "type": "null" }
],
"description": "Opt-in to allow parent-of-protected-root grants on macOS. When true (and on macOS), --allow ~ is permitted because Seatbelt deny rules protect ~/.nono. Ignored on Linux. Set to null to inherit from the base profile. Default is false."
},
"skipdirs": {
"type": "array",
"items": { "type": "string" },
"description": "Directory names to skip during trust scanning and rollback preflight. Treated like built-in heavy directories (for example \"target\")."
},
"binary": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Binary path or command name to run when no trailing -- <command> is given. Resolved via PATH lookup or canonicalized if absolute. Only honoured for user-authored profiles (ignored for pack and built-in profiles)."
},
"platform_overrides": {
"oneOf": [
{ "$ref": "#/$defs/PlatformOverrides" },
{ "type": "null" }
],
"description": "Per-OS profile patches merged after extends resolution. Only the entry matching the current platform is applied. Nesting extends or platform_overrides inside an override block is a parse error."
}
},
"$defs": {
"ProfileMeta": {
"type": "object",
"description": "Profile metadata.",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Human-readable name of this profile."
},
"version": {
"type": "string",
"description": "Version string for this profile definition."
},
"description": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Optional description of what this profile is for."
},
"author": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Optional author or maintainer of this profile."
}
}
},
"CredentialCaptureEntry": {
"type": "object",
"description": "Configuration for a supervisor-side credential capture command or provider subprocess.",
"additionalProperties": false,
"oneOf": [
{ "required": ["command"], "not": { "required": ["provider"] } },
{ "required": ["provider"], "not": { "required": ["command"] } }
],
"properties": {
"command": {
"type": "array",
"items": { "type": "string" },
"minItems": 1,
"description": "Command and arguments to execute without a shell, for example [\"gh\", \"auth\", \"token\"]. The executable is resolved before proxy startup."
},
"provider": {
"$ref": "#/$defs/CredentialCaptureProvider",
"description": "Typed external credential provider subprocess. The provider receives nono.credential-provider.v1 request JSON on stdin and returns JSON credential material on stdout."
},
"timeout_secs": {
"type": "integer",
"minimum": 1,
"maximum": 300,
"default": 5,
"description": "Maximum seconds to wait for the command."
},
"ttl_secs": {
"type": "integer",
"minimum": 0,
"maximum": 3600,
"default": 900,
"description": "How long to cache the captured credential in memory. Set to 0 to disable caching."
},
"cache_ttl_secs": {
"type": "integer",
"minimum": 0,
"maximum": 3600,
"description": "Preferred alias for ttl_secs. How long to cache captured material in memory. Set to 0 to disable caching. Do not set both ttl_secs and cache_ttl_secs."
},
"cache_path_regex": {
"type": "string",
"minLength": 1,
"description": "Optional regular expression evaluated against the upstream request path. If it matches, capture group 1 is used as the cache scope; otherwise the full match is used. When absent or unmatched, the request host is used."
},
"stdin": {
"type": "string",
"enum": ["null", "request_json"],
"default": "null",
"description": "Controls stdin for the capture command. null closes stdin unless interaction.stdin is true. request_json writes request metadata JSON to stdin."
},
"output": {
"oneOf": [
{
"type": "string",
"enum": ["text"],
"description": "Capture stdout as a single credential string."
},
{
"$ref": "#/$defs/CredentialCaptureOutputConfig"
}
],
"default": "text",
"description": "Controls how capture stdout is interpreted. JSON output requires an object form with allow_headers."
},
"interaction": {
"$ref": "#/$defs/CredentialCaptureInteraction",
"description": "Explicit opt-in policy for interactive capture commands."
}
}
},
"CredentialCaptureProvider": {
"type": "object",
"description": "External provider subprocess using the typed nono credential-provider protocol.",
"additionalProperties": false,
"required": ["command"],
"properties": {
"command": {
"type": "array",
"items": { "type": "string" },
"minItems": 1,
"description": "Provider executable and arguments to execute without a shell."
},
"config": {
"type": "object",
"description": "Provider-specific configuration passed through in request JSON.",
"additionalProperties": true
}
}
},
"CredentialCaptureOutputConfig": {
"type": "object",
"description": "Structured output configuration for a credential capture command.",
"additionalProperties": false,
"required": ["format"],
"properties": {
"format": {
"type": "string",
"enum": ["json"],
"description": "Interpret stdout as JSON. The supported shape is {\"headers\": {\"Header-Name\": \"value\"}}."
},
"allow_headers": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"minItems": 1,
"uniqueItems": true,
"description": "Header names that JSON output may inject. Required for json output."
}
}
},
"CredentialCaptureInteraction": {
"type": "object",
"description": "Explicit policy for capture commands that need terminal or browser interaction.",
"additionalProperties": false,
"properties": {
"stdio": {
"type": "boolean",
"default": false,
"description": "Allow the capture command to write prompts to the terminal via inherited stderr."
},
"stdin": {
"type": "boolean",
"default": false,
"description": "Allow the capture command to read from the terminal via inherited stdin. Only set this when the helper genuinely needs to prompt the user for input. Requires stdio:true."
},
"open_urls": {
"oneOf": [
{ "$ref": "#/$defs/OpenUrlConfig" },
{ "type": "null" }
],
"description": "Origins this capture command may open through nono's browser helper."
},
"allow_launch_services": {
"type": "boolean",
"default": false,
"description": "Mark this capture command as allowed to use host browser/app launch mechanisms during auth setup."
}
}
},
"CredentialProviderDef": {
"type": "object",
"description": "Declarative provider for mediated OAuth credentials. Capture and token rewriting are driven by profile data instead of built-in provider-specific Rust code.",
"additionalProperties": false,
"required": ["type", "token_endpoints", "api_hosts"],
"properties": {
"type": {
"type": "string",
"enum": ["oauth_capture"],
"description": "Provider mechanism. oauth_capture captures token endpoint responses and maps real tokens to sandbox-visible phantom tokens."
},
"token_endpoints": {
"type": "array",
"items": { "$ref": "#/$defs/CredentialProviderTokenEndpoint" },
"minItems": 1,
"description": "OAuth token endpoints whose JSON responses contain real credentials that must be replaced before reaching the sandbox. Configure every token-bearing endpoint the client may use."
},
"api_hosts": {
"type": "array",
"items": { "$ref": "#/$defs/UrlOrigin" },
"minItems": 1,
"description": "API URL origins where phantom tokens issued by this provider may be resolved back to real credentials on egress."
},
"inject_header": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "HTTP header the resolved credential is injected into on api_hosts egress. Defaults to Authorization (OAuth Bearer APIs). Some providers (e.g. Vault) need a different header, such as X-Vault-Token. Must be a valid HTTP header name (RFC 7230 token)."
},
"credential_format": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Format applied to the resolved credential before injection; {} is replaced by the token. Defaults to \"Bearer {}\". Use \"{}\" alone for a raw token (e.g. Vault)."
},
"credential_store": {
"oneOf": [
{ "$ref": "#/$defs/CredentialProviderStore" },
{ "type": "null" }
],
"description": "Optional provider-specific session or logout detection."
},
"helpers": {
"oneOf": [
{ "$ref": "#/$defs/CredentialProviderHelpers" },
{ "type": "null" }
],
"description": "Optional human-invoked lifecycle helper commands. Commands are executed without a shell."
}
}
},
"CredentialProviderTokenEndpoint": {
"type": "object",
"additionalProperties": false,
"required": ["host", "path", "response_fields"],
"properties": {
"host": {
"$ref": "#/$defs/UrlOrigin",
"description": "Origin serving the token endpoint, for example https://platform.claude.com."
},
"path": {
"type": "string",
"minLength": 1,
"pattern": "^/",
"description": "Exact absolute URL path of the token endpoint."
},
"response_fields": {
"$ref": "#/$defs/CredentialProviderResponseFields",
"description": "JSON fields in the token endpoint response that contain real credentials. These fields must be exhaustive for token material returned by the endpoint."
},
"request_body": {
"type": "string",
"enum": ["auto", "json", "form"],
"default": "auto",
"description": "Token request body encoding used when resolving phantom refresh/exchange values before forwarding upstream."
},
"request_nonce_fields": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"minItems": 1,
"description": "Request body fields where phantom tokens must be resolved before refresh-token or token-exchange requests are sent upstream."
}
}
},
"CredentialProviderResponseFields": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["path"],
"properties": {
"path": {
"type": "string",
"minLength": 1,
"description": "JSON response field path containing real token material."
},
"kind": {
"type": "string",
"enum": ["opaque", "jwt"],
"default": "opaque",
"description": "Visible phantom format. Use jwt only when a client locally parses the token as a JWT and does not resend it as a bearer token."
},
"format": {
"type": "string",
"description": "Optional literal template for the visible phantom, with '{}' standing in for a freshly minted random body (e.g. 'sk-ant-oat01-{}'). The phantom follows the template exactly so a client that classifies a credential by sniffing a literal token prefix still recognises it. Stripped on egress before the real credential is substituted. Only valid with kind 'opaque'."
}
}
}
},
"CredentialProviderStore": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": ["type", "service", "account_candidates", "phantom_fields"],
"properties": {
"type": { "const": "keychain_json" },
"service": { "type": "string", "minLength": 1 },
"account_candidates": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"minItems": 1
},
"phantom_fields": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["type", "path", "phantom_fields"],
"properties": {
"type": { "const": "file_json" },
"path": { "type": "string", "minLength": 1 },
"phantom_fields": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["type", "command"],
"properties": {
"type": { "const": "command_status" },
"command": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"minItems": 1
}
}
}
]
},
"CredentialProviderHelpers": {
"type": "object",
"additionalProperties": false,
"properties": {
"status": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"description": "Optional status helper command."
},
"login": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"description": "Optional login helper command."
},
"logout": {
"type": "array",
"items": { "type": "string", "minLength": 1 },
"description": "Optional logout helper command."
}
}
},
"CredentialRouteDef": {
"type": "object",
"additionalProperties": false,
"required": ["name", "provider"],
"properties": {
"name": {
"$ref": "#/$defs/ProviderIdentifier",
"description": "Route name used in audit and generated proxy routes."
},
"provider": {
"$ref": "#/$defs/ProviderIdentifier",
"description": "Name of the provider declared under credential_providers."
},
"env_var": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Optional environment variable for clients that can start from a sandbox-visible phantom token. Many OAuth CLI clients instead receive phantoms through their captured credential store during login."
},
"base_url_env_var": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Environment variable that should point SDKs at the mediated proxy base URL."
},
"endpoint_policy": {
"oneOf": [
{ "$ref": "#/$defs/EndpointPolicyConfig" },
{ "type": "null" }
],
"description": "Optional method/path policy for provider API egress."
},
"upgrades": {
"type": "array",
"items": { "$ref": "#/$defs/CredentialWebSocketRuleDef" },
"description": "Allow-listed classic WebSocket targets for this route. Each origin must be one of the provider's HTTPS api_hosts. Classic WebSockets imply HTTP/1.1 GET, so neither is configurable here."
}
}
},
"CredentialWebSocketRuleDef": {
"type": "object",
"additionalProperties": false,
"required": ["origin", "path"],
"properties": {
"origin": {
"$ref": "#/$defs/UrlOrigin",
"description": "Allow-listed WebSocket origin; must match one of the provider's api_hosts."
},
"path": {
"type": "string",
"minLength": 1,
"pattern": "^/",
"description": "Allow-listed WebSocket upgrade path on the origin."
}
}
},
"ProviderIdentifier": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]+$"
},
"UrlOrigin": {
"type": "string",
"pattern": "^https://[^/?#]+$",
"description": "HTTPS URL origin without path, query, or fragment."
},
"SecurityConfig": {
"type": "object",
"description": "Security configuration for process-level isolation modes.",
"additionalProperties": false,
"properties": {
"signal_mode": {
"oneOf": [
{ "$ref": "#/$defs/ProfileSignalMode" },
{ "type": "null" }
],
"description": "Signal isolation mode controlling whether the sandboxed process can signal other processes. When null, inherits from the base profile (defaults to isolated)."
},
"process_info_mode": {
"oneOf": [
{ "$ref": "#/$defs/ProfileProcessInfoMode" },
{ "type": "null" }
],
"description": "Process inspection mode controlling whether the sandboxed process can read process info for other processes. When null, defaults to isolated."
},
"ipc_mode": {
"oneOf": [
{ "$ref": "#/$defs/ProfileIpcMode" },
{ "type": "null" }
],
"description": "IPC mode controlling whether the sandboxed process can use POSIX semaphores (needed for multiprocessing). When null, defaults to shared_memory_only."
},
"capability_elevation": {
"oneOf": [
{ "type": "boolean" },
{ "type": "null" }
],
"description": "Enable runtime capability elevation via seccomp-notify (Linux). When true, the supervisor intercepts file opens and can grant access to paths not in the initial capability set. When false, the sandbox is static."
},
"approval_backends": {
"type": "object",
"additionalProperties": { "$ref": "#/$defs/ApprovalBackendConfig" },
"description": "Where supervised-mode file/capability approval prompts are sent. A named backend here (e.g. a webhook) answers the prompts instead of the terminal. Kept separate from command_policies on purpose: setting it does not switch on tool-sandbox. Empty keeps the interactive terminal prompt."
},
"approval_defaults": {
"oneOf": [
{ "$ref": "#/$defs/ApprovalDefaultsConfig" },
{ "type": "null" }
],
"description": "Which entry in security.approval_backends to use by default; 'backend' names it. When null the terminal prompt is used unless approval_backends is set, in which case a default must resolve (we fail rather than guess)."
},
"wsl2_proxy_policy": {
"oneOf": [
{ "$ref": "#/$defs/Wsl2ProxyPolicy" },
{ "type": "null" }
],
"description": "WSL2 proxy fallback policy. Controls behavior when proxy-only network mode cannot be kernel-enforced on WSL2 (seccomp notify returns EBUSY). Default: error (refuse to run). Set to insecure_proxy to allow degraded execution where the credential proxy runs but network is not locked down."
}
}
},
"Wsl2ProxyPolicy": {
"type": "string",
"enum": ["error", "insecure_proxy"],
"description": "WSL2 proxy fallback policy. 'error' (default) refuses to run if proxy-only mode cannot be kernel-enforced. 'insecure_proxy' allows degraded execution where the credential proxy injects credentials but the sandboxed process is not prevented from bypassing the proxy."
},
"LinuxConfig": {
"type": "object",
"description": "Linux-specific hardening controls.",
"additionalProperties": false,
"properties": {
"af_unix_mediation": {
"oneOf": [
{ "$ref": "#/$defs/LinuxAfUnixMediation" },
{ "type": "null" }
],
"description": "Opt-in pathname AF_UNIX mediation. 'off' preserves compatibility. 'pathname' requires explicit filesystem.unix_socket* grants for pathname Unix socket connect/bind."
},
"sandbox_policy": {
"oneOf": [
{ "$ref": "#/$defs/LinuxSandboxPolicy" },
{ "type": "null" }
],
"description": "Which Linux sandboxing mechanism to install. Defaults to 'auto' (Landlock plus a static seccomp network baseline, falling back to seccomp-only networking when the kernel ABI lacks Landlock network support)."
}
}
},
"LinuxAfUnixMediation": {
"type": "string",
"enum": ["off", "pathname"],
"description": "Linux pathname AF_UNIX mediation mode."
},
"LinuxSandboxPolicy": {
"type": "string",
"enum": ["auto", "landlock", "external"],
"description": "Which sandboxing mechanism nono installs on Linux. 'auto' (default): Landlock plus a static seccomp network baseline, with automatic seccomp fallback when the kernel ABI lacks Landlock network support (< V4). 'landlock': Landlock only; errors at startup if the kernel cannot satisfy network restrictions via Landlock alone. 'external': TCP network egress enforcement is managed externally (iptables, cgroups, systemd, etc.); nono still installs filesystem/process sandboxing and skips only its own TCP network lockdown."
},
"ProfileSignalMode": {
"type": "string",
"enum": ["isolated", "allow_same_sandbox", "allow_all"],
"description": "Signal isolation mode for the sandboxed process."
},
"ProfileProcessInfoMode": {
"type": "string",
"enum": ["isolated", "allow_same_sandbox", "allow_all"],
"description": "Process inspection mode for the sandboxed process."
},
"ProfileIpcMode": {
"type": "string",
"enum": ["shared_memory_only", "full"],
"description": "IPC mode for the sandboxed process. 'shared_memory_only' allows POSIX shared memory but denies semaphores. 'full' enables both shared memory and semaphores (required for Python multiprocessing and similar runtimes)."
},
"WhenPredicate": {
"oneOf": [
{ "type": "string" },
{
"type": "array",
"items": { "type": "string" },
"minItems": 1
}
],
"description": "Platform predicate string or any-of array, e.g. linux, macos:>=15, linux:fedora-like:>=43, linux:fedora:>=43:workstation, or !linux:nixos."
},
"ConditionalPath": {
"oneOf": [
{ "type": "string" },
{
"type": "object",
"additionalProperties": false,
"required": ["path"],
"properties": {
"path": { "type": "string" },
"when": { "$ref": "#/$defs/WhenPredicate" }
}
}
]
},
"ConditionalName": {
"oneOf": [
{ "type": "string" },
{
"type": "object",
"additionalProperties": false,
"required": ["name"],
"properties": {
"name": { "type": "string" },
"when": { "$ref": "#/$defs/WhenPredicate" }
}
}
]
},
"ConditionalOrigin": {
"oneOf": [
{ "type": "string" },
{
"type": "object",
"additionalProperties": false,
"required": ["origin"],
"properties": {
"origin": { "type": "string" },
"when": { "$ref": "#/$defs/WhenPredicate" }
}
}
]
},
"FilesystemConfig": {
"type": "object",
"description": "Filesystem access rules for the sandboxed process.",
"additionalProperties": false,
"properties": {
"allow": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Directories with read+write access. Supports * (single path segment) and ** (any depth) glob patterns, expanded at sandbox start."
},
"read": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Directories or files with read-only access. Supports * (single path segment) and ** (any depth) glob patterns, expanded at sandbox start."
},
"write": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Directories with write-only access. Supports * (single path segment) and ** (any depth) glob patterns, expanded at sandbox start."
},
"allow_file": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Single files with read+write access."
},
"read_file": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Single files with read-only access."
},
"write_file": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Single files with write-only access."
},
"unix_socket": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Single AF_UNIX socket paths, connect only. Implies read access on the socket path."
},
"unix_socket_bind": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Single AF_UNIX socket paths, connect and bind. Implies read+write access on the socket path when it exists, or on its parent directory when it does not yet exist. Dangling symlinks are rejected at grant time; prefer unix_socket_dir_bind for runtime-generated filenames."
},
"unix_socket_dir": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Directories where any direct-child AF_UNIX socket may be connected to. Non-recursive. Implies read access on the directory."
},
"unix_socket_dir_bind": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Directories where any direct-child AF_UNIX socket may be connected to or bound. Non-recursive. Implies read+write access on the directory."
},
"unix_socket_subtree": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Directories where any descendant AF_UNIX socket may be connected to. Recursive. Implies read access on the directory."
},
"unix_socket_subtree_bind": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Directories where any descendant AF_UNIX socket may be connected to or bound. Recursive. Implies read+write access on the directory."
},
"deny": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Paths denied filesystem access. Denies apply regardless of other allow rules. Supports * (single path segment) and ** (any depth) glob patterns, expanded at sandbox start. On macOS a runtime regex rule also covers files created after sandbox start; on Linux only paths present at start time are covered."
},
"bypass_protection": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Paths exempted from group-level deny rules. Each path must also appear in an allow/read/write section to actually grant access; bypass_protection only removes the deny. Supports * (single path segment) and ** (any depth) glob patterns, expanded at sandbox start."
},
"suppress_save_prompt": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Paths whose runtime denials should not be offered in the save-profile prompt. Does not grant access, remove deny rules, or hide diagnostic output."
},
"ignore": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalPath" },
"description": "Alias for suppress_save_prompt. Prefer filesystem.suppress_save_prompt in new profiles."
}
}
},
"GroupsConfig": {
"type": "object",
"description": "Group composition for the sandboxed process.",
"additionalProperties": false,
"properties": {
"include": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalName" },
"description": "Policy group names to include. Groups are resolved against policy.json."
},
"exclude": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalName" },
"description": "Policy group names to remove from the resolved group set (subtractive composition)."
}
}
},
"CommandsConfig": {
"type": "object",
"description": "Command allow/deny lists applied during sandbox setup.",
"additionalProperties": false,
"properties": {
"allow": {
"type": "array",
"items": { "type": "string" },
"description": "Deprecated in v0.33.0. Startup-only command allowlist override. Not enforced for child processes; prefer resource-based controls instead.",
"deprecated": true
},
"deny": {
"type": "array",
"items": { "type": "string" },
"description": "Deprecated in v0.33.0. Startup-only command denylist extension. Not enforced for child processes; prefer resource-based controls instead.",
"deprecated": true
}
}
},
"NetworkConfig": {
"type": "object",
"description": "Network access configuration including proxy, credential injection, and port allowlists.",
"additionalProperties": false,
"properties": {
"block": {
"type": "boolean",
"description": "Block network access. Network is allowed by default; set to true to deny all outbound traffic."
},
"allow_http2": {
"type": "boolean",
"description": "Allow HTTP/2 to upstream servers via ALPN negotiation. Defaults to false (HTTP/1.1 with keep-alive). Equivalent to the --allow-http2 CLI flag."
},
"network_profile": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Network proxy profile name from network-policy.json. When set, outbound traffic is filtered through the proxy. Set to null to clear an inherited value."
},
"allow_domain": {
"type": "array",
"items": {
"oneOf": [
{ "type": "string" },
{ "$ref": "#/$defs/AllowDomainWithEndpoints" }
]
},
"description": "Additional domains to allow through the proxy. Entries can be plain hostname strings (CONNECT tunnel, no L7 filtering) or objects with endpoint rules (TLS-intercepted method+path filtering). When endpoints are present, only matching requests are allowed (default-deny)."
},
"proxy_allow": {
"type": "array",
"items": { "type": "string" },
"description": "Legacy alias for allow_domain."
},
"allow_proxy": {
"type": "array",
"items": { "type": "string" },
"description": "Legacy alias for allow_domain."
},
"credentials": {
"type": "array",
"items": { "type": "string" },
"description": "Credential service names to enable via the reverse proxy."
},
"proxy_credentials": {
"type": "array",
"items": { "type": "string" },
"description": "Legacy alias for credentials."
},
"open_port": {
"type": "array",
"items": { "type": "integer" },
"description": "Localhost TCP IPC (connect+bind). Port 0: macOS only (localhost:* outbound); Linux needs explicit ports."
},
"connect_port": {
"type": "array",
"items": { "type": "integer" },
"description": "Outbound TCP ports the sandboxed child may connect to (dial-only, no listen). Linux Landlock V4+ only; not supported on macOS: Seatbelt cannot filter outbound connections by TCP port."
},
"open_port_range": {
"type": "array",
"items": {
"type": "array",
"items": { "type": "integer" },
"minItems": 2,
"maxItems": 2
},
"description": "Inclusive port ranges for bidirectional localhost TCP IPC (connect + bind), e.g. [[3000, 3010], [8000, 8100]]. macOS enforces a combined limit of 16,384 unique ports across all ranges; Linux has no such restriction. Overlapping ranges are merged before applying rules."
},
"listen_port_range": {
"type": "array",
"items": {
"type": "array",
"items": { "type": "integer" },
"minItems": 2,
"maxItems": 2
},
"description": "Inclusive port ranges for TCP listen (bind only). Same platform behaviour as open_port_range for the bind side; no outbound connect rules are added. Overlapping ranges are merged before applying rules."
},
"deny_domain": {
"type": "array",
"items": { "type": "string" },
"description": "Domains to deny through the proxy regardless of the allowlist. Supports the same wildcard syntax as allow_domain (e.g. *.ads.example.com)."
},
"port_allow": {
"type": "array",
"items": { "type": "integer" },
"description": "Legacy alias for open_port."
},
"allow_port": {
"type": "array",
"items": { "type": "integer" },
"description": "Legacy alias for open_port."
},
"listen_port": {
"type": "array",
"items": { "type": "integer" },
"description": "TCP ports the sandboxed child may listen on."
},
"no_proxy": {
"type": "array",
"items": { "type": "string" },
"description": "Additional client-side proxy bypass entries appended to generated NO_PROXY/no_proxy in proxy mode. This does not grant network access; direct connections still require matching sandbox permissions. Entries must be host patterns only: safe single-label local aliases, canonical IP literals, *.<domain> wildcard suffixes, or .<domain> suffix patterns. Bare multi-label domains, protected metadata suffix tokens, full URLs, credentials, ports, paths, comma-separated lists, and catch-all * are rejected."
},
"custom_credentials": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/CustomCredentialDef"
},
"description": "Custom credential definitions for services not in network-policy.json. Keys are service names used with --credential."
},
"tls_intercept": {
"$ref": "#/$defs/TlsInterceptConfig",
"description": "TLS interception certificate lifecycle controls for L7 proxy routes."
},
"upstream_proxy": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Upstream proxy address (host:port) for enterprise proxy passthrough."
},
"external_proxy": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Legacy alias for upstream_proxy."
},
"upstream_bypass": {
"type": "array",
"items": { "type": "string" },
"description": "Hosts to bypass the upstream proxy and route directly. Supports exact hostnames and wildcard suffixes (e.g., *.example.com)."
},
"external_proxy_bypass": {
"type": "array",
"items": { "type": "string" },
"description": "Legacy alias for upstream_bypass."
}
}
},
"TlsInterceptConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"ca_lifecycle": {
"type": "string",
"enum": ["session", "trusted"],
"default": "session",
"description": "CA lifecycle. session uses a per-run CA exposed through trust-bundle env vars. trusted reuses a CA trusted in the macOS user trust store."
},
"ca_validity": {
"type": "string",
"pattern": "^[1-9][0-9]*(s|m|h|d)?$",
"description": "CA validity duration, such as 24h or 1d. Bare numbers are seconds."
},
"leaf_validity": {
"type": "string",
"pattern": "^[1-9][0-9]*(s|m|h|d)?$",
"description": "Per-host leaf certificate validity duration, such as 15m. Leaf expiry is capped by CA expiry."
},
"ca_env_vars": {
"type": "array",
"items": { "type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_]*$" },
"default": [],
"description": "Additional environment variables that should point at the generated TLS-intercept CA bundle, for clients with runtime-specific CA settings."
}
}
},
"CustomCredentialDef": {
"type": "object",
"description": "Custom credential route definition for the reverse proxy. Defines how to route requests and inject credentials for a service. Must set at least one of: credential_key, auth, aws_auth, spiffe, or redeem_phantoms. credential_key/auth/aws_auth/spiffe are mutually exclusive with each other. redeem_phantoms may stand alone OR combine with credential_key/auth (but not aws_auth/spiffe).",
"additionalProperties": false,
"required": ["upstream"],
"anyOf": [
{ "required": ["credential_key"], "properties": { "credential_key": { "not": { "type": "null" } } } },
{ "required": ["auth"], "properties": { "auth": { "not": { "type": "null" } } } },
{ "required": ["aws_auth"], "properties": { "aws_auth": { "not": { "type": "null" } } } },
{ "required": ["spiffe"], "properties": { "spiffe": { "not": { "type": "null" } } } }
],
"allOf": [
{
"not": {
"allOf": [
{ "required": ["credential_key"], "properties": { "credential_key": { "not": { "type": "null" } } } },
{ "required": ["auth"], "properties": { "auth": { "not": { "type": "null" } } } }
]
}
},
{
"not": {
"allOf": [
{ "required": ["credential_key"], "properties": { "credential_key": { "not": { "type": "null" } } } },
{ "required": ["aws_auth"], "properties": { "aws_auth": { "not": { "type": "null" } } } }
]
}
},
{
"not": {
"allOf": [
{ "required": ["credential_key"], "properties": { "credential_key": { "not": { "type": "null" } } } },
{ "required": ["spiffe"], "properties": { "spiffe": { "not": { "type": "null" } } } }
]
}
},
{
"not": {
"allOf": [
{ "required": ["auth"], "properties": { "auth": { "not": { "type": "null" } } } },
{ "required": ["aws_auth"], "properties": { "aws_auth": { "not": { "type": "null" } } } }
]
}
},
{
"not": {
"allOf": [
{ "required": ["auth"], "properties": { "auth": { "not": { "type": "null" } } } },
{ "required": ["spiffe"], "properties": { "spiffe": { "not": { "type": "null" } } } }
]
}
},
{
"not": {
"allOf": [
{ "required": ["aws_auth"], "properties": { "aws_auth": { "not": { "type": "null" } } } },
{ "required": ["spiffe"], "properties": { "spiffe": { "not": { "type": "null" } } } }
]
}
}
],
"properties": {
"upstream": {
"type": "string",
"description": "Upstream URL to proxy requests to (e.g., \"https://api.telegram.org\"). Must use HTTPS, or HTTP only for loopback addresses."
},
"credential_key": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Keystore account name for the credential (e.g., \"telegram_bot_token\"), or a 1Password op:// URI, Bitwarden bw:// URI, apple-password:// URI, file:// URI, env:// URI (e.g., \"env://MY_TOKEN\"), or cmd:// URI backed by credential_capture. Mutually exclusive with auth and aws_auth; may combine with redeem_phantoms."
},
"redeem_phantoms": {
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "Broker credential names this route resolves from caller-presented phantoms (including JWT-shaped) found in request headers. By-value / proof-of-possession auth, gated route-side: a process that captured the token presents the phantom (possession), and the route authorizes which credential(s) it will resolve (a presented phantom resolves only if its credential name is in this list). A non-empty list forces interception even without credential_key. Composes with a managed credential_key/auth (managed value injected into inject_header; caller phantoms resolved on the other headers) or stands alone. Cannot combine with aws_auth or spiffe, which use dedicated intercept handlers that do not resolve caller phantoms."
},
"auth": {
"oneOf": [
{ "$ref": "#/$defs/OAuth2Config" },
{ "type": "null" }
],
"description": "OAuth2 client_credentials configuration. When present, the proxy handles token exchange automatically. Mutually exclusive with credential_key and aws_auth."
},
"aws_auth": {
"oneOf": [
{ "$ref": "#/$defs/AwsAuthConfig" },
{ "type": "null" }
],
"description": "AWS SigV4 signing configuration. When present, the proxy signs outbound requests with AWS credentials. Mutually exclusive with credential_key and auth."
},
"inject_mode": {
"$ref": "#/$defs/InjectMode",
"description": "Credential injection mode. Determines how the credential is inserted into outbound requests.",
"default": "header"
},
"inject_header": {
"type": "string",
"description": "HTTP header name to inject the credential into. Only used when inject_mode is \"header\".",
"default": "Authorization"
},
"credential_format": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Template with {} for the secret (header inject mode). If set, used as-is. If omitted: Authorization header (case-insensitive) defaults to Bearer {}; other headers default to {} (secret only)."
},
"path_pattern": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Pattern to match in incoming URL path, using {} as placeholder for the phantom token. Required when inject_mode is \"url_path\"."
},
"path_replacement": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Pattern for outgoing URL path, using {} as placeholder for the real credential. Defaults to path_pattern if not specified. Only used when inject_mode is \"url_path\"."
},
"query_param_name": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Name of the query parameter to add or replace with the credential. Required when inject_mode is \"query_param\"."
},
"proxy": {
"oneOf": [
{ "$ref": "#/$defs/ProxyInjectConfig" },
{ "type": "null" }
],
"description": "Optional proxy-side overrides for phantom token parsing. When omitted, proxy behavior uses top-level custom credential fields."
},
"env_var": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Explicit environment variable name for the phantom token (e.g., \"OPENAI_API_KEY\"). Required when credential_key is a URI manager reference (op://, bw://, apple-password://, file://, or cmd://). Optional for env:// (derived from the URI)."
},
"endpoint_rules": {
"type": "array",
"items": {
"$ref": "#/$defs/EndpointRule"
},
"description": "L7 endpoint rules for method+path filtering. When non-empty, only requests matching at least one rule are allowed (default-deny). When empty or absent, all endpoints are permitted.",
"default": []
},
"tls_ca": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Path to a PEM-encoded CA certificate file for upstream TLS. When set, the proxy trusts this CA in addition to system roots. Required for upstreams with self-signed or private CA certificates (e.g. a Kubernetes API server). Supports tilde (~) expansion."
},
"tls_client_cert": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Path to a PEM-encoded client certificate for upstream mutual TLS (mTLS). When set together with tls_client_key, the proxy presents this certificate during the TLS handshake. Required for upstreams that enforce client-certificate authentication."
},
"tls_client_key": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Path to the PEM-encoded private key corresponding to tls_client_cert. Must be set together with tls_client_cert."
},
"rate_limit": {
"oneOf": [
{ "$ref": "#/$defs/RouteRateLimitConfig" },
{ "type": "null" }
],
"description": "Optional per-route request-rate limit (RouteRateLimiter). Caps the rate of L7 requests forwarded to this credential's upstream to contain a runaway or compromised agent. Applies only to L7-visible traffic (reverse-proxy and TLS-intercepted CONNECT); it has no effect on opaque CONNECT tunnels."
},
"endpoint_policy": {
"oneOf": [
{ "$ref": "#/$defs/EndpointPolicyConfig" },
{ "type": "null" }
],
"description": "Explicit L7 endpoint policy with allow/deny/approve routes. Alternative to endpoint_rules for more granular control."
},
"spiffe": {
"oneOf": [
{ "$ref": "#/$defs/SpiffeAuthConfig" },
{ "type": "null" }
],
"description": "SPIFFE/SPIRE Workload API authentication. Mutually exclusive with credential_key, auth, and aws_auth."
}
}
},
"EndpointRule": {
"type": "object",
"description": "HTTP method+path access rule for restricting which API endpoints an agent can access through a credential route.",
"additionalProperties": false,
"required": ["method", "path"],
"properties": {
"method": {
"type": "string",
"description": "HTTP method to match (e.g., \"GET\", \"POST\") or \"*\" for any method."
},
"path": {
"type": "string",
"description": "URL path glob pattern. Uses standard glob syntax: \"*\" matches one path segment, \"**\" matches zero or more segments."
}
}
},
"AllowDomainWithEndpoints": {
"type": "object",
"description": "Domain with fine-grained method+path endpoint restrictions. Requires TLS interception for L7 filtering. When endpoints is non-empty, only matching method+path combinations are allowed (default-deny).",
"additionalProperties": false,
"required": ["domain", "endpoints"],
"properties": {
"domain": {
"type": "string",
"description": "Domain hostname to allow (e.g., \"api.github.com\")."
},
"endpoints": {
"type": "array",
"items": { "$ref": "#/$defs/EndpointRule" },
"description": "L7 method+path rules. Only requests matching at least one rule are allowed."
}
}
},
"InjectMode": {
"type": "string",
"enum": ["header", "url_path", "query_param", "basic_auth"],
"description": "Credential injection mode for the reverse proxy.",
"default": "header"
},
"ProxyInjectConfig": {
"type": "object",
"description": "Optional proxy-side overrides for phantom token parsing. These settings only affect incoming client request validation, not outbound upstream credential injection.",
"additionalProperties": false,
"properties": {
"inject_mode": {
"oneOf": [
{ "$ref": "#/$defs/InjectMode" },
{ "type": "null" }
],
"description": "Override inject mode for proxy-side phantom token parsing. Falls back to parent inject_mode when omitted."
},
"inject_header": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Override header name for proxy-side header/basic_auth modes. Falls back to parent inject_header when omitted."
},
"credential_format": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Override credential format for proxy-side header mode. Falls back to parent credential_format when omitted."
},
"path_pattern": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Override path pattern for proxy-side url_path mode. Falls back to parent path_pattern when omitted."
},
"path_replacement": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Override path replacement for proxy-side url_path mode. Falls back to parent path_replacement when omitted."
},
"query_param_name": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Override query parameter name for proxy-side query_param mode. Falls back to parent query_param_name when omitted."
}
}
},
"OAuth2Config": {
"type": "object",
"description": "OAuth2 client_credentials configuration for automatic token exchange. The proxy exchanges client_id + client_secret (or a client_assertion, e.g. SPIFFE private_key_jwt) for an access_token, caches it, and refreshes automatically before expiry. client_assertion is mutually exclusive with client_id/client_secret.",
"additionalProperties": false,
"required": ["token_url"],
"anyOf": [
{ "required": ["client_id", "client_secret"] },
{
"required": ["client_assertion"],
"properties": {
"client_assertion": { "$ref": "#/$defs/ClientAssertionConfig" }
}
}
],
"allOf": [
{
"not": {
"allOf": [
{ "required": ["client_id"] },
{ "required": ["client_assertion"], "properties": { "client_assertion": { "not": { "type": "null" } } } }
]
}
},
{
"not": {
"allOf": [
{ "required": ["client_secret"] },
{ "required": ["client_assertion"], "properties": { "client_assertion": { "not": { "type": "null" } } } }
]
}
}
],
"properties": {
"token_url": {
"type": "string",
"description": "Token endpoint URL (e.g., \"https://auth.example.com/oauth/token\"). Must use HTTPS, or HTTP only for loopback addresses."
},
"client_id": {
"type": "string",
"description": "Client ID — plain value or credential reference (env://, file://, op://). Mutually exclusive with client_assertion.",
"default": ""
},
"client_secret": {
"type": "string",
"description": "Client secret — credential reference (env://, file://, op://). Mutually exclusive with client_assertion.",
"default": ""
},
"scope": {
"type": "string",
"description": "OAuth2 scopes (space-separated). Empty or omitted means no scope parameter is sent.",
"default": ""
},
"client_assertion": {
"oneOf": [
{ "$ref": "#/$defs/ClientAssertionConfig" },
{ "type": "null" }
],
"description": "Client assertion configuration (e.g. SPIFFE private_key_jwt) used in place of client_id/client_secret."
},
"extra_params": {
"type": "object",
"additionalProperties": { "type": "string" },
"description": "Extra parameters merged into the token exchange POST body verbatim.",
"default": {}
}
}
},
"ClientAssertionConfig": {
"type": "object",
"description": "Client assertion used for OAuth2 token exchange instead of a client secret.",
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": ["type", "workload_api_socket", "audience"],
"properties": {
"type": { "type": "string", "enum": ["spiffe_jwt"] },
"workload_api_socket": {
"type": "string",
"description": "Path to the SPIRE agent Unix domain socket."
},
"audience": {
"type": "array",
"items": { "type": "string" },
"description": "Audience(s) for the minted JWT-SVID."
},
"svid_hint": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Select a specific SVID by SPIFFE ID when the Workload API returns multiple SVIDs for the same workload."
}
}
}
]
},
"AwsAuthConfig": {
"type": "object",
"description": "AWS SigV4 signing configuration for a credential route. All fields are optional: an empty {} block uses the default credential chain with region and service auto-detected from the upstream URL.",
"additionalProperties": false,
"properties": {
"profile": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "AWS profile name to use for credentials. If omitted, the default credential chain is used (environment variables → AWS_PROFILE → default profile → instance metadata). Must be non-empty if set."
},
"region": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Explicit SigV4 signing region (e.g., \"us-east-1\"). If omitted, auto-detected from the upstream URL. Must be non-empty and contain no whitespace if set."
},
"service": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Explicit SigV4 service name (e.g., \"bedrock\", \"s3\"). If omitted, auto-detected from the upstream URL. Must be non-empty and contain no whitespace if set."
}
}
},
"SpiffeAuthConfig": {
"type": "object",
"description": "SPIFFE/SPIRE Workload API authentication. Currently only type \"jwt\" is supported: a JWT-SVID is fetched from the SPIRE Workload API and injected as a bearer token; the sandboxed process sends plain requests with no credentials.",
"additionalProperties": false,
"required": ["type", "workload_api_socket", "audience"],
"properties": {
"type": {
"type": "string",
"enum": ["jwt"],
"description": "SPIFFE auth variant. Only \"jwt\" is currently supported."
},
"workload_api_socket": {
"type": "string",
"description": "Path to the SPIRE agent Unix domain socket."
},
"audience": {
"type": "array",
"items": { "type": "string" },
"description": "Audience(s) for the minted JWT-SVID."
},
"inject_header": {
"type": "string",
"description": "HTTP header to inject the JWT into.",
"default": "Authorization"
},
"credential_format": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Template with {} for the token. Defaults to \"Bearer {}\"."
},
"svid_hint": {
"oneOf": [
{ "type": "string" },
{ "type": "null" }
],
"description": "Select a specific SVID by SPIFFE ID when the Workload API returns multiple SVIDs for the same workload. When absent, the first SVID returned by the agent is used."
}
}
},
"PlatformOverrides": {
"type": "object",
"description": "Per-OS profile patches merged after extends resolution. Only the entry matching the current platform is applied; others are ignored.",
"additionalProperties": false,
"properties": {
"macos": {
"allOf": [
{ "$ref": "#" },
{
"not": {
"required": ["extends"],
"properties": { "extends": { "not": { "type": "null" } } }
}
},
{
"not": {
"required": ["platform_overrides"],
"properties": { "platform_overrides": { "not": { "type": "null" } } }
}
}
],
"description": "Override block applied only on macOS. Nesting extends or platform_overrides here is a parse error."
},
"linux": {
"allOf": [
{ "$ref": "#" },
{
"not": {
"required": ["extends"],
"properties": { "extends": { "not": { "type": "null" } } }
}
},
{
"not": {
"required": ["platform_overrides"],
"properties": { "platform_overrides": { "not": { "type": "null" } } }
}
}
],
"description": "Override block applied only on Linux. Nesting extends or platform_overrides here is a parse error."
},
"windows": {
"allOf": [
{ "$ref": "#" },
{
"not": {
"required": ["extends"],
"properties": { "extends": { "not": { "type": "null" } } }
}
},
{
"not": {
"required": ["platform_overrides"],
"properties": { "platform_overrides": { "not": { "type": "null" } } }
}
}
],
"description": "Override block applied only on Windows. Nesting extends or platform_overrides here is a parse error."
}
}
},
"RouteRateLimitConfig": {
"type": "object",
"description": "Per-route request-rate limit (RouteRateLimiter). A token bucket refilling at requests_per_minute and holding up to burst tokens. When the bucket is empty, a request is delayed up to max_delay_secs; a request that would wait longer is rejected with HTTP 429 (bounded delay then reject).",
"additionalProperties": false,
"required": ["requests_per_minute"],
"properties": {
"requests_per_minute": {
"type": "integer",
"minimum": 0,
"description": "Sustained request rate, in requests per minute. The token bucket refills at this rate. 0 disables the limiter for the route."
},
"burst": {
"type": "integer",
"minimum": 0,
"default": 5,
"description": "Burst capacity: instantaneous requests allowed before throttling begins. Clamped to at least 1 at runtime."
},
"max_delay_secs": {
"type": "integer",
"minimum": 0,
"default": 5,
"description": "Maximum seconds a request may be delayed before it is rejected with HTTP 429. Bounds the delay queue so a flood cannot exhaust proxy resources."
}
}
},
"SecretsConfig": {
"type": "object",
"description": "Maps keystore account names (or op://, bw://, apple-password://, env:// URIs) to environment variable names. Secrets are loaded from the system keystore under the service name \"nono\".",
"additionalProperties": {
"oneOf": [
{
"type": "string",
"description": "Environment variable name to inject the secret value into."
},
{
"type": "object",
"additionalProperties": false,
"required": ["env_var"],
"properties": {
"env_var": {
"type": "string",
"description": "Environment variable name to inject the secret value into."
},
"when": { "$ref": "#/$defs/WhenPredicate" }
}
}
]
}
},
"EnvironmentConfig": {
"type": "object",
"description": "Controls which environment variables are passed to the sandboxed process. By default all variables are inherited. Precedence (highest to lowest): 1. Hardcoded dangerous vars (always stripped), 2. deny_vars (stripped even if in allow_vars), 3. allow_vars (if non-empty, only matching vars pass).",
"additionalProperties": false,
"properties": {
"allow_vars": {
"type": "array",
"items": { "type": "string", "minLength": 1, "pattern": "^[^\\u0000]+$" },
"description": "Allow-list of environment variable names passed to the sandboxed process. Supports exact names (\"PATH\") and glob patterns where * may appear anywhere in the name (\"AWS_*\", \"*_TOKEN\", \"*SECRET*\"). A bare \"*\" matches everything. When empty or absent, all variables are allowed."
},
"deny_vars": {
"type": "array",
"items": { "type": "string", "minLength": 1, "pattern": "^[^\\u0000]+$" },
"description": "Deny-list of environment variable names stripped from the sandboxed process. Supports the same glob syntax as allow_vars (\"GH_TOKEN\", \"GITHUB_*\", \"*_TOKEN\", \"*SECRET*\"). Denied vars are stripped even if they also match allow_vars."
},
"case_insensitive_vars": {
"type": "boolean",
"default": false,
"description": "When true, allow_vars/deny_vars patterns are matched case-insensitively, so \"*token*\" also matches JENKINS_TOKEN, jenkins_token, and Jenkins_Token."
},
"set_vars": {
"type": "object",
"additionalProperties": { "type": "string" },
"description": "Static environment variables injected after environment filtering and before credential injection. PATH and NONO_* are reserved. Values support variable expansion ($HOME, $WORKDIR, $TMPDIR, $XDG_*, $NONO_CONFIG, $NONO_PACKAGES)."
}
}
},
"CommandPoliciesConfig": {
"type": "object",
"description": "tool-sandbox command-control policy.",
"additionalProperties": false,
"properties": {
"executable_dirs": {
"type": "array",
"items": { "type": "string" },
"description": "Additional directories searched during command target resolution before shim PATH is prepended."
},
"allow_writable_executables": {
"type": "boolean",
"description": "Explicit profile-wide trust downgrade that disables tool-sandbox checks for policy, deny-only, and outer executable allow-list paths writable through the sandbox capability set."
},
"entrypoint": {
"$ref": "#/$defs/CommandPolicyIdentifier",
"description": "Legacy session entrypoint hint. Current profiles should express direct session access with commands.<name>.sandbox or commands.<name>.from.session."
},
"approval_backends": {
"type": "object",
"additionalProperties": { "$ref": "#/$defs/ApprovalBackendConfig" },
"description": "Named approval backends used by approve decisions in invocation and endpoint policies."
},
"approval_defaults": {
"$ref": "#/$defs/ApprovalDefaultsConfig",
"description": "Default approval backend and timeout used when an approve decision does not route explicitly."
},
"credentials": {
"type": "object",
"additionalProperties": { "$ref": "#/$defs/CommandCredentialConfig" },
"description": "Named command credentials that may be injected only into selected child-tool-sandbox policies."
},
"commands": {
"type": "object",
"additionalProperties": { "$ref": "#/$defs/CommandPolicyConfig" },
"description": "Policy-controlled command definitions. A non-empty object activates tool-sandbox."
},
"deny_direct_exec_bypass": {
"type": "array",
"items": { "type": "string" },
"description": "Governance list of canonical executable files that child profiles may not re-grant through allow_direct_exec_bypass."
},
"session_export_env": {
"type": "array",
"items": { "type": "string" },
"description": "Env vars the session forwards to commands whose resolved caller is the session (exact/PREFIX_*/*). Bypasses allow_vars and the dangerous-var blocklist. PATH/NONO_* and 1Password credentials are always excluded; LD_*/DYLD_* require an exact-name pattern. Mirrors the per-command export_env field for the session caller."
}
}
},
"CommandCredentialConfig": {
"type": "object",
"additionalProperties": false,
"required": ["type"],
"properties": {
"type": {
"type": "string",
"enum": ["local-socket", "raw-file", "proxy", "ambient"],
"description": "Credential kind."
},
"path": {
"type": "string",
"description": "Path for raw-file credentials or local-socket credentials. For local-socket, may reference environment variables anywhere in the string, e.g. \"$XDG_RUNTIME_DIR/sccache.sock\"; commonly $SSH_AUTH_SOCK for SSH agent."
},
"mode": {
"type": "string",
"enum": ["connect"],
"description": "Local socket access mode. Currently only connect is supported."
},
"env_var": {
"type": "string",
"description": "Environment variable mapped into the child. For local-socket this receives the resolved socket path; for proxy this receives the phantom token."
},
"upstream": {
"type": "string",
"description": "Proxy credential upstream URL."
},
"credential_key": {
"type": "string",
"description": "Supervisor/proxy-side real credential reference. Supported forms include bare keyring account names and URI-backed sources such as env://, file://, keyring://, op://, bw://, and apple-password://."
},
"base_url_env_var": {
"type": "string",
"description": "Environment variable that points the child SDK/tool at the local proxy route."
},
"inject_header": {
"type": "string",
"description": "Upstream header used for proxy credential injection."
},
"credential_format": {
"type": "string",
"description": "Format string used when injecting the real proxy credential upstream."
},
"source": {
"$ref": "#/$defs/AmbientCredentialSourceConfig",
"description": "Optional supervisor-side credential source for ambient credentials or proxy credentials. For proxy credentials, use either source or credential_key, not both."
},
"tls_ca": {
"type": "string",
"description": "Optional PEM CA bundle used by proxy credentials for upstream TLS verification."
},
"tls_client_cert": {
"type": "string",
"description": "Optional PEM client certificate for proxy credential mutual TLS. Must be paired with tls_client_key."
},
"tls_client_key": {
"type": "string",
"description": "Optional PEM client private key for proxy credential mutual TLS. Must be paired with tls_client_cert."
},
"format": {
"type": "string",
"description": "Optional literal template for the visible phantom the sandbox sees, with '{}' standing in for a freshly minted random body (e.g. 'sk-ant-oat01-{}'). Lets a client that classifies a credential by sniffing a literal token prefix recognise the phantom. Only valid for ambient credentials."
}
}
},
"ApprovalDefaultsConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"backend": {
"$ref": "#/$defs/CommandPolicyIdentifier",
"description": "Default approval backend name."
},
"timeout_secs": {
"type": "integer",
"minimum": 1,
"description": "Default approval timeout in seconds."
}
}
},
"ApprovalBackendConfig": {
"type": "object",
"additionalProperties": false,
"required": ["type"],
"properties": {
"type": {
"type": "string",
"enum": ["terminal", "webhook", "chain"],
"description": "Approval backend kind."
},
"url": {
"type": "string",
"description": "Webhook URL for webhook approval backends."
},
"timeout_secs": {
"type": "integer",
"minimum": 1,
"description": "Backend-specific approval timeout in seconds."
},
"mode": {
"type": "string",
"enum": ["all", "any"],
"description": "Decision mode for chain approval backends."
},
"backends": {
"type": "array",
"items": { "$ref": "#/$defs/CommandPolicyIdentifier" },
"description": "Child backend names for chain approval backends."
}
}
},
"AmbientCredentialSourceConfig": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": ["type", "key"],
"properties": {
"type": { "type": "string", "const": "keystore" },
"key": {
"type": "string",
"description": "Credential reference resolved by the supervisor keystore backend."
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["type", "command"],
"properties": {
"type": { "type": "string", "const": "command" },
"command": {
"type": "string",
"description": "Supervisor-side command used to print the credential on stdout."
},
"args": {
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "Arguments passed to the supervisor-side credential command."
},
"timeout_secs": {
"type": "integer",
"minimum": 1,
"description": "Maximum time to wait for the credential command."
}
}
}
]
},
"InterceptRuleConfig": {
"type": "object",
"additionalProperties": false,
"oneOf": [{ "required": ["args"] }, { "required": ["match"] }],
"properties": {
"args": {
"type": "array",
"items": { "type": "string" },
"description": "Contiguous argument sequence matched within argv[1..]. An empty list is a catch-all and must be last. Broad single-argument rules such as [\"--force\"] match anywhere in the invocation, not only at the subcommand position."
},
"match": { "$ref": "#/$defs/InterceptRuleMatchConfig" },
"action": { "$ref": "#/$defs/InterceptActionConfig" }
}
},
"InterceptRuleMatchConfig": {
"type": "object",
"additionalProperties": false,
"anyOf": [{ "required": ["argv"] }, { "required": ["env"] }],
"properties": {
"argv": { "$ref": "#/$defs/InterceptArgvMatcherConfig" },
"env": {
"type": "object",
"minProperties": 1,
"additionalProperties": { "$ref": "#/$defs/EnvMatcherConfig" }
}
}
},
"InterceptActionConfig": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": ["type"],
"properties": {
"type": { "type": "string", "const": "passthrough" }
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["type", "stdout"],
"properties": {
"type": { "type": "string", "const": "respond" },
"stdout": { "type": "string" }
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["type"],
"properties": {
"type": { "type": "string", "const": "capture" }
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["type", "credential"],
"properties": {
"type": { "type": "string", "const": "capture_credential" },
"credential": { "$ref": "#/$defs/CommandPolicyIdentifier" }
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["type"],
"properties": {
"type": { "type": "string", "const": "approve" },
"timeout_secs": { "type": "integer", "minimum": 1 }
}
},
{
"type": "object",
"additionalProperties": false,
"required": ["type", "command"],
"properties": {
"type": { "type": "string", "const": "exec" },
"command": {
"type": "array",
"items": { "type": "string" },
"minItems": 1,
"description": "Run a helper in place of the matched subcommand, inside the command's sandbox. command[0] is the helper path (after $VAR expansion, must be absolute); command[1..] are fixed leading args inserted before the forwarded original arguments. The helper's stdout/stderr are streamed and its exit code propagated. The helper is resolved with identity expectations and is subject to the same non-writable-executable trust gate as a pinned executable."
}
}
}
]
},
"CommandPolicyConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"executable": {
"type": "string",
"description": "Optional exact executable file for this command. When set, tool-sandbox binds the command name to this canonical file instead of resolving the first PATH match."
},
"allow_writable_executable": {
"type": "boolean",
"description": "Explicit per-command trust downgrade for a pinned executable or parent directory writable through the sandbox capability set. Valid only when executable is set to an absolute file path. On macOS this remains path-racy and is not suitable for high-assurance policies."
},
"can_use": {
"type": "array",
"items": { "$ref": "#/$defs/CommandPolicyIdentifier" },
"description": "Other commands this command may invoke through tool-sandbox chaining. If no explicit self-invocation entry is configured, self-invocation keeps the command's current effective policy and does not require listing the command here."
},
"sandbox": {
"$ref": "#/$defs/CommandSandboxConfig",
"description": "Direct from.session sandbox shorthand. Must not be combined with from.session."
},
"from": {
"type": "object",
"additionalProperties": {
"oneOf": [
{ "type": "string", "enum": ["deny"] },
{ "$ref": "#/$defs/CommandEdgeConfig" },
{ "$ref": "#/$defs/CommandSandboxConfig" }
]
},
"description": "Caller-specific policies. Use the reserved caller session for direct session invocation. Values may be \"deny\", a bare sandbox shorthand, or an edge object with sandbox and invocation_policy."
},
"intercept": {
"type": "array",
"items": { "$ref": "#/$defs/InterceptRuleConfig" },
"description": "Ordered command argument-sequence intercept rules evaluated after invocation policy."
},
"allow_direct_exec_bypass": {
"type": "array",
"items": { "type": "string" },
"description": "Canonical executable paths allowed to bypass child-tool-sandbox when invoked directly, while PATH invocation remains shim-controlled."
},
"allow_direct_exec_bypass_with_credentials": {
"type": "boolean",
"description": "Second opt-in required before a credential-using command may have direct exec bypass."
},
"daemon_pid_source": {
"$ref": "#/$defs/DaemonPidSource",
"description": "Helper nono runs to learn the pid of a daemon this command spawns (e.g. a tmux server that double-forks and reparents to pid 1). When a caller's process ancestry is severed by that reparenting, the lineage marker runs this helper and attributes the severed daemon to this command only if the reported pid matches. Prints one pid. Consumed on macOS only for now."
},
"export_env": {
"type": "array",
"items": { "type": "string" },
"description": "Env vars this command forwards to commands it invokes (exact/PREFIX_*/*). Bypasses allow_vars and the dangerous-var blocklist. PATH/NONO_* and 1Password credentials are always excluded; LD_*/DYLD_* require an exact-name pattern."
}
}
},
"DaemonPidSource": {
"type": "object",
"additionalProperties": false,
"required": ["argv"],
"properties": {
"argv": {
"type": "array",
"items": { "type": "string" },
"description": "Helper program and args. The program is expanded (~, $WORKDIR, $TMPDIR, $UID, XDG) and must then be an absolute path. nono passes the daemon's context as a JSON object on stdin and reads the pid the helper prints on stdout."
},
"env": {
"type": "array",
"items": { "type": "string" },
"description": "Allowlist of the daemon's environment keys nono may forward into the helper's JSON input. Credential-named keys are dropped regardless."
}
}
},
"CommandEdgeConfig": {
"type": "object",
"additionalProperties": false,
"required": ["sandbox"],
"properties": {
"sandbox": {
"$ref": "#/$defs/CommandSandboxConfig",
"description": "Child sandbox selected for this caller edge."
},
"invocation_policy": {
"$ref": "#/$defs/InvocationPolicyConfig",
"description": "Optional argv and environment policy evaluated before launching the child command."
}
}
},
"CommandSandboxConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"fs_read": {
"type": "array",
"items": { "type": "string" },
"description": "Directory read grants for the selected child-tool-sandbox policy."
},
"fs_read_file": {
"type": "array",
"items": { "type": "string" },
"description": "Exact file read grants for the selected child-tool-sandbox policy."
},
"fs_write": {
"type": "array",
"items": { "type": "string" },
"description": "Directory write grants for the selected child-tool-sandbox policy."
},
"fs_write_file": {
"type": "array",
"items": { "type": "string" },
"description": "Exact file write grants for the selected child-tool-sandbox policy."
},
"unix_socket_bind": {
"type": "array",
"items": { "type": "string" },
"description": "AF_UNIX socket bind grants for the selected child-tool-sandbox policy."
},
"use_credentials": {
"type": "array",
"items": { "$ref": "#/$defs/CommandPolicyIdentifier" },
"description": "Credential handles injected into this selected child-tool-sandbox policy."
},
"credentials": {
"type": "array",
"items": { "$ref": "#/$defs/CommandCredentialGrantConfig" },
"description": "Credential handles injected into this selected child-tool-sandbox policy, optionally with endpoint policy constraints."
},
"argv_prepend": {
"type": "array",
"items": { "type": "string" },
"description": "Arguments inserted after the synthesized argv[0] and before shim-captured argv[1..] for this selected child-tool-sandbox policy."
},
"network": {
"$ref": "#/$defs/CommandNetworkConfig",
"description": "Network grants for this selected child-tool-sandbox policy."
},
"environment": {
"$ref": "#/$defs/CommandEnvironmentConfig",
"description": "Environment carry-over rules for this selected child-tool-sandbox policy."
},
"allow_raw_file_credentials_in_chained_policy": {
"type": "boolean",
"description": "Explicit opt-in allowing raw-file credentials in a non-session caller policy."
},
"resources": {
"$ref": "#/$defs/CommandResourceConfig",
"description": "Optional child resource limits. Current runtimes fail closed if requested resources cannot be enforced."
},
"stdio": {
"$ref": "#/$defs/CommandStdioConfig",
"description": "Optional stdout/stderr byte limits enforced by brokered stdio."
},
"open_urls": {
"$ref": "#/$defs/OpenUrlConfig",
"description": "Runtime-delegated URL opening for this command (e.g. OAuth2 login). The unsandboxed tool-sandbox runtime validates each requested URL against allow_origins before opening it in the user's browser. When omitted, inherits from the base profile; when present, replaces it entirely."
},
"allow_launch_services": {
"type": "boolean",
"description": "macOS-only: allow this command to open URLs directly via LaunchServices instead of the origin-validated browser shim. Ignored on Linux. Defaults to false."
},
"unsafe_macos_seatbelt_rules": {
"type": "array",
"items": { "type": "string" },
"description": "macOS-only. Expert escape hatch: raw Seatbelt S-expression rules appended to this command's child sandbox profile, emitted after the generated denies (including the exec gate's (deny process-exec*)), so a later (allow ...) wins under Seatbelt's last-matching-rule semantics. Scoped to a single command or per-intercept override. Ignored on Linux."
}
}
},
"CommandCredentialGrantConfig": {
"oneOf": [
{ "$ref": "#/$defs/CommandPolicyIdentifier" },
{
"type": "object",
"additionalProperties": false,
"required": ["name"],
"properties": {
"name": {
"$ref": "#/$defs/CommandPolicyIdentifier",
"description": "Credential handle name."
},
"endpoint_policy": {
"$ref": "#/$defs/EndpointPolicyConfig",
"description": "Optional method/path policy for proxy credentials."
}
}
}
]
},
"EndpointPolicyConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"default": { "$ref": "#/$defs/PolicyDecisionConfig" },
"deny": {
"type": "array",
"items": { "$ref": "#/$defs/EndpointRuleConfig" }
},
"approve": {
"type": "array",
"items": { "$ref": "#/$defs/EndpointRuleConfig" }
},
"allow": {
"type": "array",
"items": { "$ref": "#/$defs/EndpointRuleConfig" }
}
}
},
"EndpointRuleConfig": {
"type": "object",
"additionalProperties": false,
"required": ["method", "path"],
"properties": {
"method": { "type": "string" },
"path": { "type": "string" },
"backend": { "$ref": "#/$defs/CommandPolicyIdentifier" },
"reason": { "type": "string" },
"timeout_secs": { "type": "integer", "minimum": 1 }
}
},
"InvocationPolicyConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"default": { "$ref": "#/$defs/PolicyDecisionConfig" },
"deny": {
"type": "array",
"items": { "$ref": "#/$defs/InvocationRuleConfig" }
},
"approve": {
"type": "array",
"items": { "$ref": "#/$defs/InvocationRuleConfig" }
},
"allow": {
"type": "array",
"items": { "$ref": "#/$defs/InvocationRuleConfig" }
}
}
},
"InvocationRuleConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"argv": { "$ref": "#/$defs/ArgvMatcherConfig" },
"env": {
"type": "object",
"additionalProperties": { "$ref": "#/$defs/EnvMatcherConfig" }
},
"backend": { "$ref": "#/$defs/CommandPolicyIdentifier" },
"reason": { "type": "string" },
"timeout_secs": { "type": "integer", "minimum": 1 }
}
},
"ArgvMatcherConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"exact": {
"type": "array",
"items": { "type": "string" }
},
"prefix": {
"type": "array",
"items": { "type": "string" }
},
"contains": {
"type": "array",
"items": { "type": "string" }
}
}
},
"InterceptArgvMatcherConfig": {
"type": "object",
"additionalProperties": false,
"oneOf": [
{
"required": ["exact"],
"not": {
"anyOf": [{ "required": ["prefix"] }, { "required": ["contains"] }]
}
},
{
"required": ["prefix"],
"not": {
"anyOf": [{ "required": ["exact"] }, { "required": ["contains"] }]
}
},
{
"required": ["contains"],
"not": {
"anyOf": [{ "required": ["exact"] }, { "required": ["prefix"] }]
}
}
],
"properties": {
"exact": {
"type": "array",
"minItems": 1,
"items": { "type": "string" }
},
"prefix": {
"type": "array",
"minItems": 1,
"items": { "type": "string" }
},
"contains": {
"type": "array",
"minItems": 1,
"items": { "type": "string" }
}
}
},
"EnvMatcherConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"one_of": {
"type": "array",
"items": { "type": "string" }
},
"equals": { "type": "string" }
}
},
"PolicyDecisionConfig": {
"oneOf": [
{
"type": "string",
"enum": ["deny", "approve", "allow"]
},
{
"type": "object",
"additionalProperties": false,
"required": ["decision"],
"properties": {
"decision": {
"type": "string",
"enum": ["deny", "approve", "allow"]
},
"backend": { "$ref": "#/$defs/CommandPolicyIdentifier" },
"timeout_secs": { "type": "integer", "minimum": 1 }
}
}
]
},
"CommandResourceConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"backend": {
"type": "string",
"enum": ["auto", "cgroup", "portable"]
},
"fallback": {
"type": "string",
"enum": ["warn_if_weaker", "fail_if_weaker"]
},
"memory_bytes": { "type": "integer", "minimum": 0 },
"cpu_seconds": { "type": "integer", "minimum": 0 },
"wall_time_seconds": { "type": "integer", "minimum": 0 },
"max_processes": { "type": "integer", "minimum": 0 },
"max_file_size_bytes": { "type": "integer", "minimum": 0 },
"max_output_bytes": { "type": "integer", "minimum": 0 }
}
},
"CommandStdioConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"stdout": { "$ref": "#/$defs/CommandStdioStreamConfig" },
"stderr": { "$ref": "#/$defs/CommandStdioStreamConfig" }
}
},
"CommandStdioStreamConfig": {
"type": "object",
"additionalProperties": false,
"required": ["max_bytes"],
"properties": {
"max_bytes": { "type": "integer", "minimum": 1 },
"on_limit": {
"type": "string",
"enum": ["truncate", "terminate", "deny"]
}
}
},
"CommandNetworkConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"allow_all": {
"type": "boolean",
"description": "Allow unrestricted child network access."
},
"allow_domain": {
"type": "array",
"items": { "type": "string" },
"description": "Hostname egress allow-list. Valid only with an enforceable nono proxy/helper mode."
},
"tcp_connect_ports": {
"type": "array",
"items": { "type": "integer", "minimum": 0, "maximum": 65535 },
"description": "Raw TCP connect ports. Requires Landlock ABI v4+ TCP support and is not hostname-filtered."
},
"tcp_bind_ports": {
"type": "array",
"items": { "type": "integer", "minimum": 0, "maximum": 65535 },
"description": "Raw TCP bind ports. Requires Landlock ABI v4+ TCP support."
}
}
},
"CommandEnvironmentConfig": {
"type": "object",
"additionalProperties": false,
"properties": {
"allow_vars": {
"type": "array",
"items": { "type": "string" },
"description": "Authoritative environment variable allow-list for tool-sandbox. Supports exact names, trailing-prefix wildcards such as AWS_*, and a bare *."
},
"set_vars": {
"type": "object",
"additionalProperties": { "type": "string" },
"description": "Static environment variables injected after tool-sandbox environment filtering and before credential injection. PATH and NONO_* are reserved."
}
}
},
"CommandPolicyIdentifier": {
"type": "string",
"pattern": "^[A-Za-z0-9._+-]+$",
"not": {
"enum": [".", "..", "session"]
},
"description": "tool-sandbox command or credential identifier."
},
"WorkdirConfig": {
"type": "object",
"description": "Working directory access configuration.",
"additionalProperties": false,
"properties": {
"access": {
"$ref": "#/$defs/WorkdirAccess",
"description": "Access level for the current working directory.",
"default": "none"
}
}
},
"DiagnosticsConfig": {
"type": "object",
"description": "Diagnostic output controls. Suppressions only affect nono's footer; the sandbox still denies the underlying operations.",
"additionalProperties": false,
"properties": {
"suppress_system_services": {
"type": "array",
"items": { "type": "string" },
"description": "Non-filesystem sandbox operation names to hide from diagnostic footers, such as forbidden-exec-sugid."
}
}
},
"WorkdirAccess": {
"type": "string",
"enum": ["none", "read", "write", "readwrite"],
"description": "Working directory access level controlling whether and how the current working directory is shared with the sandboxed process."
},
"HooksConfig": {
"type": "object",
"description": "Hook configurations for target applications. Keys are application names (e.g., \"claude-code\"), values define the hook to install.",
"additionalProperties": {
"$ref": "#/$defs/HookConfig"
}
},
"HookConfig": {
"type": "object",
"description": "Hook definition for a target application.",
"additionalProperties": false,
"required": ["event", "matcher", "script"],
"properties": {
"event": {
"type": "string",
"description": "Event that triggers the hook (e.g., \"PostToolUseFailure\")."
},
"matcher": {
"type": "string",
"description": "Regex pattern to match tool names (e.g., \"Read|Write|Edit|Bash\")."
},
"script": {
"type": "string",
"description": "Script filename from data/hooks/ to install."
}
}
},
"SessionHooks": {
"type": "object",
"description": "Session lifecycle hooks. before runs before the sandboxed child is forked; after runs after it exits. Both run outside the sandbox with host privileges.",
"additionalProperties": false,
"properties": {
"before": {
"$ref": "#/$defs/SessionHook",
"description": "Hook executed before the sandboxed process starts. May export environment variables to the sandboxed child via NONO_ENV_FILE."
},
"after": {
"$ref": "#/$defs/SessionHook",
"description": "Hook executed after the sandboxed process exits. Receives the child exit code via NONO_EXIT_CODE."
}
}
},
"SessionHook": {
"type": "object",
"description": "A single session lifecycle hook configuration.",
"additionalProperties": false,
"required": ["script"],
"properties": {
"script": {
"type": "string",
"description": "Path to the hook script. Supports variable expansion ($HOME, $WORKDIR, $TMPDIR, $XDG_*, $NONO_CONFIG, $NONO_PACKAGES) so shared profiles don't need a hardcoded per-machine path; the expanded result must be an absolute path. Must be an executable regular file owned by the current user or root, not located in a world-writable directory. Expanded and validated at execution time."
},
"timeout_secs": {
"type": "integer",
"minimum": 1,
"description": "Optional timeout in seconds. If set, the hook is killed (SIGTERM then SIGKILL) after this duration. If absent, no timeout is enforced."
}
}
},
"RollbackConfig": {
"type": "object",
"description": "Rollback snapshot configuration controlling which files are excluded from undo snapshots.",
"additionalProperties": false,
"properties": {
"exclude_patterns": {
"type": "array",
"items": { "type": "string" },
"description": "Patterns to exclude from rollback snapshots. Matched against path components (exact match) or as substrings of the full path if they contain a slash."
},
"exclude_globs": {
"type": "array",
"items": { "type": "string" },
"description": "Glob patterns to exclude from rollback snapshots. Matched against the filename using standard glob syntax."
}
}
},
"OpenUrlConfig": {
"type": "object",
"description": "Configuration for supervisor-delegated URL opening, used for OAuth2 login flows and similar operations.",
"additionalProperties": false,
"properties": {
"allow_origins": {
"type": "array",
"items": { "$ref": "#/$defs/ConditionalOrigin" },
"description": "Allowed URL origins (scheme + host, e.g., \"https://console.anthropic.com\"). The supervisor validates each URL open request against this list. An empty list means no URLs are allowed."
},
"allow_localhost": {
"type": "boolean",
"description": "Allow opening http://localhost and http://127.0.0.1 URLs, typically for OAuth2 callback handlers."
}
}
}
}
}