Repository navigation
Description
Summary
The CLI's sandbox.yaml gains filesystem.enforce (default true). Every Bash command the allow-list runs unattended (in auto mode, every command) runs under an OS sandbox that lets it read and execute anything but write only under the writable allowed paths, the grants, the carve-outs, the temp dir and the Go, cargo and npm caches - Landlock on Linux, Seatbelt on macOS, nothing on Windows. A command the user approved runs as approved, unconfined. On macOS the kernel also refuses to read, rename or delete the files the blocking denied entries name (auth.yaml, *.env, *.key, ...), under any spelling, symlink, copy or clone, while directory entries such as .git/ stay with the path check so git keeps reading its own tree. Linux keeps reads with the path check, since Landlock only grants. Denied entries match case-insensitively, so .ENV is .env on a case-insensitive filesystem. The pages that describe the CLI sandbox and the Bash tool need the new key, the write boundary and the hint a refused write returns.
Example to add, for turning the confinement off where the OS sandbox cannot run:
# ~/.infer/sandbox.yaml
filesystem:
enforce: falseA refused write returns Operation not permitted (macOS) or Permission denied (Linux) followed by the hint: "the sandbox confines writes to the writable paths of ~/.infer/sandbox.yaml (filesystem.allowed) and refuses to read, rename or delete its denied files (filesystem.denied): work inside them, or ask the user to approve the command or add the path".
Acceptance Criteria
-
cli.md, the file sandbox section (#file-sandbox): documentsfilesystem.enforce, its default, the platforms it applies to, the writable carve-outs (temp dir, Go, cargo and npm caches) and that an approved command runs unconfined. -
cli.md, the Bash tool under "Tools & Capabilities": explains the write boundary, the hint on a refused write or read, and that reads of denied files fail in the kernel on macOS while every other read follows the allow-list path check. -
cli.md, plan mode: the sentence "An allow-listed command can also still reach outside the scratchpad through an absolute path argument: the file tools are the hard boundary, the shell is allowed-list plus approval" now says such a command can still read outside the scratchpad while a write outside it fails in the kernel and, on macOS, so does reading a denied file. -
cli.md, the file sandbox section: the kernel read denial on macOS (read, rename and delete of the files the blockingdeniedentries name fail under any spelling, symlink, copy or clone), that directory entries such as.git/stay with the path check, that Linux keeps reads with the path check, and that denied entries match case-insensitively. -
cli.md,infer tools validateunder "Tools & Capabilities": a command naming a denied path exits non-zero with "access to path '...' is excluded for security" instead of being reported as needing approval. -
cli.md: a newinfer debugsection next toinfer toolsdocumentsinfer debug sandbox- the policy table (allowed and denied entries with their effect and what each covers), the built-in carve-outs, the kernel write paths per agent mode, and the files the kernel refuses to read. -
cli.md,auth.yamlunder "Provider API Keys": "agent tools cannot read or edit it" adds that on macOS an unattended Bash command cannot read it either. - Source: feat(sandbox): confine bash writes in the kernel cli#1875 (issue [FEATURE] Confine Bash writes in the kernel cli#1874), including its follow-up commits 3472d44b (kernel read denial, case folding) and 255cb315 (
infer debug sandbox,tools validate).
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Nov 16, 2026
Amended the summary and acceptance criteria for the follow-up commits that landed in inference-gateway/cli#1875 (3472d44b and 255cb315): the kernel read denial of denied files on macOS, case-insensitive denied entries, the new infer debug sandbox command, and infer tools validate refusing a denied path.
docs(sandbox): describe the kernel read denial in the agent guide and…
edenreich commentedon Nov 16, 2026
@claude can you document this?
inference-gateway-maintainer commentedon Nov 16, 2026
Claude finished @edenreich's task in 4m 34s —— View job •
docs/issue-1233-20261116-1441• [Create PR ➔](https://github.com/inference-gateway/docs/compare/main...docs/issue-1233-20261116-1441?quick_pull=1&title=Issue%20%231233%3A%20Changes%20from%20Claude&body=This%20PR%20addresses%20issue%20%231233%0A%0AGenerated%20with%20%5BClaude%20Code%5D(https%3A%2F%2Fclaude.ai%2Fcode)Documented the kernel-confined Bash sandbox
cli.mdsections + the source CLI PR andcmd/debug/debug.go)enforce: truein the example, new Kernel enforcement (filesystem.enforce) subsection - default, platforms (Landlock / Seatbelt / none on Windows), writable set (writableallowedentries, grants, carve-outs, temp dir, Go/cargo/npm caches), plan mode swapping the project for the scratchpad, approved commands running unconfined, the macOS kernel read/rename/delete denial under any spelling, symlink, copy or clone,.git/-style directory entries staying with the path check, Linux keeping reads with the path check, theenforce: falsesnippet, and the limits (no Landlock, refused ruleset, caches outside the listed ones)deniedentries match case-insensitivelyinfer tools validate: a denied path exits non-zero withaccess to path '...' is excluded for securityinfer debug) section next toinfer tools, documentinginfer debug sandbox(policy table, carve-outs, kernel write paths per mode, refused reads, allow-list sizes) + aninfer debug <cmd>row in Core Commandsauth.yaml: on macOS an unattended Bash command cannot read it eitherbun run lint:md,bun run format:check,bun run buildall clean (checked the generated anchor ids and fixed thefilesystem.enforceslug)Pull request: #1235
Not done / worth knowing: I did not run
bun run previewfor a visual pass (no nav or theme change, and the build renders cleanly), and theexceptkey thatinfer debug sandboxcan print for adeniedentry is still undocumented in the sandbox entry-forms table - it was not in the acceptance criteria, so say the word if you want it added.• Branch
inference-gateway-releaser commentedon Nov 17, 2026
🎉 This issue has been resolved in version 0.9.27 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀