mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5777] Sandbox-denied sensitive writes in error-tolerant compound bash commands count as applied mutations #3193
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#3193
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/5777
Originally assigned to: @kolacheee on GitHub.
In one sentence: the shell sandbox silently blocks writes to sensitive paths, and an error-tolerant compound bash command swallows that failure and exits 0, so the verification guard counts a mutation the sandbox guaranteed did not happen.
The gap
Another #5756-class hole on the bash path. On Linux the sandbox ro-binds every sensitive path (package.json,
.github/workflows/,win/installer/, launcher files); on macOS it emits(deny file-write* ...)for them (workspace-shell-sandbox.ts). A command likesed -i 's/old/new/' package.json; echo donefails the write but exits 0 via the trailing statement - common LLM shell style (cmd || true, multi-statement scripts).commandBashjudges success by exit code alone,bashLooksMutatingmatchessed -i, andisAppliedWorkspaceMutationcounts it applied. A later successful read resolves the round "verified" and Mari's "I bumped the version" claim passes while the file is byte-identical.This also sidesteps the sensitive-change approval flow's visibility: the user never even sees a staged approval card - the write just silently didn't happen.
Single simple commands mostly fail loudly (non-zero exit), so this needs an error-tolerant compound command - reachable in practice but not on every run.
Fix direction
Options, roughly in order of strength: have the sandbox report write-denials on sensitive paths in a structured way commandBash can surface (turning the silent denial into a loud per-command failure or a staged-change handoff); or scan sandbox stderr for the denial and mark the result accordingly; or teach
bashLooksMutating-positive commands touching sensitive paths to route through the write/edit staging flow instead of the sandbox.Found during the adversarial review for #5775; pre-existing, not introduced there.