Repository navigation
NVX: Replace native DLL handling with aci_edge_sandboxes crate - #1672
Huzaifa Danish (huzaifa-d) merged 12 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Verify Authenticode trust and Microsoft publisher identity during build, artifact/package validation and before runtime use. Retain file and directory guards through client ownership, and remove unrelated integration hunks. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Rebuild the verified signer's chain with explicit revocation checking and reject every raw chain trust error, independently of permissive Authenticode policy. Preserve the verified signing time and cover unknown, offline and untrusted status bits. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Apply strict chain checks to timestamp countersigners as well as the Microsoft publisher, without imposing the publisher identity on timestamp authorities. Cover successful publisher chains with revoked or indeterminate timestamps and missing countersigner data. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Check that signed OpenVMM and image-tool help commands can launch while the signature guards prevent replacement, without provisioning a VM. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reuse the existing module pin before opening the agent client. Exercise a public JSON failure without filesystem grants and keep a simulated worker alive across library unload; require the scenario in Windows CI. Correct archive-override digest guidance. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Represent the successfully allocated chain with NonNull before inspecting trust status. Preserve fail-closed null handling and release the same context after the read. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Security-sensitive Windows trust and lifecycle changes need maintainer validation, with current-head VM/cross-platform runs and key certificate fixtures still unverified, plus unresolved dependency-feed and integration prerequisites.
No open issues 🎉
What changed in this PR
Replaces the existing experimental Windows x64 NVX backend’s active native integration with aci_edge_sandboxes 0.1.1, continuing the work from #1538 without adding public SDK APIs or schema fields. Disconnected legacy files remain for separate cleanup.
Changes:
- Delegates bundle acquisition, native bindings, policy types, and lifecycle operations to the published crate.
- Adds Microsoft Authenticode verification, file/directory guards, and module retention for background-worker safety.
- Extends regression tests, packaged/staged validation, CI gates, and backend documentation.
The PR remains a draft: dependency-feed availability, a clean current-head real-VM run, and cross-platform/remote validation remain outstanding, as documented in the description.
| File | Description |
|---|---|
src/mxc-sdk/tests/nvx/crate_bundle_integrity.rs |
Adds signature, integrity, file-locking, and pre-load rejection tests. |
src/mxc-sdk/tests/nvx_e2e.rs |
Extends environment, ingress, and proxy-port validation scenarios. |
src/mxc-sdk/tests/module_lifetime.rs |
Adds an isolated NVX module-retention regression. |
src/mxc-sdk/tests/fixtures/module_lifetime.rs |
Models a pending worker after a native validation error. |
src/mxc-sdk/src/backends/nvx/signature_verification.rs |
Verifies publisher trust and certificate chains; guards verified files. |
src/mxc-sdk/src/backends/nvx/runner.rs |
Adapts execution orchestration and tests to crate-owned types. |
src/mxc-sdk/src/backends/nvx/policy.rs |
Maps MXC policy and process settings into crate types. |
src/mxc-sdk/src/backends/nvx/mod.rs |
Selects the crate-backed runtime and signature verifier. |
src/mxc-sdk/src/backends/nvx/crate_runtime.rs |
Implements crate-backed lifecycle, capture, cancellation, and cleanup. |
src/mxc-sdk/Cargo.toml |
Pins the Windows x64 dependency and registers integrity tests. |
src/mxc-sdk/build/build_nvx_signatures.rs |
Checks crate-staged and profile bundles during builds. |
src/mxc-sdk/build.rs |
Replaces the legacy downloader hook with signature validation. |
src/Cargo.lock |
Locks the new crate and its dependency graph. |
scripts/tests/microvm-validation.test.js |
Tests packaging, staging, and module-lifetime gate failures. |
scripts/ci/stage-nvx-validation-tests.ps1 |
Requires staged bundle signature and integrity validation. |
scripts/ci/Invoke-CratePackage.ps1 |
Runs integrity validation from the extracted crate package. |
docs/development/build-and-test/ci-validation-infrastructure.md |
Documents updated bundle and module-lifetime validation gates. |
docs/backends/nvx/nvx.md |
Documents crate ownership, trust requirements, overrides, and cleanup limits. |
.github/workflows/Build.Windows.Job.yml |
Builds the unload fixture and requires the x64 NVX regression to pass. |
Review effort: Balanced
Rename the helper and explain its build-time checks. Update its callers and remove the requested module-lifetime documentation paragraph. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Combine the CI artifact documentation changes and retain main's host CPU profile in the active crate-backed adapter. Preserve the renamed signature helper and requested documentation removal. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The native runtime replacement relies on an unavailable dependency implementation for cancellation and teardown guarantees, while Windows x64 validation of worker cleanup and Authenticode enforcement remains outstanding.
No open issues 🎉
Review effort: Balanced
Bound cancellation and result observation without joining stalled native calls. Anchor the full runtime inventory to an independently approved checksum-list hash, including guest assets and metadata, and keep verified files guarded. Extend package/staging verification with public pre-load negative controls. Clarify disconnected-host trust requirements and remove the four obsolete implementation files. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Native worker lifetime, cancellation/teardown, and Windows signature enforcement require maintainer verification because dependency internals were unavailable and Windows x64/WHP validation could not be run.
No open issues 🎉
Review effort: Balanced
|
Copilot resolve the merge conflicts in this pull request |
Resolve the runtime, policy, manifest, documentation and test conflicts. Adapt streaming output, lifecycle IDs, provision metadata and persistent state locks to crate-owned execution while retaining independent bundle authentication and bounded cancellation. Keep main's memory support and add boundary and stream-ordering regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Describe the extended SDK JSON scenario and distinguish caller-owned lifecycle containers from create-and-run cleanup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
An elevated first lifecycle call can leave the nvx directory owned by Administrators, causing later non-elevated calls by the same user to fail ownership validation and block retained-container lifecycle operations.
1 open issue
Review effort: Balanced
9bc16c0
into
microsoft:main

📖 Description
Replace the active native integration for the existing NVX backend with published
aci_edge_sandboxes = "=0.1.1"crate and itsagent-bundledfeature.🔗 References
🔍 Validation
Tests ran locally on Windows x64. Cargo commands ran from
src; Node commands ran from the repository root.✅ Checklist
feature-acceptedCargo.lock, thedependency-feed-checkcheck passes (see pull request builds)📋 Issue Type
Microsoft Reviewers: Open in CodeFlow