mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5778] write/edit through a workspace symlink bypasses sensitive-file staging #3192
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#3192
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/5778
Originally assigned to: @kolacheee on GitHub.
In one sentence:
write/editdecide whether to stage a sensitive-file change from the requested path only, so a workspace-internal symlink pointing at a sensitive file classifies as "normal" and the write applies directly to the sensitive target with no user approval.The gap
resolveWorkspacePath(workspace-agent.service.ts) computes the canonical (realpath) policy for the target but only enforces it for "forbidden" - the "sensitive" classification is enforced only whenrequireOrdinaryMutationPathis set, whichwrite/editdo not set - and it returns the requested absolute path.commandWrite/commandEditthen re-derive the staging decision from the requested path:link.json -> package.jsonreads as "normal",stageSensitiveFileChangeis skipped, andwriteFilefollows the symlink into package.json. Mari can create the symlink herself in sandboxed bash (ln -s package.json link.jsonwrites only the link and isn't classified as mutating).That bypasses the sensitive-change review floor that even Bypass permissions mode is documented not to lift.
copy/moveare immune becauseordinaryMutationPathchecks both requested and canonical policies -write/editshould do the same.Fix direction
In
commandWrite/commandEdit, derive the staging decision from the canonical policy thatresolveWorkspacePathalready computes (stage when either the requested or the canonical path is sensitive), mirroring the copy/move handling.Found during the adversarial review for #5775; pre-existing and the inverse direction of #5756 (a change that applies when it should have staged, rather than one that staged being reported as applied).