Repository navigation
release: the manifest names the image's digests and SBOMs (060 3.4.1) - #494
Conversation
AI review (findings)Reviewing the diff across image.rs — tar_files image.rs — platform_manifest image.rs — index_bytes family_artifacts.rs — collect_family / compare_files family_artifacts.rs — validate manifest.rs / main.rs tests/image.rs Concrete finding The {"head": "7b8c0b28bc76c63eca0ecb80502b673b490b9ab8", "verdict": "findings", "findings": [{"path": "tools/rustev-release/src/image.rs", "line": 282, "summary": "IndexPlatform serialises architecture before os, diverging from OCI index field order; any verify-release path that fetches the pushed registry index to compare digests will find a mismatch, since the registry (and OCI tools) place os first."}]}Subject: e3f6b9a...7b8c0b2, diff digest c3a012910139b018e3a4950ba7d433ca6149171e9247308b8e75df04399a1900, 1 call(s). An AI comment is not an approval. |
7b8c0b2 to
99f0a71
Compare
AI review (no-findings)Reviewing the diff across
The hand-rolled ustar/PAX reader correctly handles Blob verification in
Uses
Sidecar format (
The
Tuple destructuring assignment Tests Cover the specified scenarios: index-is-pure-function (with an exact JSON assertion), platform mismatch, blob hash tamper, two-manifest/no-manifest index, all No concrete bugs or security defects found. {"head": "99f0a714918faaa535ca067570cddfa15bf262fc", "verdict": "no-findings", "findings": []}Subject: e3f6b9a...99f0a71, diff digest 91007453542b3a0a054b54abac6cf3a7d8ad3f7c8554070606ec5ee465958283, 1 call(s). An AI comment is not an approval. |
…d SBOMs, refused without them or in a candidate (060 3.4.1)
99f0a71 to
2a368e2
Compare
AI review (no-findings)Reviewing the diff across all seven changed paths.
The PAX extended-header body is parsed with
b'x' => {
long_name = records.lines().find_map(|r| {
r.split_once(' ')
.and_then(|(_, kv)| kv.strip_prefix("path="))
.map(str::to_string)
});
continue;
}If the PAX header contains no
The image archive keys and their
pub fn collect(...) -> Result<Vec<WorkflowArtifact>, String> {
collect_family(set, evidence, artifacts).map(|(a, _)| a)
}For the current committed
The candidate check (
Field declaration order on the serde structs (
if !digest_ok(&image.index_digest)
|| image.index_digest != format!("sha256:{}", sha256_hex(&index_bytes(&image.platforms)))
{
return refuse("index digest is not the index of its platform digests");
}Both format and value are checked. Modifying any platform's
The image field is omitted from serialized bytes when absent, preserving the byte identity and digest of every earlier manifest. Correct. No concrete defect is supported by the available evidence. {"head": "2a368e239936043e763a32e2193887a5e33abf7e", "verdict": "no-findings", "findings": []}Subject: 983b4ac...2a368e2, diff digest 91007453542b3a0a054b54abac6cf3a7d8ad3f7c8554070606ec5ee465958283, 1 call(s). An AI comment is not an approval. |
…0 3.1) [held for owner decision] (#499) Spec 060 increment 5 (3.1): membership. DRAFT, DO NOT MERGE until the owner decides 060 decision 2 and the other prerequisites below hold. - `tools/rustev-release/release-set.json` names the image under `image` (`ghcr.io/statecrafting/rustev-serve`, `linux/amd64`, `linux/arm64`) and drops its `absent` entry. This is the switch that makes the next release name the image in its manifest, gate its scan through `image-exceptions.json`, push and attest it (`publish-image`), verify it and qualify it. - Tests that are not about the image (`tests/family.rs`, `tests/tagged.rs` fixtures) set `image` to none; `tests/npm.rs` and `tests/image.rs` no longer read an image absence from the committed set. Prerequisites before merging: 1. The base move to `gcr.io/distroless/cc-debian13:nonroot` (#502), decided by the owner on 2026-11-03. 2. The owner's ruling on each of the 44 findings on that base (one decision row and one `image-exceptions.json` entry per (id, package), at most 90 days). With the image a member, any uncovered finding fails `image-checks`. 3. The image qualification of 060 3.4.3 as amended (#500 harness, #501 workflow). 4. Spec 042 is complete (#477), so 3.1.1's condition holds. The owner makes the ghcr package public after the first push. Stacked on #498 (on #496, #494). Checks: `cargo test -p rustev-release --locked` passed (all binaries); `make gate` passed.
Spec 060 increment 4a (3.1.1, 3.3.2, 3.4.1): the manifest names the image.
imageentry (image::ImageMember:repository,platforms).check_setrefuses a repository other thanghcr.io/statecrafting/rustev-serve, platforms other thanlinux/amd64,linux/arm64in that order, or animagebeside anabsententry of kindimage. The committed set is unchanged (the image stays absent).rustev.release-manifest/2): optionalimage(image::ImageRelease: repository, tag = family version, layer 7, index digest, per-platform media type, digest, size, optional variant and SBOM file, SLSA build level 2). Serialized only when present, so earlier manifests keep their bytes and digests.image::platform_manifestreads a verified OCI archive with a small ustar reader (no new dependency): exactly one image manifest inindex.json, its blob hashing to digest and size, its config naming the platform.image::index_bytesis the OCI index over the two descriptors in fixed order (compact JSON in field order), so the index digest is a pure function of the platform digests (3.3.2) and is known when the manifest is attested, before any push.collect_family: with the image a member of a release given its artifacts, requiresimage/<archive>+.sha256sidecar andsbom/<archive>.cdx.jsonper platform, names the image and adds the two SBOMs as layer-8sbomartifacts (release assets, inSHA256SUMS). The archives are checked but are not release assets. A member without them is refused.validate: refuses a manifest image missing a platform digest or SBOM, out of order, at another tag/repository/build level, or whose index digest is not the index of its platform descriptors; refuses any candidate manifest naming an image (053 3.4.2). An image as a plain artifact stays refused.tools/rustev-release/tests/image.rs(7 tests) cover section 5's manifest row and the candidate refusal.verify-releaseagainst the registry follows (stacked on this). Stacked onrelease/bump-0.4.0(#480); appends to 060's implementation record like #487 and #491 (keep all paragraphs on rebase).Checks:
cargo test -p rustev-release --lockedpassed; clippy-D warningspassed;spec-spine verify 031passed (4 commands);make gatepassed;check-authored-content.shclean.Review round 1: the index's platform object now follows the OCI image-spec order (
os,architecture, thenvariant). The exact bytes golden in tests/image.rs is updated.verify-imagestill compares the registry's bytes with these exact bytes and their digest.