Skip to content

macOS: dial the SSH chain a shared row's approval covered, not one read again after the check #4667

Done

Description

@datlechin

A shared row (Team Library or linked folder) asks before its SSH tunnel signs in with this Mac's agent, keys or SSH profile. The approval covers the chain LocalCredentialConsent resolved: the refreshed profile plus ~/.ssh/config.

Once the check passes, buildEffectiveConnection refreshes the profile and LibSSH2TunnelFactory.buildAuthenticatedChain reads ~/.ssh/config again, each on its own. An edit to either between the check and the dial changes what the tunnel tries, and nobody is asked.

  • Pass the approved, resolved chain (servers, hops, auth per hop, agent socket, key paths) from the consent check into tunnel creation, and dial exactly that.
  • Refuse the dial when the chain the tunnel would build differs from the approved one.
  • Test: a profile or config edit after approval, before the dial, never reaches the tunnel.

Changing the profile or ~/.ssh/config in that window needs local write access, so this is hardening, not an open hole.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions