Sandbox is a no-op when root is at or above `$HOME`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start at the sandboxer entry point and read the existing --root and --home validation for absolute paths and directories. Add the missing rejection for roots equal to or above the home directory, then verify that a project below $HOME still remains confined and invalid roots fail before the sandbox is applied.
Written by the indexing model from the issue text.
Description
A root at or above $HOME silently disables confinement.
The profile ends with:
(deny file* (subpath user_home))
(allow file-read-metadata (subpath user_home))
(allow file* (subpath sandbox_root))
SBPL is last-match-wins, so the sandbox_root allow has to come after the user_home deny for the normal case (a project inside $HOME) to work. But that also means a root equal to or above $HOME re-allows all of $HOME.
Repro: run with DUNE_ROOT="$HOME" (or any ancestor, e.g. /Users) and the sandboxed process has full read/write of the home directory. No warning is printed, the sandbox applies successfully and confines nothing.
Reordering the rules is not a fix: putting the root allow first makes the home deny win for every project under $HOME, breaking the common case. The fix is to reject such a root. sandboxer already validates that --root and --home are absolute and are directories, so a containment check could fit alongside those?
- Dominant language
- Nix
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nmattia/dune
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
AXERA-TECH/ax-llm#75 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:security impact:ux-friction issue-rating: 🦞 diamond lobster P2
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheManticoreProject/Manticore#1383 ·