Skip to content

packaging: supported skip-build path with honest BUILD-INFO (mecmcp#355) - #264

Merged
fastrevmd-lab merged 3 commits into
mainfrom
fix/355-skip-build-provenance
Oct 24, 2026
Merged

fastrevmd-lab merged 3 commits into
mainfrom
fix/355-skip-build-provenance

Conversation

@fastrevmd-lab

Copy link
Copy Markdown
Member

Remainder of mechubsec/mecmcp#355: a supported skip-build packaging path whose BUILD-INFO does not claim a toolchain that never compiled the binary.

What changes

  • scripts/build-release.sh: PANOSMCP_PACKAGE_SKIP_BUILD=1 packages an existing target/release/rust-panosmcp (e.g. extracted from the release image). It requires PANOSMCP_BINARY_SOURCE_COMMIT (full 40-hex, present in the clone), reads version and toolchain pin at that commit, and refuses a binary whose --version disagrees.
  • BUILD-INFO gains packaging_commit= and binary_sha256=; rustc= is a single line, unknown (…) on the skip-build path.
  • packaging/conformance.toml: build_info = true + skip_build_env, so R3 is fatal.
  • CI conformance job verifies the real tarball and runs packaging/tests/skip-build-provenance.sh.
  • docs/OPERATIONS.md documents the path.

Verification

  • Provenance test passes; conformance verifier passes R3 normal and --prebuilt; shellcheck clean.
  • Sabotaged one at a time (real rustc line on skip-build, wrong binary_sha256, version guard removed): each caught.
  • Codex gate: two findings fixed (version/toolchain were read from the packaging checkout); one rejected (version check executes the binary — fails closed, all hosts x86_64).

Not verified locally: R6 image check and the CI YAML itself.
Pre-existing, unrelated: packaging/lxc/tests/test_stale_scan_legacy_detection.sh also fails on main.

Refs mechubsec/mecmcp#355

🤖 Generated with Claude Code

fastrevmd-lab and others added 2 commits October 23, 2026 18:30
scripts/build-release.sh gains PANOSMCP_PACKAGE_SKIP_BUILD=1 for packaging a
CI-built binary (workstation glibc is newer than the LXCs'). It requires
PANOSMCP_BINARY_SOURCE_COMMIT (40-hex, present in the clone) and records it as
git_commit, with packaging_commit always recorded. BUILD-INFO now carries
binary_sha256 and a single rustc= line: the real rustc -vV when built here,
"unknown (... not compiled by this script)" when prebuilt.

conformance.toml makes R3 fatal; CI stages the conformance package from
build-release.sh output and runs packaging/tests/skip-build-provenance.sh.
OPERATIONS.md documents the path and the new fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex review of the skip-build path: the archive took VERSION from the
packaging checkout and the toolchain pin from its rust-toolchain.toml, so an
older CI binary could ship under a newer version's name with a pin it was
never built with. Both now come from PANOSMCP_BINARY_SOURCE_COMMIT, and the
binary's own --version must match or packaging refuses. The provenance test
gains a stub-binary negative case for the version check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fastrevmd-lab
fastrevmd-lab merged commit 2162e9c into main Oct 24, 2026
11 checks passed
@fastrevmd-lab
fastrevmd-lab deleted the fix/355-skip-build-provenance branch October 24, 2026 23:27
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