Repository navigation
Labels
Description
Summary
The CLI's file sandbox moved out of config.yaml into its own userspace policy file, ~/.infer/sandbox.yaml (source PR: inference-gateway/cli#1473). The tools.sandbox.directories and tools.sandbox.protected_paths keys are gone, and infer config set no longer reaches the sandbox. The docs site still describes the old keys.
The new file has one section per resource, today filesystem with two lists:
filesystem:
allowed: # the sandbox. Outside it the user is asked. First match wins.
- .
- /tmp
- path: vendor/
access: read # read | write (default write). A write here asks.
denied: # always wins over allowed, a blocking entry over one that asks
- path: .infer/
on_violation: approval # block | approval (default block)
- .git/
- "*.env"What changed for users:
- Entries are a path string or a map. Allowed entries take
access: read|write, denied entries takeon_violation: block|approval. Paths are anchored (/abs,~/x,.,./x) or patterns matched at any depth (dir/,*.glob,name). - Defaults: allowed
.and/tmp. Denied.infer/(approval),.git/,*.env,.environment,auth.yaml,*.key,*.pem,id_rsa,id_dsa,id_ecdsa,id_ed25519. - The config dirs (
.infer/and~/.infer/) ask before every read and write, since their files can hold tokens. Skills, plans, plugins, memory,~/.infer/tmpand other runtime output stay open through the built-in carve-outs. - Only
~/.infer/sandbox.yamlis read. A project.infer/sandbox.yamlis ignored, and the agent's file tools can never write the policy file. - A list the file leaves out keeps its default. A file that fails to parse or validate stops
inferfrom starting. - When the user approves a denied path, the grant lasts for the session. "Always" persists it into
sandbox.yaml, except for paths matched by a denied entry, which stay session-only. INFER_TOOLS_SANDBOX_DIRECTORIES(and the daemon's per-threadsandbox_directories) now adds directories tofilesystem.allowedinstead of replacing the list.infer initseeds~/.infer/sandbox.yamlwith the defaults.
Affected pages:
cli.md: the tools config examples at "Sandbox directories" (infer config set tools.sandbox.directories), the custom tools trust note namingtools.sandbox.directoriesandtools.sandbox.protected_paths, theconfig tools sandbox add DIRmigration table row, the CI example settingtools.sandbox.directories, the "Protected Paths" section and its links from the auth.yaml and~/.infer/tmpparagraphs, and the Security section.cli-skills.md: the "Skills sandbox carve-out" section, including "How it relates totools.sandbox.directories", thetools.sandbox.protected_paths winsbullet and thetools.sandbox.directories: []note.
The in-repo reference to mirror is docs/configuration-reference.md (the sandbox.yaml entry) and internal/sandbox/README.md in inference-gateway/cli.
Acceptance Criteria
- No page mentions
tools.sandbox.directories,tools.sandbox.protected_pathsorinfer config setfor the sandbox - A sandbox section documents
~/.infer/sandbox.yamlwith the example above, the entry forms, the defaults and the decision order (denied first with block over approval, then carve-outs, then the first matching allowed entry, then ask) - The docs state the config dirs ask before reads and writes, while skills, plans, plugins, memory and runtime output stay open
- The docs state a project
.infer/sandbox.yamlis ignored, an omitted list keeps its default, and an invalid file stops the CLI from starting - Grants are described: session-only by default, "always" persists to
sandbox.yaml, except for paths matched by a denied entry -
INFER_TOOLS_SANDBOX_DIRECTORIESis documented as adding allowed directories - The "Protected Paths" anchors and the skills carve-out page point at the new sandbox section
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Oct 2, 2026
@claude can you document this?
inference-gateway-maintainer commentedon Oct 2, 2026
Claude finished @edenreich's task in 4m 0s —— View job •
docs/issue-905-20261002-1312• Create PR ➔Documented the CLI sandbox.yaml policy
cli.md,cli-skills.md,cli-hooks.md, plus the upstreaminternal/sandbox/README.mdandconfiguration-reference.mdfrom the source branch)cli.md(/cli/#file-sandbox)tools.sandbox.directories/tools.sandbox.protected_paths/infer config setfor the sandboxcli-skills.mdand the hook path note incli-hooks.md#protected-pathsanchorsbun run format:check,bun run lint:md,bun run buildall passWhat the new section covers: the
filesystem.allowed/filesystem.deniedexample, entry forms (access: read|write,on_violation: block|approval), anchored paths vs any-depth patterns, the defaults, the decision order (denied first with block over approval, then carve-outs, then the first matching allowed entry, then ask), the config dirs asking before every read and write while skills/plans/plugins/memory/artifacts/runtime output stay open, loading rules (userspace only, project copy ignored, omitted list keeps its default, invalid file stops startup, the policy file is unwritable by the agent), session vs "always" grants with the denied-entry exception, andINFER_TOOLS_SANDBOX_DIRECTORIES/ the daemon'ssandbox_directoriesas additive.Also added
sandbox.yamlto the configuration-files table and to theinfer initseed list - not in the acceptance criteria, but the table listed every other userspace file.| Branch
refactor(sandbox): extract the sandbox into its own bounded context a…
inference-gateway-releaser commentedon Oct 4, 2026
🎉 This issue has been resolved in version 0.9.21 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀