Repository navigation
fix: backport 0.12.1 tightening batch (sign-in, credential, trust, sandbox) - #32825
Conversation
Sensitive Change ReviewSensitive files changed:
How to clear this check:
Only the author's comment counts this way. A reviewer can instead |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The diff adds no dashboard control, label or state. The frontend change only takes the sign-in [UX-REVIEWED] 9f8115f Description read[DESCRIPTION-READ] ae6d7ec16fa67168d24cee275e1977bdb48b10a1021b5ead0d12eaeda3ee49bf That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)Design-level review of Design-Verdict: PASS #31602 isn't in this diff, but the description says it was picked. A 0.12.1 built from this branch would still break a person's data home on a root run and give no repair hint. BlockersPhantom pick: #31602 (refuse root runs on a person's data home) Notes
[DESIGN-REVIEWED] 9f8115f Description read[DESCRIPTION-READ] 4fd05a419bf46950c91345484989639cd675125d770cc9ff3a69575f42e00d71 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS This backports fixes that Notes
What this change shipsInventory (9 items) — 8 justifiedIntent: give 0.12.0 users sign-in, credential, trust and sandbox fixes that already merged on
[FIRST-PRINCIPLES-REVIEWED] 9f8115f Description read[DESCRIPTION-READ] c7b34cba7654a64a8e3b4d5561bc222d53023d212141c8d4c7c401b32d32d312 That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Security Scope Review -- ✅ PASSWhich legitimate operations does Verdict basis: adjudicated, zero confirmed regressions. Security scope review -- adjudicated candidates
No candidate flipped from allowed to refused. Scope-Verdict: PASS Reason: Nothing this diff tightens is in the shell deny composite: no hunk touches TIGHTENING: Read-only seal parents can no longer be renamed. ADJUDICATED: 20 candidates, 0 confirmed newly-refused PLATFORM COVERAGE: I wrote posix and windows rows, and no
UNADJUDICATED:
[SCOPE-REVIEWED] d8a4bfd |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
d8a4bfd to
442b720
Compare
|
Dropped #30784 (dashboard sign-in link tightening) from this batch by maintainer decision: the Crew Tunnel app it could refuse was not tested. Rebased onto release/0.12.0 @ 3c6a160; new head 442b720 carries the other 12 picks. The Goal line and the #30784 row under Why it matters are left as written when the PR opened (frozen); What changed and Backwards compatibility describe the current diff. |
One read the CLI makes on its own behalf documents that it refuses a link planted where it reads, and it does on Linux and macOS. On Windows it did not, so the documented refusal held on only two of the three platforms. It now holds on all three, through the helper the rest of the codebase already uses for this, and its test runs on Windows hosts that can create links instead of being skipped there. Builds on #26701 by @leonlaiyc. Part of #9731 Co-authored-by: Leon <276034861+leonlaiyc@users.noreply.github.com> (cherry picked from commit 9489ca0) Originally authored on main by Bolin Chen (bolichen97); authored here with the public identity because the commit guard refuses the original address.
…30905) A dashboard opened from its sign-in link could keep the token in the address bar, and in history, while a screen shown before the chat page was up, first-run setup among them. The token now leaves the address bar as soon as the page loads, whichever screen comes first, and a signed chat link still opens its prompt. Closes #29743 (cherry picked from commit 6c34be0)
Co-authored-by: Pearce Kieser <5055971+Pearcekieser@users.noreply.github.com> (cherry picked from commit 1a40de6)
The macOS Seatbelt profile is (allow default) plus file denies, so a sandboxed agent could connect() to any UNIX socket its uid can reach. Some host listeners trust the caller's uid alone: the local credential agent's sockets in /tmp and the tunnel sidecar's socket in the data home's run dir. Reaching either lends the agent an unsandboxed process's authority. The plan now carries denied_socket_patterns (Seatbelt only) and the profile renders one network-outbound unix-socket deny per pattern. The gateway's API socket is deliberately not denied: in-sandbox MCP servers reach the gateway through it, and a Seatbelt deny is EPERM, which loopback_urlopen does not fall back from. (cherry picked from commit 91d4e26)
(cherry picked from commit f02c887)
…30955) A sub-agent that started under its parent's trust kept auto-approving its tool calls after a person revoked that trust, and so did any sub-agent it had started. Its next tool request now takes the normal approval path instead, and a re-trust gives the grant back. Builds on #25398 by @Pearcekieser. (cherry picked from commit cfaf8aa)
The Security page read "Interactive" while auto-approve was on: each WebSocket status frame replaces the stored status, and the frame had no grant fields, so status.yolo went undefined seconds after load. The dashboard user's frame now carries the grant fields /api/status reports, from one shared reader, with the expiry in whole seconds so an unchanged grant leaves the frame unchanged. An app socket's Tier-0 frame stays without them. Closes #29773 (cherry picked from commit 41e207d)
…ager (#22916) * fix(sandbox): stage bind sources on a durable tmpfs without a user manager The namespace launcher stages the empty sources it binds over .env and the other HIDDEN crew-home leaves on /run/user/$UID first. That runtime dir is kept coherent only by a per-user systemd manager; on a host without one, logind tears it down and remakes it across session churn, and a bind source pinned inside it when that happens leaves the host leaf a bind of a now-empty inode -- .env truncated to 0 bytes, silently dropping SLACK_BOT_TOKEN. Order the launcher's stand-in roots so the host-wide, manager-independent /dev/shm leads the volatile /run/user/$UID whenever no per-user manager keeps the runtime dir coherent, detected host-side by the systemd subdirectory the manager creates in it. Both roots stay in the list, so the launcher's cross-fs check and its mid-create move to the next candidate are unchanged, and every HIDDEN leaf stays bind-masked on whichever root. Where a manager IS running, /run/user/$UID still leads (login-scoped, auto-reclaimed at logout). * fix(sandbox): judge the staging root by its own manager socket, not the session bus Review (bolichen97): a listener at XDG_RUNTIME_DIR/bus proves nothing about a per-user systemd manager -- a plain dbus-daemon serves it -- and XDG_RUNTIME_DIR can name a different directory from the /run/user/$UID the bind sources stage on. _runtime_dir_is_durable now takes the staging root itself (sandbox_plan.user_runtime_root, the one spelling namespace_payload also lists) and connects only to <root>/systemd/private, which only the manager creates. Tests cover a live bus with no manager and a live manager under a different XDG_RUNTIME_DIR. --------- Co-author on main: Kyle Seaman. (cherry picked from commit e21a280)
…32262) On macOS the Strands harness exits at boot with EPERM on realpath of its --mcp-config, which Crew stages in the masked auth-store-staging directory and hands back with a require-not literal carve-out. The subpath read deny still covers the masked directory itself, and realpath lstats every component, so a Node CLI cannot canonicalize a file it is allowed to read. Each Seatbelt mask now records exposed_ancestors, the masked directories between the mask root and each exposed file, and the profile allows file-read-metadata on exactly those literals after the mask's last deny, as it already does for a private window. The directories stay unlistable and their siblings unreadable. Closes #32256 (cherry picked from commit 856c11c)
442b720 to
9f8115f
Compare
|
Dropped #31602 (data-home owner check) from this batch. GPT 6.1 flagged a security-class finding on 442b720 that holds against the main code too: the repair command |
Problem / Motivation
Goal: Bring twelve sign-in, credential, trust and sandbox fixes, merged on
mainafterv0.12.0, ontorelease/0.12.0, with the one main commit one of them needs first, one commit each, in a PR of its own.Why it matters
Each fix closes a hole a 0.12.0 user is exposed to today, or a sandbox fault that breaks their sessions. Every pick applied to
release/0.12.0with only the doc and test hunks listed under "What changed" resolved by hand, so the code each one replaces is on release.pod/runtime_ports.pypages/useChatPageSlotSwitches.ts,main.tsxdashboard/handlers_crew_turn.pydashboard/token_auth_tokens.py,dashboard/token_auth.pydashboard/chat_utils_slots.pysandbox_workspace.py,sandbox_launcher_parts/mask_stages.py/tmp/mcs-*.sock) and the tunnel sidecar socket.sandbox_plan.py,sandbox_seatbelt.py?workspace=selector on/api/lessonsis not checked against the caller, so one workspace can read or write another's lessons.dashboard/handlers/cron_lessons.pysubagenttrust carry,dashboard/chat_utils_slots.pydashboardstatus framedata_home_ownercheck (new),cli/doctor.env(and with itSLACK_BOT_TOKEN) can be truncated to 0 bytes when a sandbox bind source is torn down.sandbox_plan.pyruntime-dir orderrealpathof its--mcp-configin the masked staging dir gets EPERM.sandbox_seatbelt.pyNot a goal
main; nothing is changed only here.CHANGELOG.mdchange.What changed (motivation → approach → change)
Each main squash commit was cherry-picked with
-xontorelease/0.12.0@3c6a160c8a, in merge order onmain, one commit each.9489ca054d199ecb29796c34be0e06830f9b89f4ba1ac94302da584261e51a40de6098d2027a348dd0e6f369276f5967ac9d91d4e269946adfb5dfaef02c887f9a914ad70f74cfaf8aa88d8060f4ea4a41e207d472332bbf0710e21a28032bda761c289b856c11cf109f8115fa37#30784 and #31602 are not carried here. #30784 was dropped by maintainer decision: the Crew Tunnel app it could refuse was not tested. #31602 was dropped because the GPT lane found a real security defect in its main code: the
sudo find ... -exec chown -h {} +repair command indata_home_owner.pycan be raced into changing ownership of a system path. It is fixed onmainfirst. #30437 stays as a fix of its own (#29773). Their rows under "Why it matters" stays as written when the PR opened.Hand-resolved hunks, none of them in product code:
test/test_pod.py, one docstring. Took main's wording, which describes the new spy. Main's prerequisite test: trim low-value comments in pod tests #29899 (a comment trim over 29 test files) was not picked. It conflicts on its own and changes no behaviour..github/workflows/ci.yml, the real-sandbox list. Release now liststest_stand_in_stage_real_sandbox.py; both lines are kept, in main's order.Every other pick applied cleanly. #30631 is authored with the public identity because the commit guard refuses the original address on a hand-resolved pick; its message names its original author. #22916's co-author trailer carried an internal host address and is rewritten as a plain "Co-author on main" line.
Backwards compatibility
Breaking: these picks refuse things that worked before. The table names each one, who could be refused, and how that was checked. "Writer sweep" means every caller in this repository on this branch.
urlToken,ChatPageanduseChatPageSlotSwitchesvitest pass.mvandshutil.movecopy instead.test_seal_parent_pin_real_sandbox.pypasses here and at the main commit./tmp/mcs-*.sockand the tunnel sidecar socket. git over SSH keeps working, becausemcs-agent.sockstays reachable whenever the ssh agent is forwarded (standardandcctiers).#30437, #22916 and #32262 refuse nothing: they add status fields, reorder two already-trusted bind-source candidates, and add
file-read-metadataallows.Removes nothing: no setting, route or stored key is removed.
Tests
Proof: not provable -- other: a backport of main commits whose proofs ran on their own PRs
release/*, so the related set was run here after each pick: the touched test files and the test modules importing the touched source, about 4,500 tests, then 3,168 again after fix: refuse root runs on a person's data home and name the repair #31602 was dropped.test_sandbox_refactor_generated_programs.py::test_the_seatbelt_profile_is_the_goldenfails at fix(sandbox): deny host credential and sidecar sockets on macOS #30795's main commit91d4e26994. The golden expects<ROOT>, but this host's pytest temp path does not fold into it.tsc -p tsconfig.app.json --noEmitpasses; vitest for fix: keep the sign-in token out of the address bar on every screen #30905 (urlToken,ChatPage.pageOwners,ChatPageCoverage) passed.mypy src/kiro_crew,gen-ui-index --checkandcheck_harness_parity.pypass.check_file_line_capfails only ondashboard/chat_api/resume.py, which is already over the cap on release and is not touched here.Manual verification
N/A - each fix was verified on its own main PR. The 0.12.1 RC soak is the end-to-end check.
Screenshots / video
Why no screenshot: the frontend pick (#30905) removes the token from the address bar before the first screen draws; no rendered pixel changes.
Related Issues
Backport to the 0.12 line for 0.12.1 of #30631, #30905, #30828, #30864, #30783, #30795, #30826, #30955, #30437, #22916 and #32262. Source issues: #29743, #24790, #24998, #22234, #18264, #25397, #29773, #22881, #32256.
Sibling sweep
Siblings: none -- each source PR carried its own sibling sweep; this PR only carries those fixes.
Pattern harvest
Not generalizable: this PR only carries fixes already on
main. The source PRs have their own harvest.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.