Repository navigation
docs(design): SEC-1.q2 receiver-side deletion sandbox follow-up design - #4729
Merged
Merged
Conversation
Captures the receiver-side `--delete` wiring follow-up SEC-1.q (PR #4728) intentionally deferred. The merged engine-side work added a sandbox-aware DeleteFs trait surface plus the DeleteEmitter::with_sandbox carrier, but the receiver loop in crates/transfer/src/receiver/directory/deletion.rs still calls std::fs::remove_file / remove_dir_all / read_dir directly. Lays out three options (migrate receiver to DeleteEmitter, swap to fast_io *_via_sandbox_or_fallback helpers, defer behind Landlock) with LoC scope, risk, test cost, and cross-platform plan. Recommends Option B (direct helper swap) on effort-vs-risk grounds and because the SEC-1.r temp_guard / temp_cleanup PR (#4723) is the established precedent for exactly this carrier-threading shape. Closes audit rows #5-#7 in docs/audits/sec-1-path-syscall-audit-2026-05-22.md once the implementation PR lands. Docs-only.
3 of 4 tasks
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
#4729) Captures the receiver-side `--delete` wiring follow-up SEC-1.q (PR #4728) intentionally deferred. The merged engine-side work added a sandbox-aware DeleteFs trait surface plus the DeleteEmitter::with_sandbox carrier, but the receiver loop in crates/transfer/src/receiver/directory/deletion.rs still calls std::fs::remove_file / remove_dir_all / read_dir directly. Lays out three options (migrate receiver to DeleteEmitter, swap to fast_io *_via_sandbox_or_fallback helpers, defer behind Landlock) with LoC scope, risk, test cost, and cross-platform plan. Recommends Option B (direct helper swap) on effort-vs-risk grounds and because the SEC-1.r temp_guard / temp_cleanup PR (#4723) is the established precedent for exactly this carrier-threading shape. Closes audit rows #5-#7 in docs/audits/sec-1-path-syscall-audit-2026-05-22.md once the implementation PR lands. Docs-only.
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
DeleteEmitter::with_sandboxcarrier slot, but the receiver loop incrates/transfer/src/receiver/directory/deletion.rsstill callsstd::fs::remove_file/remove_dir_all/read_dirdirectly under--delete. Audit rows Clamp peer protocol advertisements to supported range #5-Add byte-based legacy greeting parser #7 indocs/audits/sec-1-path-syscall-audit-2026-05-22.mdenumerate the open sites.docs/design/sec-1-q2-receiver-deletion-sandbox-2026-05-22.mdwith the closure options grounded in the actual call site, the SEC-1.rtemp_guard/temp_cleanupprecedent (PR feat(transfer): thread DirSandbox through temp_guard/temp_cleanup (SEC-1.r) #4723), and the SEC-1.s recursive helper surface.DeleteEmitterfor the funnel, (B) swap the three syscalls forfast_io::*_via_sandbox_or_fallbacksiblings plus a newread_dir_via_sandbox_or_fallbackhelper, (C) defer behind the SEC-1.p Landlock layer.*atcoverage.No code changes; design only. Implementation ships as the follow-up SEC-1.q2 PR.
Test plan
crates/transfer/src/receiver/directory/deletion.rs:115,:157,:159against the option write-ups.crates/transfer/src/temp_guard.rs:147-216) is the right shape to mirror.single_component_leafprecondition incrates/fast_io/src/dir_sandbox/at_syscalls.rs:286-303is correctly characterised.