Make trusted-peer pulls preparation-only - #3
Merged
Conversation
Contributor
Author
|
Security follow-up pushed in 3839ebd. It rejects UNC/device/extended namespaces before filesystem access, blocks Windows-invalid and superscript COM/LPT aliases, binds JSON reads to one checked file identity, and replaces the vendor-specific route label with private-overlay. Verification: 22 focused tests passed; full suite 83 passed, 1 platform privilege skip; Ruff, format, compile, schema validation, and diff-check passed. Independent re-review of the exact pre-commit diff approved with no remaining P0/P1/P2. No merge performed. |
lukisch
marked this pull request as ready for review
July 30, 2026 01:30
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 changed
pull --applywith a read-only validation and preparation boundary.directandtailscaleas provider-neutral labels only.Why
The existing implementation exceeded the authorized V4 preparation scope by reading key/known-host files, publishing into the yard, and supporting live SFTP transfer. This change stops before connectivity: no peer contact, no referenced credential/key/signature reads, no file copy, no destination creation, no yard write, and no
direct_pullmutation.Impact
The stable
trusted-peer-pathsCLI now exposes onlyvalidate,list,resolve, andpull-plan.pull-planreturns a deterministicprepared-no-transferreceipt withexecutable=false. Compatibility API methodspublishandpullfail closed.Real two-host activation still requires a separately reviewed detached-signature verifier, real SSH host-key installation, server-side read-only ACL/authentication, route authorization, anti-replay state, a no-overwrite executor, negative two-host tests, and explicit activation approval.
Validation
ruff check system_gap_master/trusted_peer_paths.py tests/test_trusted_peer_paths.pyruff format --check system_gap_master/trusted_peer_paths.py tests/test_trusted_peer_paths.pypython -m py_compile system_gap_master/trusted_peer_paths.pypython -m pytest -q— 80 passed, 1 platform skipgit diff --checksubprocess,Popen,--apply,--output, signing/verification key-file refs, or known-hosts-file refs in the trusted-peer moduleBase commit:
01a4d29eae389b461e96acfaa5cc7f8d96a98022Implementation commit:
e2ff8f700cae7ffa5e7bc9663a7df633bbae0a17