mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5786] Shell sandbox write-deny list only covers sensitive files that exist at spawn, so new sensitive files can be created unreviewed #3197
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3197
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Sep 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5786
Originally assigned to: @kolacheee on GitHub.
In one sentence: the shell sandbox's write-deny list is built only from sensitive paths that exist when the sandbox spawns, so a bash command can create a NEW supply-chain-sensitive file (a
package.jsonin a fresh directory, a rootDockerfilethat was absent) with no deny rule and no user review.The gap
workspacePolicyPaths(workspace-shell-sandbox.ts) walks existing directory entries anduniqueExistingPathsfilters throughexistsSyncbefore the read-only binds (Linux) /deny file-write*rules (macOS) are emitted. Sensitive directories (.github/workflows,win/installer) are covered for new files inside them, but name-keyed sensitive files (package.jsonanywhere, root launcher files) that do not exist at spawn - including in a directorymkdir'd by the same command - get no rule, while the workspace root is mounted writable.The heuristic refusal added for #5777 (
bashCommandTargetsSensitivePath) now catches the common write shapes for both existing and new files, but it is a best-effort command-string check by design - any shape it misses creates a reviewed-class file with zero review, which is a false negative on the sensitive-file approval floor rather than just a wrong "applied" signal.Fix directions
bashLooksMutating, re-walk the workspace for sensitive-by-name files whose mtime/existence changed during the run; quarantine or surface any hit as a pending approval instead of leaving it in place.Found during the adversarial review for the #5776-#5778 fixes; pre-existing, and the #5777 doc comment was corrected there to stop calling the sandbox a hard floor for this case.