Repository navigation
Conversation
d7d2435 to
4befe4a
Compare
4befe4a to
b1fcd66
Compare
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The repair runs as one fixed privileged command on a path the main process resolves itself, behind the local-dashboard check. If it fails or is cancelled, the user falls back to the command they copy today. Notes
[DESIGN-REVIEWED] 26fd0d4 Description read[DESCRIPTION-READ] 16187d527a693859ce8f74987a6c4d7e907cefdd0deaeea5d5de7657fe8f693e 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 |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing the fixing, fixed and failed states of "Fix permissions". The screenshots also come from an older build: they show "Run this command…" where HEAD renders "Or run this command… instead". Evidence gaps
Notes
[UX-REVIEWED] 26fd0d4 Description read[DESCRIPTION-READ] eb4dc00746ebd6950f707b3884a599bc81866f33e1d0334aef5c5d35247da21a That sha256 names everything this verdict read: the PR description, plus the 6 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 The repair button removes a named harm (no terminal, so no way out) and nothing already does the job. But Notes
What this change shipsInventory (6 items) — 4 justifiedIntent: a desktop user locked out of their data home can take it back with one click and their admin password. ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 26fd0d4 Description read[DESCRIPTION-READ] 0019968460807b2b2766e826ad6c1ee6d57b1ab6fb775265e3281e9fc3cc114b That sha256 names the PR description this verdict read. Recompute it with |
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: |
GPT 6.1 Review — 🔴 changes requested (blocking)GPT 6.1 found at least one blocking issue that must be resolved before merging This comment is updated in place on each push. BLOCKING -- website/electron/data-home-fix.js:162 -- Privileged repair re-resolves a replaceable pathname
[BLOCK-MERGE] 26fd0d4 Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 (fenced): the harm is unbounded (privilege escalation). I checked the conditions in the code:
The attack needs a same-account process to race the prompt, and the home's leaf name must match a root-owned directory. A same-account attacker can arrange both by setting False positive or not applicable? A repository writer can comment: |
7fc70c6 to
8f010d0
Compare
8f010d0 to
450769b
Compare
53da790 to
8937de9
Compare
A run as root that keeps the person's HOME (sudo on macOS keeps it) writes root-owned files into their data home. The normal account then cannot read config.json, and creating a Bot fails with only the generic "Couldn't create the Bot". kirocrew now refuses, before it touches the data home, when it runs as root and the data home belongs to another account, and names the same command without sudo. Root in its own home, `service` and `stop` are left alone. The damage an earlier run left is found and named: the gateway logs it at start, `kirocrew doctor` reports it with the repair line, /api/status carries it as data_home_access, and POST /api/agents refuses with 409 data_home_not_owned plus fix_command before it writes anything. The New Bot dialog and Settings show one sentence and the command to copy, in every shipped language.
The data-home notice gives a command to paste into a terminal, and many people have none. On the desktop app's local dashboard the notice now carries a "Fix permissions" button: the OS asks for the admin password (macOS through osascript, Linux through pkexec) and the data home is given back to this account. The main process resolves the data home itself and takes no argument from the page. It refuses a data home that is a link, not a directory or a filesystem root, runs only `chown -R -P <this uid> <real path>` with privilege, and restores owner modes as the person. The password never reaches the app. A plain browser, the PWA and a window on a remote gateway keep showing the command.
8937de9 to
26fd0d4
Compare
Pull request was converted to draft
|
Closing. The one-click root repair would need a pinned, no-follow walk to be safe: GPT's finding on 26fd0d4 (a same-account process can swap a parent folder during the admin prompt and point root's chown at system files) is real. The data-home notice already shipped in #31602, and main gives no command to copy: the troubleshooting page has the person stop Kiro Crew and every agent, check for extra hard links, then run |
Problem / Motivation
Goal: On the desktop app, a person whose data home belongs to another account can repair it with one click and their own admin password, without a terminal.
The data-home notice (#31602) names the cause and gives
sudo chown -R ...to paste into a terminal. Many people who hit this have never opened one.Why it matters
The person stays locked out of creating a Bot until the folder is theirs again, and a command to paste is a dead end for anyone without a terminal habit.
Not a goal
What changed (motivation → approach → change)
window.dataHomeFixAPI.available()/fix(). Neither takes an argument.data-home:can-fixanddata-home:fix, both behind the existing three-check local-dashboard gate.chown -R -P <this uid> <real path>with admin rights (macOSosascript ... with administrator privileges, Linuxpkexec, each at a fixed path); thenchmod -R u+rwXas the person, with no privilege.The OS draws the password prompt, so the password never reaches the app.
-Pkeeps the walk from following any link inside the folder. The target is never widened past the data home, and never taken from the page.builder-security checked: no new listener, route or bind. The privileged step is one fixed argv on one path the main process resolves, behind the gate every machine-local action uses; a connection window on a remote gateway is refused before anything runs.
Specs updated:
docs/build/desktop-app.md(the bridge and the repair) andcrew-mode.md(New Bot dialog).Backwards compatibility
Compatible: a new optional bridge and two new channels; nothing existing changes shape.
Removes nothing: no channel, bridge, key or command is removed.
Tests
website/electron/test/data-home-fix.test.js: routes exist only where the prompt and chown exist; the target must be a real directory, not a link or a root; pkexec runs onlychown -R -P <uid> <home>; osascript quotes the path for both the shell and AppleScript; root or an unknown uid is never the target account; a fix chowns then chmods as the person; a dismissed prompt iscancelledand runs nothing else; nothing runs without a route, as root, or on a linked home.website/electron/test/ipc-registrar.test.js: both channels refuse every non-local sender and never reach the repair; on the local dashboardfixignores any renderer argument;can-fixis false with no prompt; the pinned channel set gains the two names.DataHomeOwnerNotice.test.tsx: no button without the bridge or when the shell says no; a fixed repair re-reads the status and hides the notice; cancelled and failed keep the command, and only failed says so.electronBridgeContract.test.ts: the new bridge is declared.Mutation-checked one at a time: dropping
-P, accepting a linked data home, removing the gate fromdata-home:fix, and showing the button when the shell says no each turned the matching tests red.Manual verification
Rendered the New Bot dialog and Settings against stubbed
/apiand a stubbed bridge (Vite + Playwright, loopback only). The real OS prompt was not exercised: there is no macOS host here, and pkexec needs a desktop session.Screenshots / video
New Bot dialog with the button, English, light:
Japanese, dark:
Settings (the capture harness pins English)
Related Issues
Builds on #31602 (merge that first; this branch carries its commit until then).
Held as a draft until #32127 lands: the privileged repair still re-resolves paths as root, so a same-account process can swap a parent folder for a symlink mid-run. #32127 tracks a race-safe helper.
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.