#79's process-containment suite is #![cfg(unix)] file-wide, so its properties are ungraded on the Windows we ship #117
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#117
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From the #76–#79 audit, verified first-hand and stated more narrowly than the audit put it, because the stronger version is false and worth not repeating.
What is true
crates/plugin-host/tests/containment.rscarries#![cfg(unix)]at line 26 — file-wide. Its own module doc says what it grades:That is #79's acceptance criterion 4, and on Windows none of it compiles, let alone runs. So on a platform we ship, the answers to "what can the worker process see, hold, spawn, and outlive" are ungraded.
What is NOT true, and why the distinction matters
The audit reported this as "no containment property has ever executed on Windows." That overstates it.
crates/plugin-supervisor/src/contain.rs:2066holds a#[cfg(windows)]test module with five job-object tests that do run on the self-hosted Windows runner:a_job_is_created_and_the_child_is_assigned_to_itclosing_the_job_handle_kills_the_process_inside_ita_process_in_a_job_does_not_outlive_the_parent_that_held_ita_process_inside_the_job_cannot_spawn_past_the_active_process_limithelper_holds_a_job_over_a_sleeperSo Windows does have executed containment properties, covering kill-on-close, non-outliving, and the active-process limit. The gap is specifically the C4 process-reach suite: what the confined process can see and hold — filesystem reach, descriptor inheritance, environment.
Recording the correction rather than the convenient version: the accurate claim is smaller, and a fix aimed at the overstated one would rebuild things that already work.
Two adjacent facts, both already documented in-tree
windows-gaterunscargo test, which never runs an example, and it builds MSVC while the shipped archive is cross-linked windows-gnu.release.ymlalready concedes this is "evidence the code works on Windows, not that this archive was tested."_prdoc/guides/80-abi-support-policy.md:289already grades this "NOT MET for two of four". So the honest assessment exists in the tree and is not reflected in the issue state — the same pattern as #114, where the README overclaimed past our own threat model.What closing this looks like
cfg(windows)counterparts for the C4 process-reach properties that have a Windows meaning, and let the existing runner execute them. Several do not translate (there is no seccomp, and the filesystem story differs) — say which, in the file, rather than leaving the reader to infer coverage from an absence.host.platform_unverifiedalready exists as the honest two-line form of exactly this deferral; the question is whether it fires for the right set today.Related
#79. Same family as #114 (a user-facing claim exceeding the analysis behind it) and #116 (ceilings that never run or cannot fail).
Fixed — Linux 12 → 14 tests, Windows 0 → 5. And two corrections to this issue's own text.
Correction 1: I wrote "five job-object properties". It is four.
helper_holds_a_job_over_a_sleeperis#[ignore]d — a process the tests drive, not a graded property. My list padded the count by one while arguing that a narrower claim was the honest one. Recording it rather than quietly fixing the number.Correction 2:
host.platform_unverifieddoes not exist.Step 2 of this issue's "what closing this looks like" rests on it — "
host.platform_unverifiedalready exists as the honest two-line form of exactly this deferral; the question is whether it fires for the right set today."It does not exist. Confirmed twice independently:
search_textreturnstotal: 0across all four separator spellings, andgrep -rn 'platform_unverified' . --include='*.rs' --include='*.md' --include='*.yml' --include='*.json'returns nothing.It was a plan that was never built, and it has been repeated as shipped behaviour — including in my own working notes, now corrected. The only statement of it anywhere in the tree is the new coverage table in
containment.rs. It is not in the product. So "does it fire for the right set" was the wrong question; the right one is whether an unverified platform should say anything at all, and today it says nothing.The fix
crates/plugin-host/tests/containment.rs: the file-wide#![cfg(unix)]is gone, replaced by per-item gating. Windows 0 → 5 tests, executing on the existingci-windows.ymlgate with no workflow change.Running on Windows now: a private, empty working directory that goes with the worker; environment sanitation measured as inheritance through the
worker_parentintermediate; the self-report channel closed by default;a_worker_never_claims_a_filter_it_does_not_have(must reportUnsupported, neverEnforced); anda_worker_says_what_its_probes_did_rather_than_omitting_them— the first execution anywhere ofcontain::observe'scfg(not(unix))arm.Deliberately not translated, each named in the file with its reason
seccomp denial (no seccomp);
setsid→ covered bya_job_is_created_and_the_child_is_assigned_to_it;setrlimitAS/FSIZE/CORE/NOFILE;RLIMIT_NPROC→a_process_inside_the_job_cannot_spawn_past_the_active_process_limit;PR_SET_PDEATHSIG→closing_the_job_handle_kills_the_process_inside_itanda_process_in_a_job_does_not_outlive_the_parent_that_held_it;VmPeak.One genuinely open C4 property is stated as open rather than papered over:
/proc/self/fddescriptor inheritance has no Windows counterpart here. Closing it needsNtQuerySystemInformation/ handle-scan FFI written blind against a machine nobody can run — a worse trade than the recorded gap. aarch64 restated as deferred, not reopened.Mutations
W1, W2, W4 and a re-run C3 went red with output pasted. W3 and W5 — the
cfg(windows)arms — were NOT run, because there is no Windows machine here. They are markedNOT RUNin the file rather than left reading as though they had been.That is the honest state and it is worth naming: the Windows tests are written and will execute on the runner, but their mutations are unverified until they do.
contain.rswas not modified (md5-verified against HEAD).Windows cross-clippy green:
cargo clippy -p code-index-plugin-host --all-targets --target x86_64-pc-windows-gnu -- -D warnings, exit 0.What this leaves
The gap this issue named is closed for every property that has a Windows meaning. What remains is one descriptor-inheritance property, and the larger fact that an unverified platform still discloses nothing to the operator — which is now a real absence rather than a mis-firing feature, and belongs with #114's disclosure half.