Skip to content

feat(node-lxc): end-to-end signed Ubuntu rootfs archive validation (OSS-378) - #552

Merged
athNdev merged 1 commit into
mainfrom
codex/node-lxc-signed
Nov 19, 2026
Merged

athNdev merged 1 commit into
mainfrom
codex/node-lxc-signed

Conversation

@athNdev

@athNdev athNdev commented Nov 19, 2026

Copy link
Copy Markdown
Owner

OSS-378 — end-to-end signed LXC archive validation

Follow-up to the merged real-provenance pins. The earlier slice verified digests from a GPG-signed SHA256SUMS by HEAD/metadata only; this slice closes that gap by verifying the actual upstream tarball bytes for both architectures in an owned disposable path.

Delivered

  • New node_lxc_artifact.py verify-signed-archive command (staged mode and --fetch mode). It:
    • fails closed before any I/O on synthetic profiles, placeholder/unverified digests and moving URLs;
    • checks staged control-file digests (SHA256SUMS, .gpg, signing key) against pins;
    • verifies the detached GPG signature of SHA256SUMS against the pinned key fingerprint in an ephemeral GNUPGHOME (VALIDSIG fingerprint required);
    • matches the signed checksum entry to expected_sha256 and the LXD metadata pin;
    • rehashes the full downloaded root and LXD tarballs and checks pinned content length;
    • inspects canonical layout, usrmerged etc/os-release/usr/lib/os-release (Ubuntu 24.04, noble) and LXD metadata.yaml (architecture/os/release) inside the tarballs.
  • 8 new offline fixtures using real ephemeral GPG keys (signature success is never mocked): tampered bytes/SHA256SUMS, wrong key, synthetic/placeholder/unverified/moving/missing evidence, wrong guest version, wrong LXD architecture, missing files. Total suite: 22/22 passing.
  • Evidence: packaging/node-lxc/qualification/SIGNED-ARCHIVE-EVIDENCE.md; docs/ADR0036/knowledge concept updated.

Real results (exact head b1b31fd9)

Both architectures returned status: ok, gpg_signature: GOOD with the UEC signing key fingerprint D2EB44626FDDC30B513D5BB71A5D6C4C7DB87C81:

amd64 arm64
root bytes 227213232 216215656
root SHA-256 ec6972af8ea2bd05c55299d204e5ae3f91769b84cfaec7395639d236a39f9a03 b68ef0444ca56ce4f00ae7e8ccfb0c553ffbc92e4a1b14ed7dd8aa18c6d68652
LXD SHA-256 dcfdfaf5239f2e1630540c091fd38a9f1e6cdabbaff267041a11ad0a5dcb35b2 6fe48e77a3fa52d81f3e5a84d3e83b6c96c16f4824bd49def8efe784529963bf
os-release ID=ubuntu, VERSION_ID=24.04, VERSION_CODENAME=noble same
LXD metadata x86_64, ubuntu/noble, 24.04 aarch64, ubuntu/noble, 24.04

--fetch was also smoke-tested against the live dated release for arm64: all five files fetched from the exact pinned URLs with the exact byte counts above, then verified OK with fetch_mode: true.

Honest blocker — no boot qualification

No usable LXC runtime exists in a task-owned unprivileged fixture. Windows host has no lxc/pct/systemd-nspawn and no /dev/kvm; the owned WSL 2 Ubuntu distribution also has no /dev/kvm or LXC tools, and installing them needs elevation/host configuration (out of scope). Therefore no clean import, guest first boot, nested daemon, kernel-enforcement or gameplay evidence is claimed. Signed-archive byte verification is artifact evidence, not boot evidence.

Scope / verification

  • python -m py_compile clean; 22/22 offline fixtures; git diff --check clean; go run ./cmd/knowledge-lint -root . after -fix: 76 concepts, 40/40 queries, indexes current.
  • No live host/provisioning, no artifact publication, no registry push, no release. No merge requested here.

Add verify-signed-archive: fails closed on synthetic/placeholder/moving pins,
verifies the GPG signature of SHA256SUMS against the pinned key fingerprint,
matches signed sums to pins, rehashes full downloaded root and LXD tarballs,
checks content length and inspects usrmerged os-release plus LXD metadata for
Ubuntu 24.04 and the requested architecture. Adds real-GPG offline fixtures
(22 total) and records actual amd64/arm64 byte verification evidence. Guest
boot remains externally blocked (no /dev/kvm, no LXC tools); no publication.
@athNdev
athNdev merged commit 5f9e839 into main Nov 19, 2026
12 checks passed
@athNdev
athNdev deleted the codex/node-lxc-signed branch November 19, 2026 03:25
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.

1 participant