Skip to content

link: identity-file refusal texts can still be read too broadly by a root Home or a sudo agent (P3 from #8722) #8723

Closed

Description

@lidge-jun

Follow-up to #8722 (merged). Its final review at 6a60ab5 found four P3 in the identity-file refusal texts (IDENTITY_FILE_GUIDANCE in src/link/explicit-route.ts and its copies in src/cli/capabilities-base.ts, skills/ocx/references/01_surface_access-remote.md, both guides and structure/remote-link.md:113). None changes behavior; each is wording a Home running as root or an agent with sudo could read too broadly. The texts already end with "never change a shared or system directory…", which is why none blocked the merge.

  • P3-A (explicit-route.ts:113, :114): "that tool's own private folder" does not say the folder must belong to this user. For a key in a root-owned tool folder set 0775 for a service group, a sudo reader may run chmod go-w on it and break that tool. Suggested: "…on a private folder this user owns (its own, or one a tool made for it)."
  • P3-B (:115): "fix read access only on this user's own file or folder" names no mode, so a reader may run chmod 644 on the key or a+rx on a folder. Suggested: "…chmod u+r on the file, or u+rx on a folder of this user's; never add group or other access."
  • P3-C (:112): "(chmod 600 on it)" comes before "Use a key file of this user's own", so it can be read as applying to a root-owned key such as a host key under /etc/ssh. Suggested: "…never chown or chmod another user's or the system's key."
  • P3-D: the directory text offers chmod go-w only on a tool's folder, while the capability text, skill reference and guides offer it for "a private folder of this user's or of the tool". Make the copies agree.
  • Test nits in tests/server/link-enrollment-explicit-route.test.ts: the comment at :404-406 and the title at :430 no longer match their cases.

The exact strings are pinned by tests, so each change updates the pinned string and every copy (English and Spanish with identical code spans).

Not verified by the review: any run on Linux, as root or under sudo; the RHEL host-key mode claim behind P3-C.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions