Profiles
Why Profiles?
Manually specifying capabilities for every tool is tedious and error-prone:Predefined Profiles vs User Profiles
Predefined profiles (shipped with nono or installed via packs) cover two things:- Agent packs — profiles for specific AI coding agents (Claude Code, Codex, opencode, openclaw). These grant the exact paths each agent needs to run, including its config directory, credential stores, and runtime group.
- Language runtimes — profiles for common developer workflows (node-dev, python-dev, go-dev, rust-dev). These include the appropriate runtime group and a developer network profile.
java-dev profile cannot know whether your JDK config lives in /etc/java-openjdk, /etc/java21-openjdk, or somewhere else entirely — that depends on your system.
Environment-specific additions belong in a user profile. Write a profile that extends the closest predefined profile and adds only what your environment requires:
~/.config/nono/profiles/java-dev-local.json and use it with:
Profile Sources
Profiles can come from three sources, in order of precedence:
CLI flags always override profile settings.
nono resolves config paths via
$XDG_CONFIG_HOME/nono/ on every platform. If
you have not set XDG_CONFIG_HOME — typical on macOS — that is the same as
~/.config/nono/ shown above. Set XDG_CONFIG_HOME only when you want
config elsewhere; profile JSON path grants should use $XDG_CONFIG_HOME,
$NONO_CONFIG, or $NONO_PACKAGES rather than hardcoded $HOME/.config/....Profile Format
Profiles use JSON format:Session Hooks
Session hooks are scripts that run before or after the sandboxed process, outside the sandbox with host privileges. Useful for setup and cleanup tasks the sandboxed process should not have access to — for example, creating a private TMPDIR per session.Configuration
Bothbefore and after are optional. Each hook specifies a script path and an optional timeout:
script(required): absolute path to an executable script.timeout_secs(optional): kills the script if it exceeds this duration.
Before hook
Runs before the sandboxed process starts. The script receivesNONO_SESSION_ID, NONO_WORKDIR, and NONO_ENV_FILE — a temporary file where KEY=VALUE lines can be written to export environment variables to the sandboxed process.
After hook
Runs after the sandboxed process exits. ReceivesNONO_SESSION_ID, NONO_WORKDIR, and NONO_EXIT_CODE. Cleanup only — does not export environment variables.
AF_UNIX Socket Grants
Theunix_socket* filesystem fields grant connect(2) (and optionally
bind(2)) on pathname AF_UNIX sockets. Abstract-namespace and unnamed
sockets are never grantable — only filesystem-backed socket paths.
unix_socket_dir* forms are non-recursive at the socket layer: only
sockets directly inside the named directory are covered. Use
unix_socket_subtree* when a tool creates sockets below nested
subdirectories. The implied filesystem grant is recursive (Landlock’s
only expressible granularity), so socket scope is enforced separately by
the supervisor (Linux) or Seatbelt path emission (macOS).
Today, macOS enforces the direct-child versus subtree distinction in Seatbelt.
Linux V4+ currently relies on Landlock filesystem rules for pathname AF_UNIX,
so directory socket grants are recursive there until the seccomp AF_UNIX
allowlist mediation path is enabled.
Under restricted network modes (--block-net or --network-profile),
connect(2) to a Unix socket requires an explicit unix_socket* grant
— a plain allow_file/allow grant no longer implicitly permits it.
Working Directory
Theworkdir section controls whether and how the current working directory is automatically shared with the sandboxed process.
When a profile specifies a workdir access level, nono will prompt the user to confirm CWD sharing (unless
--allow-cwd is used to skip the prompt). --allow-cwd grants access to the directory at that profile’s workdir level — so with "none" (the default profile) it grants nothing. Pair --allow-cwd with a profile that sets a workdir level, or grant the directory explicitly with --allow/--read.
Filesystem Overrides and Group Composition
Fine-grained additive and subtractive composition lives across three canonical sections:filesystem— path-based allow, deny, and deny-exemption entriesgroups— policy group inclusion (include) and removal (exclude)commands— startup-time command allow/deny (deprecated since v0.33.0; not enforced on child processes)
Renamed in issue #594. The old top-level
policy section was dissolved into filesystem, groups, and commands in the canonical schema. Legacy names still deserialize with a deprecation warning; see the migration table in nono profile guide for the full mapping. The legacy keys will be removed in v1.0.0.Adding a Deny Rule to an Inherited Profile
Block a specific path that a base profile would otherwise allow:Blocking Container Access (Docker, Podman, kubectl)
Usefilesystem.deny as the enforcement mechanism. commands.deny remains deprecated startup-only compatibility behavior:
filesystem.deny on a socket path also emits a network-outbound deny — Seatbelt classifies connect(2) as a network operation, so a file deny alone won’t block it. Prefer path- and network-based controls; commands.deny is not enforced for child processes.
Adding Write-Only Access
Grant write-only access to a directory without granting read:Removing Groups from an Inherited Profile
Remove the deprecated startup-only command-gating group to allowrm, chmod, etc.:
Overriding a Deny Rule for a Specific Path
Some deny groups (likedeny_credentials) are marked as required and cannot be excluded. Use filesystem.bypass_protection to punch a targeted hole through a deny group for a specific path. The path must also be explicitly granted via another filesystem entry — bypass_protection only removes the deny rule, it does not implicitly grant access.
~/.docker even though deny_credentials blocks it by default. The deny override does not implicitly grant access — the matching filesystem.allow entry is required.
This is equivalent to the CLI flag --bypass-protection:
Suppressing Save Suggestions Without Granting Access
Usefilesystem.suppress_save_prompt when a path is expected to be denied and
you do not want nono to keep offering it as a profile addition:
filesystem.suppress_save_prompt only suppresses the save-profile suggestion
for matching denials. The sandbox still denies the path, and the diagnostic
footer still shows the denial, annotated with [save skipped] so it is clear
why the path does not appear in the save prompt.
The interactive save prompt applies this to every listed path suggestion when
you choose suppress; it does not create any allow/read/write grants.
Suppressing Expected macOS System-Service Diagnostics
Usediagnostics.suppress_system_services when a macOS Seatbelt operation is
expected to be denied and you do not want nono to repeat the diagnostic footer
(or offer a save-profile prompt) on every run:
user-preference-read (CFPreferences / NSUserDefaults probes from npm
and other Node tools) or forbidden-exec-sugid. Suppression is output-only:
the sandbox still denies the operation.
Unlike filesystem.suppress_save_prompt, this hides matching violations from
the diagnostic footer entirely. There is no CLI flag equivalent yet; add the
operation name to your profile. To silence all post-run diagnostics instead,
use --no-diagnostics.
filesystem, groups, commands, and diagnostics fields are additive across inheritance. A child profile’s filesystem.deny is merged with the base profile’s filesystem.deny, groups.exclude from both levels are combined, and diagnostics.suppress_system_services entries from both profiles are appended and deduplicated.Network Configuration
Thenetwork section controls network access and credential injection.
Custom Credentials
Thecustom_credentials field lets you define credential services for any API:
See Credential Injection for complete documentation.
Hooks
Thehooks section defines hooks that nono will automatically install for specific applications.
Interactive Mode (deprecated)
Theinteractive field is parsed for backward compatibility but ignored. Supervised mode (the default) preserves the TTY, making this field unnecessary.
Rollback Exclusions
Therollback section controls which files are excluded from atomic rollback snapshots:
Skip Directories
Useskipdirs to extend the built-in heavy-directory skip list for pre-exec trust scanning and rollback preflight:
Environment Variables
Profiles support these environment variables in path values:Creating User Profiles
Usenono profile init to scaffold a new profile:
Overriding Pack Profiles
CLI flags always take precedence over profile settings:network.network_profile to null in the child:
Groups
Groups are named, composable collections of security rules. Profiles reference groups by name in theirgroups.include field.
How Groups Compose
Every profile’s effective capability set is built through composition:- default_profile_groups come from the built-in
defaultprofile - profile.groups.include adds additional groups on top
- profile.groups.exclude removes groups from the composed set (exclusion wins)
- profile.filesystem.allow/read/write, profile.filesystem.deny, and profile.commands.allow/deny apply additive overrides
- profile.filesystem.bypass_protection punches targeted holes through deny groups (requires a matching grant in
filesystem.allow/read/write) - CLI overrides (
--allow,--read,--bypass-protection, etc.) are applied last
profile.filesystem.suppress_save_prompt and --suppress-save-prompt are
prompt filters only; they do not participate in capability enforcement. The
older filesystem.ignore and --ignore-denied forms are accepted as aliases,
but new examples use the explicit suppress wording to avoid suggesting an
access grant.
profile.diagnostics.suppress_system_services is also output-only (macOS). It
hides recurring non-filesystem Seatbelt violations from diagnostic footers and
save-profile prompts without granting the underlying operation.
Exclusions are applied after group addition. If the same group appears in both
groups.include and groups.exclude, the exclusion wins.
Group Taxonomy
Groups use a structured allow/deny taxonomy:Allow Operations
Deny Operations
Other
Built-in Groups
nono ships with 32 built-in groups: Deny groups (block sensitive content):deny_credentials- SSH keys, cloud credentials, GPG keys, container and package manager tokensdeny_keychains_macos- macOS Keychain databases, 1Password, password-storedeny_keychains_linux- Linux keyring, 1Password, password-storedeny_browser_data_macos- Browser data on macOS (Chrome, Firefox, Safari, Edge, Arc, Brave)deny_browser_data_linux- Browser data on Linux (Chrome, Firefox, Edge, Brave)deny_macos_private- macOS Messages, Mail, Cookies, MobileSyncdeny_shell_history- Shell history files (.bash_history, .zsh_history, .python_history)deny_shell_configs- Shell config files that may contain API keys (.bashrc, .zshrc, .profile, .env)
unlink_protection- Prevents file deletion, with override for user-writable pathsdangerous_commands- Blocksrm,dd,chmod,sudo,mkfs,pip,npm,kill, etc.dangerous_commands_macos- macOS-specific:srm,brew,launchctldangerous_commands_linux- Linux-specific:shred,mkfs.*,fdisk,systemctl,apt,yum,dnf,pacman
system_read_macos- macOS system libraries, frameworks, dyld cachesystem_read_linux- Linux system libraries, locale datasystem_write_macos- macOS temp directories, cache pathssystem_write_linux- Linux temp directories
user_caches_macos- ~/Library/Caches, ~/Library/Logs, ~/Library/Preferencesuser_caches_linux- ~/.cache, ~/.local/state
node_runtime- nvm, fnm, npm, pnpm, voltarust_runtime- rustup, cargopython_runtime- pyenv, conda, pip, uvgo_runtime- ~/go, /usr/local/gojava_runtime- SDKMAN (/.sdkman), Maven (/.m2/repository,/.m2/wrapper), Gradle (/.gradle/caches, ~/.gradle/wrapper)nix_runtime- Nix profile paths, /nix/store, /nix/var (Linux only)user_tools- Local bins, .desktop files, man pages, shell completionshomebrew- /opt/homebrew, /usr/local/Cellar, /usr/local/opt (macOS only)
claude_code_macos- macOS Keychain for Claude Code credential storageclaude_code_linux- ~/.local/share/claudeclaude_cache_linux- ~/.cache/claude-cli-nodejscodex_macos- macOS Keychain for Codex credential storageopencode_linux- ~/.opencode/bin (Linux only, needed for Landlock exec)vscode_macos- ~/.vscode, ~/Library/Application Support/Codevscode_linux- ~/.vscode, ~/.config/Code
Command blocking is a best-effort surface-level control. It matches against the executable name being invoked directly. A process can bypass this by calling the equivalent syscall from within an allowed interpreter (e.g.,
os.remove() in Python, fs.unlinkSync() in Node.js) or by invoking a renamed copy of the binary. For hard filesystem protection, rely on the kernel-enforced deny groups and unlink_protection, which cannot be bypassed from userspace regardless of how the operation is invoked.Platform-Specific Groups
Groups with aplatform field only apply on that OS:
platform field (like deny_credentials) apply on all platforms.
Platform-specific groups use _macos or _linux suffixes by convention.
Platform Differences
macOS (Seatbelt) supports full deny-within-allow semantics. A group can allow/Users but deny /Users/luke/.ssh and the deny takes precedence.
Linux (Landlock) is strictly allow-list. Deny groups are implemented as exclusion filters - broad allow groups that overlap deny paths will generate warnings. Avoid granting access to parent directories of deny paths on Linux.
Available Profiles
default
The base profile that all other profiles extend. Provides system path access, deny groups for sensitive content, and deprecated startup-only command gating. Does not grant working directory access or any user-specific paths. Groups:deny_credentials, deny_keychains_macos, deny_keychains_linux, deny_browser_data_macos, deny_browser_data_linux, deny_macos_private, deny_shell_history, deny_shell_configs, system_read_macos, system_read_linux, system_write_macos, system_write_linux, user_tools, homebrew, dangerous_commands, dangerous_commands_macos, dangerous_commands_linux
Network: Allowed
CWD: None
claude-code
claude_code_macos, claude_code_linux, user_caches_macos, claude_cache_linux, node_runtime, rust_runtime, python_runtime, vscode_macos, vscode_linux, nix_runtime, git_config, unlink_protection (plus default groups)
Filesystem: ~/.claude (read+write), ~/.claude.json and ~/.claude.json.lock (read+write), plus platform-specific Claude Code and VS Code paths from the matching _macos or _linux groups, and git config files from git_config group
Network: Allowed
CWD: Read+write
Special: Auto-installs Claude Code hooks. OAuth2 login support via open_urls (allows https://claude.ai and localhost). Profile opts into allow_launch_services for macOS browser opening.
codex
codex_macos, node_runtime, rust_runtime, python_runtime, nix_runtime, git_config, unlink_protection (plus default groups)
Filesystem: ~/.codex (read+write), plus git config files from git_config group
Network: Allowed
CWD: Read+write
Special: OAuth2 login support via open_urls (allows https://auth.openai.com and localhost). Profile opts into allow_launch_services.
opencode
user_caches_macos, user_caches_linux, node_runtime, opencode_linux, git_config, unlink_protection (plus default groups)
Filesystem: ~/.config/opencode, ~/.cache/opencode, ~/.local/share/opencode, ~/.local/share/opentui (all read+write), plus git config files from git_config group
Network: Allowed
CWD: Read+write
openclaw
node_runtime (plus default groups)
Filesystem: ~/.openclaw, ~/.config/openclaw, ~/.local, $TMPDIR/openclaw-$UID (all read+write)
Network: Allowed
CWD: Read-only
python-dev
python_runtime (plus default groups)
Network: Allowed, with developer network profile for host filtering
CWD: Read+write
node-dev
node_runtime (plus default groups)
Network: Allowed, with developer network profile for host filtering
CWD: Read+write
go-dev
go_runtime (plus default groups)
Network: Allowed, with developer network profile for host filtering
CWD: Read+write
rust-dev
rust_runtime (plus default groups)
Network: Allowed, with developer network profile for host filtering
CWD: Read+write
java-dev
java_runtime (plus default groups)
Network: Allowed, with developer network profile for host filtering
CWD: Read+write
java-dev covers SDKMAN-managed JDKs, Maven, and Gradle. It does not include
system JDK config paths (e.g. /etc/java21-openjdk) because these vary by
distribution and installation method. Add them in a user profile that extends
java-dev — see Predefined Profiles vs User Profiles.Requesting New Profiles
If you’d like a profile for a tool not listed here:- Open an issue on the nono GitHub repository
- Include:
- Tool name and repository URL
- Required filesystem access patterns
- Network requirements
- Any special considerations