Skip to content

Refactor NVX confinement into focused modules - #11706

Merged
lpcox merged 4 commits into
mainfrom
copilot/refactor-split-confinement-module
Nov 17, 2026
Merged

lpcox merged 4 commits into
mainfrom
copilot/refactor-split-confinement-module

Conversation

@lpcox

@lpcox lpcox commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

NVX confinement combines launch construction, cgroup limits, live process verification, and validation helpers. This split isolates security-critical verification while preserving behavior and existing imports.

  • Module boundaries: Separate launch/cgroup construction, verification with /proc parsers, and path/identity assertions.
  • Compatibility: Retain a re-export facade; preserve public types, dependency injection, and verifier ordering.
  • Regression coverage: Lock down TOCTOU-sensitive check ordering before extraction; add direct parser and malformed-identity coverage.

@lpcox lpcox changed the title [WIP] Refactor confinement.ts into launch command, verifier, and assertion modules Refactor NVX confinement into focused modules Nov 16, 2026
@lpcox
lpcox marked this pull request as ready for review November 16, 2026 21:49
Copilot AI adaptive review requested due to automatic review settings November 16, 2026 21:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Eight test-only parser exports lack the established internal and audit-suppression markers, potentially causing unused-export audit noise.

1 open issue
What changed in this PR

Refactors NVX host confinement into focused modules, separating launch construction from security verification while preserving existing imports and behavior.

Changes:

  • Extracts launch-command construction, cgroup limits, live verification, parsers, and shared assertions.
  • Retains the existing public functions and types through a compatibility facade.
  • Adds regression coverage for verifier ordering, parser inputs, and malformed identities.
File Description
src/​nvx/​confinement.ts Re-exports the existing public API from the extracted modules.
src/​nvx/​confinement.test.ts Adds verifier-ordering and UID/GID rejection coverage.
src/​nvx/​confinement-verify.ts Houses live process, namespace, and cgroup verification with /proc parsers.
src/​nvx/​confinement-verify.test.ts Directly tests valid and malformed parser inputs.
src/​nvx/​confinement-launch-command.ts Houses constrained launch construction and cgroup-limit computation.
src/​nvx/​confinement-assertions.ts Centralizes path, name, integer, and identity assertions.

Review effort: Max (adaptive)

Comment thread src/nvx/confinement-verify.ts Resolved
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@lpcox Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@lpcox
lpcox merged commit 8011655 into main Nov 17, 2026
42 of 44 checks passed
@lpcox
lpcox deleted the copilot/refactor-split-confinement-module branch November 17, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactoring] Split src/nvx/confinement.ts into launch-command, verifier, and assertion modules

3 participants