Skip to content

feat(supply-chain): build, attest, and activate the patch-validator image #66

Description

@seonghobae

Problem

Noema's exact-source patch-quarantine library has now been cleanly rebuilt after the protected nanoid remediation, but the dedicated patch-validator image remains on a stale historical stack. Until the image is rebuilt on the protected exact-source successor, published, signed, scanned, attested and activated with independently verifiable evidence, buyers cannot verify that the runtime image used for validation is reproducible from reviewed source or that it preserves the intended credential boundary.

Current protected main: c85d710804139c0697d7ef8fa47d02b1389e6d84.

Current patch-quarantine source owner: PR #93, exact head fe3074a188739705f89ff67b46712ac9d228081d, direct on protected main. Fresh application CI 31375580944, reviewer-ci 31375580959 and central Security Scan 31375580983 are terminal-success; formal reviews remain 0 and live #27/#29 governance still blocks protected merge.

Historical #65 is closed unmerged. PR #67 contains unique validator-image work but remains based on the old #65 lineage and has moved independently; old #65/#67 checks/reviews never transfer to a future clean successor.

The delivery lane must also keep artifact license metadata subordinate to owner/legal authority. Historical #67 work exposed that an OCI org.opencontainers.image.licenses="LicenseRef-Proprietary" label could silently invent a legal posture while Noema has no approved outbound-rights declaration. Image publication must fail closed when release/container rights metadata disagrees with—or attempts to substitute for—the repository/package/owner-legal licensing decision tracked by issue #5 and the acquisition-integrity line #69.

Required architecture

  • Keep image build, image verification, untrusted patch execution, model judgement, review publication, merge authority, release authority, deployment authority, and owner/legal licensing authority as separate stages.
  • Never expose GitHub write credentials, reviewer/model keys, NVIDIA_NIM_API_KEY, Cloudflare credentials, OIDC publication tokens, signing credentials, or the Docker socket to untrusted patch execution.
  • Preserve exact-head binding, stale-head refusal, immutable workflow-source provenance, bounded evidence collection, and separation among checks, statuses, formal reviews, scanner evidence, model judgement and merge/release authority.
  • Do not create .github/workflows/repair-*, self-modifying Actions, branch-patching workflows, or workflows with contents: write that patch their own branch.
  • Never infer an outbound source/artifact license from repository visibility, private: true, SBOM/scanner classification or an invented LicenseRef-* value.

Dependency order

#93 protected integration
→ rebuild only #67's unique validator-image delta on the then-current protected lineage
→ fresh exact-head application/reviewer/eligible Security Scan/image evidence
→ protected-main local-image operational acceptance
→ publication/signature/attestation/digest-lock activation

Do not restack #67 while #93 is unintegrated or while another writer is moving #67. Do not copy #65 package/history or transfer predecessor evidence.

Acceptance criteria

Protected exact-source prerequisite

Clean validator-image successor

  • After feat(sandbox): restack exact patch quarantine after nanoid #93 protected integration, identify feat(sandbox): build and verify patch-validator image #67's unique image-only delta by exact comparison and rebuild only that delta from current protected main.
  • Preserve the reviewed closed node_patch_verify_v1 image-owned command profile; no caller-provided shell command.
  • Use a reviewed minimal numeric-non-root image with explicit entrypoint and no shell/package manager unless technically required and justified.
  • Pin and authenticate build inputs and static runtime identity; require the JavaScript/Unicode runtime capabilities the validator actually needs.
  • Document supported architectures, UID/GID, filesystem, locale/timezone and resource assumptions.
  • Acquire fresh application CI, reviewer-ci, eligible central Security Scan and image-workflow evidence on the clean exact head; old feat(sandbox): build and verify patch-validator image #67 evidence is historical only.

Supply-chain evidence

  • Generate a CycloneDX or SPDX SBOM for the exact final image.
  • Scan the exact image and fail on MEDIUM/HIGH/CRITICAL findings unless a time-bounded independently reviewed exception names the exact digest/advisory.
  • Bind exact embedded runtime/native-component identities and vulnerability-database snapshot to the image digest.
  • Sign the immutable image digest using a verified keyless or repository-controlled identity.
  • Generate provenance bound to repository, source commit, workflow path/ref/digest, builder identity, runner environment, image digest and build parameters.
  • Verify signature, SBOM, provenance, source repository, signer workflow, Actions OIDC issuer and runner policy before any reviewer consumes the image.
  • Retain bounded machine-readable build/verification receipts with explicit schema versions and SHA-256 digests.

Licensing / third-party rights evidence

  • Do not emit org.opencontainers.image.licenses or equivalent artifact license metadata while outbound rights remain unresolved, unless an authorized owner/legal record explicitly requires a truthful bounded declaration.
  • If owner/legal later chooses an SPDX posture, require any OCI license annotation to match that approved expression exactly; custom/unlicensed decisions may not be replaced by another OCI claim.
  • Bind exact-release artifact-rights metadata to repository, SemVer tag, full commit, immutable image digest, SBOM, dependency-license inventory, NOTICE/attribution and provenance.
  • Apply the fix(acquisition): authenticate data-room manifest evidence #69-style acquisition consistency gate before registry publication/activation so artifact metadata cannot broaden root/package/owner-legal rights.
  • Preserve third-party attribution/NOTICE and dependency-license evidence; vulnerability success never substitutes for license compatibility or transfer rights.

Runtime security verification

  • Run a real no-network smoke test against the exact digest-pinned image.
  • Verify non-root, read-only rootfs, dropped capabilities, no-new-privileges, seccomp, isolated IPC, bounded PID/CPU/memory/swap/descriptors/process/core/file-size/tmpfs/wall-time and no Docker socket.
  • Keep source/patch inputs read-only and do not expose a host-writable final evidence path to untrusted execution; trusted host synthesizes retained evidence only after authenticated completion.
  • Prove GitHub/model/NVIDIA NIM/Cloudflare/OIDC/signing/publication/release/deployment credentials are absent from container env/filesystem/arguments/mounts.
  • Add adversarial tests for oversized output, network attempt, process exhaustion, special files, mount injection, forged/result-replacement attempts, timeout/cleanup failure and unexpected exits.

Reviewer integration

  • Activate the image only behind a configuration gate that defaults disabled until exact verification evidence passes.
  • Bind immutable image digest to repository/base/head/patch SHA-256/profile/workflow/check/result receipt.
  • Treat validator output as evidence only; it cannot approve a PR, satisfy independent review, authorize merge/release or choose licensing posture.
  • Refuse stale head, missing/pending required evidence, malformed receipt, pagination truncation, unknown producers, unexpected skipped jobs and mismatched workflow source.
  • Preserve standalone Noema operation and modular integration with .github, naruon and other CWL services through explicit versioned boundaries.

Quality / documentation

  • Maintain beginner-readable public docs and exact 100% owned production statement/branch coverage plus exposed function/line metrics.
  • Update canonical operations, security, threat model, deployment, incident/recovery, keyless-signing, retention, licensing/IP-transfer, buyer-verification and traceability docs on the single fix(security): bind workflow source and document MSA boundaries #71 canonical line after implementation stabilizes.
  • Record current primary standards/technical documentation with APA 7 references for OCI image/runtime/annotations, SLSA, NIST SSDF/container guidance, Sigstore, SPDX/NOTICE and selected SBOM format.
  • Update CHANGELOG.md; do not bump version or publish a release until integrated technical, review, provenance, licensing/NOTICE/IP-transfer and release-acceptance gates all pass.

Verification evidence

Retain references for exact source/workflow identities, built image/digest/platforms, SBOM/vulnerability/signature/provenance receipts, artifact-rights/NOTICE/license evidence, no-network isolation and trusted-host synthesis, exact patch request/result, independent review/protected merge, and rollback/rotation drill evidence.

Out of scope

This issue does not weaken #27, provision #29, configure #40, choose outbound licensing under #5, or claim acquisition readiness without #3/#5 production and commercial evidence.

Related: #5, #9, #27, #29, #40, #67, #69, #93

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions