Repository navigation
fix(network): restore Windows binary path normalization - #5014
shailendra-nv wants to merge 2 commits into
Conversation
Signed-off-by: shailendras <shailendras@nvidia.com> (cherry picked from commit 8188a931bba467ea9f666cd4a95248efd22458d9) Signed-off-by: shailendras <shailendras@nvidia.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
🌿 Preview your docs: https://nvidia-preview-pr-5014.docs.buildwithfern.com/openshell |
Merge the current windows base and distinguish existing wildcard separator support from exact-path normalization and trusted case matching. Cover slash-only and case-only policy spellings and credential-owner admission with pinned matching evidence. Signed-off-by: Shailendra Singh <shailendras@nvidia.com>
|
/ok to test 0f5896e |
|
/windows-ci |
|
Adding following functionality in this PR for
Updated and pushed signed-off commit
|
|
@codex review |
|
@codex security |
|
To use Codex here, create an environment for this repo. |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
1 similar comment
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
/windows-ci |
Windows ARM64 CI: ✅ passedCommit
|
|
Validation completed for
These post-CI runs used fresh short The PR description now includes these results. GitLab's reporting job succeeded and published its summary/log; setting the GitHub commit status returned HTTP 404. No additional PR source changes were needed, so the validated head remains |
Summary
Restore Windows-equivalent executable matching for exact network binary rules and directory-verified ASCII case matching for exact and wildcard rules. A policy naming
C:\WINDOWS\SYSTEM32\CURL.EXEcan authorize trusted runtimec:/windows/system32/curl.exe, including HTTP request checks and credential-owner selection.After latest changes updating the OR to retain this PR's remaining network-comparison functionality. Exact-rule separator equivalence and evidence-guarded case equivalence remain needed. Native wildcard separator matching is already covered and should be treated as existing behavior, with the new regression keeping that distinction explicit.
This PR targets
NVIDIA/OpenShell:windows. Native Windows wildcard rules already accept either slash direction through the existing glob matcher. MXC filesystem normalization, socket-owner attribution, executable hashing, and policy-generation pinning already exist; this change extends network-policy comparison across the remaining gaps.Related Issue
Closes #5013
Changes
openshell-binary-identity. Never open policy-authored paths or change the executable path used for hashing.Testing
Candidate:
0f5896ef678fa4dd4a7a39d4835b6866cbd7daf5, including the latestwindowsbasee451bb390a3b463724ccf5547b46b9432428690d. All results below used this source; no tracked changes were made during runtime diagnostics.mise run --skip-tools windows:test:arm64mise run --skip-tools windows:test:arm64mise run --skip-tools windows:test:x64mise run --skip-tools windows:test:arm64mise run --skip-tools windows:test:unsupported:arm64mise run --skip-tools windows:test:mxc-real:arm64mise run --skip-tools windows:e2e:mxc -- -DemoDir C:\work\openshell-5014-792036df466f445697c336d691bb12d6 -WxcExecPath C:\mxc\wxc-exec.exe -Port 51948windows:e2e:mxcwith the CI-BinaryDir: default suite plus four focused runsEach workspace run's 43 skips are the lane's existing ignored/runtime-gated tests; they are reported separately from the explicitly executed native MXC suite. Nextest does not execute doc tests. Unsupported Windows runtime packages retain the lane's existing exclusions. The real-MXC suite reported 14 passed, 0 ignored and no internal SKIP messages.
mise run pre-commit: PASS, including the installed commit hook. Local Python tooling used the already installed pinned Python 3.14.5 x64 interpreter, and Biome used its pinned 2.5.4 x64 executable after the native ARM64 tooling failed. Rust compilation and tests stayed native ARM64. No dependency or lockfile changes were made for these local workarounds.Windows x64/ARM64 CI: PASS for both native architectures, including Clippy and full supported-workspace tests. Both architecture jobs actually executed after the approved PR mirror push.
Branch Checks: PASS, including Linux x64/ARM64 and macOS ARM64 Rust tests, build modes, SDK checks, lint, and compatibility checks.
mise run --skip-tools windows:build:arm64andwindows:build:mxc-fixtures:arm64: PASS. All four production binaries and the forwarding fixture were rebuilt from the candidate; the matching Z3 DLL is staged.Native integration completed after both requested CI lanes passed. Its network tests exercise real HTTPS through the injected CA plus exact-owner allow, mixed-case/slash socket-owner allow, and wrong-owner deny. The network fixture uses REST enforcement, so the allowed path covers connection and HTTP admission.
The full E2E pass covers in-policy writes, read-only/default-deny cases, network-policy admission, two exact TCP replies, two exact service HTTP replies followed by HTTP 404 after endpoint deletion, and two exact host-local HTTP replies.
GitLab native Windows ARM64 CI: PASS, requested with
/windows-ci, for the exact candidate commit. Check, four-binary release build, workspace tests, all six driver-contract/feature-matrix commands, artifact generation, and clean-extraction package smoke checks passed. The workspace run reported three slow tests and no retries or flaky passes. The driver-matrix row counts ten test executions across six commands. See the published CI summary.After GitLab completed, downloaded both job packages and verified their published SHA-256 sidecars. Ran the existing real-MXC harness against the four CI-built executables and their included Z3 4.16.0 DLL: 7/7 default scenarios, plus
https-ca,socket-owner-allow,socket-owner-normalized, andsocket-owner-deny, all passed with zero skips. Each invocation used a fresh shortC:\workdirectory. The std-only forwarding fixture was built locally from the same candidate commit. All five production executable/DLL hashes were unchanged after E2E.GitLab reporting published the sanitized full log and PR summary successfully. Its attempt to set the GitHub commit status returned HTTP 404; both GitLab jobs' successful results were verified directly.
Work-directory limitations observed during E2E: The initial unmodified default run under the D: checkout finished 6 passed / 1 failed / 0 skipped: the host-service batch produced no completion files or service requests. A focused run reproduced it. A subsequent full run under the user's C: profile Temp directory finished 5 passed / 2 failed / 0 skipped: host-service passed, while both forwarding fixtures created temporary readiness files and exited before publishing the renamed readiness file. The unchanged full suite then passed 7/7 in the fresh short
C:\workdirectory shown above. These path-dependent failures remain unresolved; they are not counted as passes or claimed fixed by this PR. No host firewall/security settings or scoring assertions were changed. Diagnostic harness copies were kept outside tracked source.Local result bundles are retained under
target/windows-e2e-results/:results-e2e-20261101-183956(initial D: failure),results-e2e-20261101-184356(focused reproduction),results-e2e-20261101-184750(profile Temp failures), andresults-e2e-20261101-185025(full C:\work pass). Post-GitLab package runs are retained asresults-e2e-20261102-220921(default seven),results-e2e-20261102-220953(HTTPS/CA),results-e2e-20261102-221004(exact owner),results-e2e-20261102-221015(normalized owner), andresults-e2e-20261102-221026(wrong owner denied).Passing these functional cases does not verify the Windows branch's existing broad-loopback and live-revocation outer-fence stubs. The network-policy admission scenario alone is not an egress-enforcement test.
Checklist