Repository navigation
fix(link): identity-file refusal advice never reads as changing /tmp - #8722
Merged
Merged
Conversation
…hat is yours, or move the key For a key placed straight into /tmp, /var/tmp or /dev/shm the directory message said 'chmod g-w,o-w on it', which reads as removing write access on /tmp. Both directory messages now say 'chmod go-w on it if it is yours, or move the key into a private directory such as ~/.ssh' (go-w, so a 0777 directory is fixed too), and identity_file_unreadable says the path may have too many symlinks. The capability text, skill reference, guides and structure carry the same advice; a comment notes that a target's '..' can make the hint name the wrong level.
…ner test says why it skips on Windows
Contributor
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Contributor
|
✅ Deterministic PR hygiene checks passed. |
…chmod on a shared or system directory Review round on the previous wording: - "chmod go-w on it if it is yours" still fit /tmp, /var/tmp or /dev/shm for a Home running as root, which owns them. Both directory messages now put moving the key first and allow chmod go-w only on a private directory of the user's, never a shared or system one, even as root. - A symlink another user owns cannot be fixed by chmod: the ancestor message says to replace it or keep it off the path, and that the new path's every directory and symlink must pass (~/.ssh only if the home directory passes). - structure/remote-link.md qualifies the umask 002 example: a folder the Home user owns, where chmod clears only the mode and the owner and every other path component must pass too.
…ctory or another user's symlink Final-review round: - The ancestor text said to replace a symlink another user owns, which a Home running as root or an agent with sudo could do in /tmp or a system directory. It now offers a path that passes, or chmod go-w on a private folder of this user's or of the tool that chose the path, and forbids any change (chmod, sticky bit, replacing) to a shared or system directory or to another user's symlink, even as root. 441 characters, down from 722. - The directory text names the tool case: when a tool chose the key's path, fix that tool's own private folder or have it use a path that passes. - identity_file_unreadable also covers a path that is too long, and says to use a shorter path without symlink loops and to fix read access only on this user's own file or folder. - identity_file_permissions says to use a key of this user's own and never to chown another user's or the system's key. - The Windows skip of the symlink-owner test states its one reason. The capability text, skill reference, guides (en, es) and structure match.
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. |
lidge-jun
added a commit
that referenced
this pull request
Nov 15, 2026
…ntity-file texts; close #8694 remedy gaps (#8754) * fix(link): refuse a route edit while a removal of the link is unfinished (#8678) A route edit made after a failed revoke rewrote the link record without reading its retirement receipt, so every later revoke compared the edited record with the receipt copy and answered link_changed for good. handleLinkRouteEdit now refuses with 409 link_retirement_pending while a receipt is outstanding (an unreadable one counts), checked before the probe and again under the config mutation lock at the commit. ocx link routes names the way out, and the link_changed next step no longer says a current Home edit can cause it. * docs(link): scope the identity-file refusal texts to this user (#8723) P3-A..D from the #8722 review: chmod go-w only on a private folder this user owns (its own, or one a tool made for it), in the directory and ancestor texts and every copy; read access only with chmod u+r / u+rx and never group or other; chmod 600 only on a key of this user own, never chown or chmod another user or the system key. Updates the pinned strings and the two stale test comment/title nits. * fix(link): close the remedy gaps the #8694 review left (#8696) ocx-child: a bound detach accepts its own ownership record in phase cleanup complete (a detach killed inside release() between marking it and removing it), which only release() writes; covered by a kill test at that point. Residual steps name a copy placed by hand in ~/.local/bin (%USERPROFILE%\.local\bin on Windows), which discovery tries first; the plant purge says what a not-found binary means (server text, dashboard in all 11 locales, guides). The link add capability text labels Command Prompt, adds the USERPROFILE fallback, separates the lightweight step from ocx restart and says what to do when an older build refuses --expect-link. child_restart_unsupported says that ocx disconnect ends the link the machine uses now. * test(gui): pin the residual purge not-found step in the Remote Link fixtures (#8696)
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.
Summary
Review nits from #8718 (the identity-file directory check of
link.route/2). This PR changes text and tests only./tmp,/var/tmpor/dev/shm, theidentity_file_directorymessage said "chmod g-w,o-w on it", which reads as removing write access on/tmp(with sudo, that breaks the machine, and an agent on a cloud VM may run it). Both directory messages now offer a path that passes, orchmod go-won a private folder of the user's or of the tool that chose the key's path. For a key whose path a tool such as GOAT chose, moving it would leave that tool without its key. They forbid any change to a shared or system directory such as/tmp(no chmod, no sticky bit) or to another user's symlink, even when the Home runs as root and could make it. The ancestor text is 441 characters.go-winstead ofg-wfor a directory above the key: a 0777 directory is still refused afterg-w. The umask 002 sentence now says such a folder is group-writable and refused for that reason, which stays true whichever chmod fixes it.identity_file_unreadableis also the answer for a path that is too long or has too many symlinks. Its text now names both and says what to do: use a shorter path without symlink loops, and fix read access only on the user's own file or folder.identity_file_permissionsnow adds: use a key file of this user's own; never chown another user's or the system's key.chmod go-wclears only its mode; the owner and every other path component must pass too.process.getuiddoes not exist there, so the walk trusts every owner)..., the hint can name the wrong level (identity_file_directoryversusidentity_file_ancestor); the refusal itself still holds.Verification
Final review: it found one P2, that the symlink clause said "replace it", which a Home running as root or an agent with sudo could do in a shared or system directory, plus P3s. All are fixed in the last commit. New cases pin the permissions text and a path component too long for the filesystem.
One review round (gpt-6.1-terra xhigh) found three issues, all fixed in the last commit. P2: "if it is yours" still fit
/tmpfor a Home running as root. P3: the ancestor message offered a chmod that cannot fix a symlink another user owns. P3: the structure doc's example lacked the ownership precondition. The exact-message test failed on the previous text before that commit.Test-first: the exact-message and symlink-loop cases failed before the text change and pass after it. The CLI already exited 1; that assertion is tighter, not a fix.
bun teston the explicit-route suites (server, clients, paths, no-ssh-config, CLI), cli-link-enrollment, link-recover, skill-ocx and the Spanish docs test, with a temporaryOPENCODEX_HOME: 326 pass, 1 skip (the Windows-only case), 0 fail.bun run typecheck,structure:check,skill:surface:check,privacy:scan: pass.NOT RUN: full
bun run test; Windows.Checklist