fix(web): stop auto-approving plan reviews and sensitive files in yolo mode - #1056
Merged
Conversation
…o mode The web app ran a client-side policy that auto-approved every approval request in auto/yolo mode, including plan reviews, sensitive file access, and other asks the daemon intentionally sends for user confirmation. The daemon already resolves auto/yolo server-side, so drop the client-side auto-approve and let those requests reach the approval UI.
🦋 Changeset detectedLatest commit: 5cbbf69 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
No prior issue. Found by tracing a yolo-mode web session where a plan was approved without any user interaction.
Problem
In the web app, a session running in
yolopermission mode had every approval request silently auto-approved, including requests the daemon intentionally sends for user confirmation: plan reviews (ExitPlanMode), sensitive-file access,.gitcontrol-path access, and goal starts. A plan could be approved within milliseconds without the user ever seeing it.The cause was a client-side policy in the web app — a temporary "until the daemon exposes a permission endpoint" shim — that answered
approvedto every incoming approval request whenever the mode wasautooryolo. The daemon already resolvesautoandyoloserver-side:autonever emits an approval request, andyolodeliberately still asks for the sensitive cases above. The web shim overrode that intent. The TUI has no such shim and behaves correctly.What changed
Any approval request that now reaches the web app is a genuine daemon ask and is shown to the user, matching the TUI and the daemon's permission policy chain.
automode is unaffected because it never produced approval requests. The intended behavior is already covered by the daemon-side permission policy tests, so this PR adds no new web test.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.