Skip to content

OSS-377: pin real dated Ubuntu 24.04 provenance for node VM artifact - #533

Merged
athNdev merged 2 commits into
mainfrom
codex/node-vm-provenance
Nov 18, 2026
Merged

athNdev merged 2 commits into
mainfrom
codex/node-vm-provenance

Conversation

@athNdev

@athNdev athNdev commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

Post-merge quality fix for the OSS-377 QCOW2/cloud-init node VM lane (PR #526, merged as 8561ceef). The merged lane correctly used synthetic pins for M3 fixtures, but artifact claims require real upstream provenance. This PR replaces those pins with immutable dated Ubuntu 24.04 images and verified non-placeholder hashes, keeps fixtures clearly separated, and makes artifact mode fail closed on placeholders. No live VM/host, release, registry write or deployment, and no implicit publication.

Exact pinned images (immutable dated release, retrieved 2026-11-18)

Arch Image URL SHA256 (from signed SHA256SUMS)
amd64 https://cloud-images.ubuntu.com/releases/noble/release-20261017/ubuntu-24.04-server-cloudimg-amd64.img 04e8f2461a16a44e78a370284471f29616cdd9baf1893df25807b71f985b6c94
arm64 https://cloud-images.ubuntu.com/releases/noble/release-20261017/ubuntu-24.04-server-cloudimg-arm64.img 50e24e1fb79e89116e939d90aa7738f7af48c442fa1bc2510131e0b39c50348e

The moving .../release/ symlink and /noble/current/ daily tree are explicitly not pins.

Retrieval evidence (direct official sources only; no Web Search)

  • https://cloud-images.ubuntu.com/releases/noble/ GET 200 ΓÇö dated release-20261017/ entry identified; moving release/ symlink rejected as a pin.
  • .../release-20261017/SHA256SUMS GET 200 ΓÇö 7843 bytes, local SHA256 0449a33b78dddb301a3ce2b80398984bc3e1f7880e27b86a31e58bdcbd3d3816; the two digests above are its image lines.
  • .../release-20261017/SHA256SUMS.gpg GET 200 ΓÇö 833 bytes, local SHA256 68aae716a548e466e58afddd8b767c54c791f40f1d20d1d12e27c471edb535e5; gpg --list-packets shows issuer fingerprint D2EB44626FDDC30B513D5BB71A5D6C4C7DB87C81.
  • Key fetched by that fingerprint from https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xD2EB44626FDDC30B513D5BB71A5D6C4C7DB87C81 GET 200 ΓÇö 3325 bytes, local SHA256 927138de292fac4d861105a052cf56e9c5921987da385c844d88f34d19b39ab0; identity UEC Image Automatic Signing Key <[email protected]>.
  • gpg --verify SHA256SUMS.gpg SHA256SUMS (gpg 2.4.9, isolated home): Good signature, exit 0. GPG warned the key is not locally certified; the fingerprint matched both the signature issuer and the keyserver key.
  • HEAD on each image URL: HTTP 200, Content-Length 621284352 (amd64) / 616522752 (arm64), last modified 17 Oct 2026 20:31 GMT.

Full record: packaging/node-vm/provenance/RETRIEVAL-EVIDENCE.md.

Changes

  • Real pins in provenance/base-images.json; synthetic values moved to clearly marked provenance/base-images.fixture.json (explicit --profile fixture only).
  • verify_artifact_provenance() in scripts/node_vm_build.py: artifact mode fails closed on fixture-placeholder/repeated digests, missing signature URL/fingerprint/evidence, or moving /release///current/ URLs. verify_image_checksum() checks image pins against published SHA256SUMS content. Integrity/SBOM generation also enforces artifact pins.
  • Build plans and CycloneDX SBOM carry the dated pin, signed-checksum URL and key fingerprint metadata.
  • ADR 0035, governing knowledge concept, MATRIX, README, host prerequisites and qualification docs updated with the real pinning rule and evidence limits.

Verification (updated exact head 070203c6456ff7e58aa56b3391e0ee0930bc7981)

  • python -m py_compile on all drivers, tests and the guest first-boot module ΓÇö clean.
  • python -m unittest discover -s scripts -p 'test_node_vm_*.py' ΓÇö 30 tests pass in fixture mode, including real-pin verification, placeholder refusal and published-checksum matching.
  • YAML: all 3 rendered NoCloud seed documents parse with PyYAML; all packaging JSON parses.
  • python scripts/node_vm_build.py --profile artifact --check ΓÇö green, provenance_status: verified; plan records the dated pin and no_qcow2_built: true.
  • python scripts/node_vm_build.py --profile fixture --check ΓÇö green, fixture-placeholder.
  • python scripts/node_vm_integrity.py --profile artifact --out-dir <tmp> --verify ΓÇö SHA256SUMS + CycloneDX 1.5 SBOM with real pin metadata.
  • python scripts/node_vm_upgrade.py ... ΓÇö staged undo plan emitted.
  • go run ./cmd/knowledge-lint -root . -fix then plain lint ΓÇö 69 concepts, 38/38 queries, indexes current; knowledge/decisions/adrs.md untouched.

What remains unverified

  • The image bytes were not downloaded and no SHA256 was recomputed over them; the recorded hash is the upstream published, signature-verified value. A real build must still download and rehash.
  • No real QCOW2 was built, no live VM/hypervisor/host configuration was touched, no enrollment, daemon, gameplay or deployment was run.
  • GPG trust is fingerprint-based, not a local web-of-trust certification.
  • qemu-img/xorriso remain version-pinned but not separately signature-verified in this slice.

No merge, no registry push, no release/tag, no publication. Independent review and CI requested.

Follow-up: shared SIG_CLAIM context alignment (same branch, new head 070203c6456ff7e58aa56b3391e0ee0930bc7981)

OSS-385 PR532 (fc998875) fixed the canonical SIG_CLAIM context in the shared
internal/noderuntime/enroll package as NUL-delimited ClaimContextRaw bytes
over the server-stored nonce (no client nonce), enrollment expires_at
(RFC3339Nano), comma-joined proto capability names and channel context,
Ed25519-only. The VM first boot still signed canonical JSON; those bytes would
not verify against the shared package.

  • VM first boot now reproduces the exact shared byte encoder; it refuses
    canonical-JSON contexts, accepts only Ed25519, and exposes
    claim_from_challenge() / verify_claim() bound to the server's nonce and
    challenge ID.
  • Byte-for-byte conformance golden generated by actually running
    ClaimContextRaw from PR532 head fc998875 in an owned temporary worktree
    (shared writer worktree untouched), checked in at
    packaging/node-vm/qualification/fixtures/claim-context-shared.json with
    input fields, context hex, Ed25519 signature hex and seed.
  • Fixtures assert exact byte equality with that golden, the server-stored nonce,
    refusal of a canonical-JSON-signed claim, and Ed25519-only.
  • Guest Python mirrors the encoder for fixtures only; a production mount must
    delegate the claim to the shared Go package rather than add a second encoder.
    Provenance pins and fail-closed placeholder/moving-URL checks are unchanged.
  • ADR 0035, enrollment policy, README, qualification and the governing knowledge
    concept updated. knowledge/decisions/adrs.md untouched.
  • Re-verified: py_compile clean, 30 offline fixtures pass, YAML seeds + all
    packaging JSON parse, artifact/fixture builds and artifact SBOM green,
    knowledge-lint -fix then final 69 concepts/38 queries, indexes current.
    No merge, live VM, release or registry write.

…fixtures

OSS-377 quality fix. Replace synthetic base-image pins with immutable dated
Ubuntu 24.04 release-20261017 amd64/arm64 cloud images and real SHA256 values
from the upstream GPG-signed SHA256SUMS, verified against the official UEC
Image Automatic Signing Key (fingerprint D2EB44626FDDC30B513D5BB71A5D6C4C7DB87C81).
Record exact URLs, hashes, HTTP statuses, checksum/signature/key digests and
gpg verify output in provenance/RETRIEVAL-EVIDENCE.md.

Synthetic values are confined to base-images.fixture.json for explicit
--profile fixture offline tests. Artifact mode calls verify_artifact_provenance()
and refuses placeholder digests, moving /release/ or /current/ URLs and missing
signature evidence; verify_image_checksum() checks image pins against published
SHA256SUMS content. SBOM and build plan carry the real dated pin metadata.

Update ADR 0035, governing knowledge concept, matrix, README, host prereqs and
qualification docs with the real pinning rule and evidence limits: no image
bytes downloaded, no QCOW2 built, no live VM/host/deployment.

Verification: py_compile clean; 27 offline fixtures pass in fixture mode;
YAML seed docs and all packaging JSON parse; artifact and fixture build --check
green; artifact integrity/SBOM green; knowledge-lint -fix then final 69 concepts,
38/38 queries, indexes current. No registry, release or publication.
OSS-385 follow-up: PR532 (fc99887) fixed the canonical SIG_CLAIM context in
internal/noderuntime/enroll as NUL-delimited ClaimContextRaw bytes over the
server-stored nonce (no client nonce), enrollment expires_at (RFC3339Nano),
comma-joined proto capability names and channel context, Ed25519-only. The VM
first boot still signed canonical JSON, so its signatures would not verify
against the shared package.

Replace canonical_context() with the exact byte encoder; add claim_from_challenge(),
Ed25519-only enforcement and verify_claim(); explicitly refuse the old
canonical-JSON context. Produce a byte-level golden by running ClaimContextRaw
from PR532 head in an owned temporary worktree (shared writer worktree untouched)
and check it in at qualification/fixtures/claim-context-shared.json. VM fixtures
assert byte-for-byte equality, server-stored nonce, JSON refusal and Ed25519-only.

Guest Python mirrors the encoder for fixtures only; a production mount must
delegate the claim to the shared package. Provenance pins and fail-closed
placeholder/moving-URL checks unchanged. Update ADR0035, policy, README,
qualification and governing knowledge concept; do not edit adrs.md.

Verification: py_compile clean; 30 offline fixtures pass; YAML seeds and all
packaging JSON parse; artifact/fixture build checks and artifact SBOM green;
knowledge-lint -fix then final 69 concepts, 38/38 queries, indexes current.
No merge, live VM, release or registry write.
@athNdev
athNdev merged commit 5b6960f into main Nov 18, 2026
12 checks passed
@athNdev
athNdev deleted the codex/node-vm-provenance branch November 18, 2026 09:23
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