refactor: remove --untrusted - #18
Merged
Merged
Conversation
bojieli
force-pushed
the
remove-untrusted-flag
branch
from
August 22, 2026 04:44
7565807 to
9103c33
Compare
bojieli
force-pushed
the
remove-untrusted-flag
branch
from
August 22, 2026 04:44
9103c33 to
3e66c6e
Compare
The flag promised three things and delivered one. Two of them were already unconditional. No credential is sent to any target, and SSH agent forwarding is off for every target with no flag that turns it on. Printing those as one session's "policy" implied the sessions without the flag were weaker, which is false in the direction that matters: it understated the guarantee reach actually gives. The third was real — the helper tier, the only tier that writes to a target, was refused on such a session. But autonegotiation never selects that tier, so the flag could only fire against an operator who had typed --fileops=helper on the same line, and the refusal then told them to re-create the session without --untrusted. A speed bump with the detour signposted. It also argued against reach's own posture. The premise everywhere else is that any target may be hostile; a flag called --untrusted implies the default is trusted, which is neither what reach does nor what docs/SECURITY.md says it does. Passing it now fails with an explanation rather than the flag package's "flag provided but not defined" and a usage dump, on both `reach up` and `reach <target> <command>` — and in the second form only before the command, since a flag after it belongs to the program being launched. Session files written by 0.1.0 still load. The field is ignored and the schema version deliberately does not move for it: with no policy left for it to have meant, a document written by either build loads identically in the other, which is the condition that version guards. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WMXbmmHmEkyWWRc72uvPW
bojieli
force-pushed
the
remove-untrusted-flag
branch
from
August 22, 2026 04:45
3e66c6e to
b9c4128
Compare
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.
What this changes
--untrustedpromised three things and delivered one.Two were already unconditional. No credential is sent to any target, and SSH agent forwarding is off for every target with no flag that turns it on (
ForwardAgent: false, hardcoded). Printing those as one session'spolicyline implied the sessions without the flag were weaker — false in the direction that matters, because it understated the guarantee reach actually gives.The third was real but nearly redundant. The helper tier — the only tier that writes to a target — was refused on such a session. But autonegotiation never selects that tier, so the flag could only fire against an operator who had typed
--fileops=helperon the same line, and the refusal then told them to re-create the session without--untrusted. A speed bump with the detour signposted.It also argued against reach's own posture. The premise everywhere else is that any target may be hostile —
CONTRIBUTING.mdsays untrusted targets stay untrusted,docs/SECURITY.mdsays the target is not trusted. A flag called--untrustedimplies the default is trusted, which is neither what reach does nor what those documents say.So: removed, rather than renamed or reinforced.
reach upandreach <target> <command>, and in the second form only before the command, since a flag after it belongs to the program being launched.reach statusloses its POLICY column, which would now always be-.--fileops=helper, and agent forwarding is off everywhere.CONTRIBUTING.md's design rule is restated as every target is untrusted, and there is no flag that says otherwise.Compatibility. Session files written by 0.1.0 and 0.1.1 still load. The
untrustedfield is ignored andSchemaVersiondeliberately does not move for it: with no policy left for it to have meant, a document written by either build loads identically in the other, which is the condition that version guards.Checklist
make checkandmake lintpassmake integrationpasses, if this touches transports or file operations — not run; tier selection is unchanged, only the removed refusalIf this changes what reach puts on a target:
reach doctor, and removable — unchanged: the helper tier is still opt-in by name, still listed byreach doctor, still removed byreach helper uninstallPULL_REQUEST_TEMPLATE.mdwas rewritten to say thatWorth a maintainer's judgement: this leaves
--fileops=helperas the sole gate on writing to a host. That was already true in practice, but it is now true without a second line of defence.🤖 Generated with Claude Code
https://claude.ai/code/session_018WMXbmmHmEkyWWRc72uvPW