Repository navigation
Sonny: a linked browser's saves are written through no link - #1503
Merged
Merged
Conversation
Over a link, the agent's machine checked where a saved file goes, then made its folders and opened it following every link but one in the file's own place. A folder on the way swapped for a link after the check led the write anywhere the person may write. Now it writes as a confined agent's saves here already are (#1197): each folder below the agent's opened, or made, following no link, and the file opened in it following none. One shared writer serves both. An agent that runs unconfined writes anywhere, as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGHWYTLgA8idNmFy5qp
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Requested by George · project thread
What
Over a link, the agent's machine writes what the linked browser saved (
landed()→land()insonny/src/browser.rs). It checked the path (Reach::output, real path inside the agent's folders), then rancreate_dir_allon the parent and opened the file withO_NOFOLLOWon the last part only. A confined agent that swapped a folder on the way for a link after the check had the write land anywhere the person may write (a shell rc, say).Local saves already did this right since #1197:
land_staged()opens each folder below the agent's withopenatfollowing no link (crate::git::folders), then the file withO_NOFOLLOW.Now both go through one writer,
opened(), so a save over a link is written exactly as a confined agent's local save is. An agent that runs unconfined writes anywhere, as before (no folders to keep it in, so nothing changes for it).Sonny only, no daemon change. From the Codex security findings George picked on 12-01.
Tests
what_a_linked_browser_saves_is_written_on_the_agent_s_machine_as_it_maygains: a folder checked, then swapped for a link to a folder outside, is not written through (neither the file nor a folder made under it); a folder made on the way where none was lands inside; an unconfined agent still writes anywhere, its folder made.cargo test -p sonny --bin sonny browser::21 passed; clippy clean.Performance
No benchmark covers browser saves. The cost is one
openat/mkdiratper folder below the agent's, once per saved file (a screenshot, a PDF), which is what local confined saves already pay.Generated by Claude Code