Repository navigation
impl(042): the image built, checked and scanned in the release workflow - #459
Conversation
AI review (findings)Reviewing the PR for bugs, security problems, and inconsistencies.
grype -q "sbom:$sbom" -o json --file "$dir/rustev-serve-linux-$arch.vulnerabilities.json"
grype -q "sbom:$sbom" -o table || trueGrype exits with a non-zero status code when it finds vulnerabilities above its default threshold, not only on errors. The second call suppresses this with
test "$#" = 3 || fail 'compare-image <release-dir> <rebuild-dir>'The check and the invocation ( Overall structure and security The BuildKit image is pinned by digest; syft and grype are downloaded with version-pinned filenames and sha256sum-verified before extraction; the {"head": "69a7cf5db11d313fd2ab3952acae67c50f0078c8", "verdict": "findings", "findings": [{"path": "tools/rustev-release/artifacts.sh", "line": null, "summary": "In scan-image, the first grype call (JSON output) lacks || true: grype exits non-zero when findings exist, so under set -e the loop aborts early and the total count is wrong, defeating the non-gating intent of 031 3.9.2."}, {"path": "tools/rustev-release/artifacts.sh", "line": null, "summary": "compare-image error message says two arguments but the correct invocation needs three positional parameters, misleading callers who see the usage string."}]}Subject: 9fca258...69a7cf5, diff digest 70e37f44054ffc3296f23b5c649b8ce596abbed4d9e7e3c71ff0a69160980967, 1 call(s). An AI comment is not an approval. |
b611674 to
da015fc
Compare
AI review (findings)Looking at the diff, I'll focus on the shell script logic in
The grype -q "sbom:$sbom" -o json --file "$dir/rustev-serve-linux-$arch.vulnerabilities.json"
grype -q "sbom:$sbom" -o table || true
No other concrete defects were found. The {"head": "da015fc109077561762fb29b1a3b41526286f06e", "verdict": "findings", "findings": [{"path": "tools/rustev-release/artifacts.sh", "line": null, "summary": "In scan-image, the first grype invocation (writing the JSON file) lacks || true, so any vulnerability finding exits the script before the count and the 'not gating while absent' check run, defeating the 031 3.9.2 intent that findings are recorded without failing while the image is absent."}]}Subject: 41b490d...da015fc, diff digest 970ca564d74545712a9c68648fd053db22bedadea575a0731aaec85b02f06496, 1 call(s). An AI comment is not an approval. |
da015fc to
11b0847
Compare
AI review (no-findings)Reading through the diff carefully across all five changed paths.
The The
Spec changes — 031 and 042 narrative additions accurately describe the implementation (native runners per arch, two builds compared byte-for-byte, syft/grype pinned by version and hash, image absent from the release set, qualify waiting without gating on image result). No concrete defects found. {"head": "11b084788d997532b1ad0d542d2dfd21d00eb5b1", "verdict": "no-findings", "findings": []}Subject: 41b490d...11b0847, diff digest 8f60f73e248ea6f8732ffb9e77d476a43ad5cbdd9c7aac5c95c107ee3ddf44d0, 1 call(s). An AI comment is not an approval. |
11b0847 to
1fc0d96
Compare
AI review (findings)Reviewing the five changed paths for bugs, security issues, and inconsistencies.
The Action pin versions:
In the for side in a b; do
mkdir -p "$scratch/$arch/$side"
eval "src=\$$side"
case "$side" in a) src=$a ;; b) src=$b ;; esacThis is a real code defect: SHA-256 values for syft and grype in the
Spec changes in 031 and 042 accurately describe the implemented workflow steps. The version numbers, tool names, and behavioral descriptions match what is coded.
{"head": "1fc0d961f80e60e9583b406a3001677bc1e6d930", "verdict": "findings", "findings": [{"path": "tools/rustev-release/artifacts.sh", "line": null, "summary": "compare-image uses eval to dereference $a/$b from caller-supplied path arguments; if those paths contain shell metacharacters the eval will execute them — replace with a case statement."}]}Subject: 41b490d...1fc0d96, diff digest 0473dd9129f128802404bebf4170f5eb3e37ab195ad90ac7c8f0ea8dbac8d04f, 1 call(s). An AI comment is not an approval. |
1fc0d96 to
8f77883
Compare
AI review (findings)Reading the diff carefully for bugs, security issues, and inconsistencies against the governance context and spec documentation.
The
The
Concrete defect: the bans failure message references the wrong spec. The comment above the bans check explicitly attributes it to if ! deny bans; then
test "$member" = no || fail '021 3.6: rustev-serve fails the bans policy' # ← should be 031 3.9.2
echo '031 3.9.2: rustev-serve fails the bans policy; recorded, not gating ...'
fi
Updated reason is consistent with the new workflow behavior (image is built and scanned but not published). No defect. Spec edits Both spec increments accurately narrate the workflow changes and the membership/gating logic. No contradiction with the governance documents. {"head": "8f77883710b54ec0de1601f7bdfb0380c5a8b4eb", "verdict": "findings", "findings": [{"path": "tools/rustev-release/artifacts.sh", "line": null, "summary": "In scan-image, the bans-failure error message cites '021 3.6' but the code comment and spec 031 3.9.2 govern this check; the informational path on the same branch correctly cites '031 3.9.2', making the gating-path message reference the wrong spec."}]}Subject: 41b490d...8f77883, diff digest c626a48f458c2187a83d8050443795ea1d3d4d17df7bb4c4f8f51a8629d5dfcc, 1 call(s). An AI comment is not an approval. |
8f77883 to
a9bd5be
Compare
AI review (findings)Reviewing the diff across all five changed files.
The cleanup trap is registered after check_dir=$(mktemp -d ...)
docker buildx create --name "$builder" ... >/dev/null # ← may fail with set -e
trap 'docker buildx rm "$builder" ...; rm -rf "$check_dir"' 0 # ← trap set hereIf
The design (qualify waits for
Both
The Python one-liner reads SHA-256 lengths — both Spec text — 031 and 042 increments are consistent with each other and with the workflow: build-twice-per-platform, byte-comparison, SBOM, scan, no attestation/push while the image is absent. One concrete defect: {"head": "a9bd5be5664a5b53e944a190312fcaab09939c97", "verdict": "findings", "findings": [{"path": "tools/rustev-release/artifacts.sh", "line": 212, "summary": "In build-image, the check_dir temp directory is created before docker buildx create but the EXIT trap that cleans it up is registered only after; if docker buildx create fails under set -e the temp directory leaks."}]}Subject: 6660985...a9bd5be, diff digest d346e24a0f256fbadbef42a4f9c7c7702caaaa7918665174b464ea5d08e152c7, 1 call(s). An AI comment is not an approval. |
764ea2c to
a54c83a
Compare
AI review (findings)Reviewing the diff for bugs, security problems, and inconsistencies.
The function guards against a repository-level grype config altering the scan: for config in .grype.yaml .grype.yml .grype/config.yaml; do
test ! -e "$config" || fail "a grype configuration ($config) would change the scan; remove it"
doneGrype also loads # Without a fail-on setting grype exits 0 whatever it finds, so a
# non-zero status is a tool error, never a finding; findings are
# counted from the JSON report below.
env -u GRYPE_FAIL_ON_SEVERITY grype -q "sbom:$sbom" -o json ...
Everything else looks consistent: action pins carry commit digests, the BuildKit image is pinned by digest, the syft/grype tarballs are verified against hardcoded SHA-256s before extraction, the {"head": "a54c83a75d2ff0ad18f059ef858fa739e9fde424", "verdict": "findings", "findings": [{"path": "tools/rustev-release/artifacts.sh", "line": null, "summary": "scan-image checks only repo-level grype config paths (.grype.yaml, .grype.yml, .grype/config.yaml) but not user-level ones (~/.grype.yaml, ~/.config/grype/config.yaml); a runner config with fail-on-severity would cause grype to exit non-zero on findings, which the script treats as a tool error rather than counting findings, bypassing the member/non-member gate."}]}Subject: ae717a1...a54c83a, diff digest ee9479cd3958a5b58f81cd534a195a45d549204141c672ca90503aa0795902fe, 1 call(s). An AI comment is not an approval. |
02f6f05 to
d5a4707
Compare
AI review (findings)Reading through the diff, I'll check the shell script logic, CI workflow structure, and spec consistency.
Every other failure message inside test "$member" = no || fail '031 3.9.2: rustev-serve fails the bans policy'
…
test "$member" = no || fail "031 3.9.2: $total image finding(s) and no exception rule …"But the deny advisories licenses sources ||
fail '021 3.6: dependency audit of rustev-serve failed; policy changes require separate review'
Everything else checked:
{"head": "d5a47075eb57d00b9e85fab47a2a8be1ec09b59e", "verdict": "findings", "findings": [{"path": "tools/rustev-release/artifacts.sh", "line": null, "summary": "The `scan-image` command's failure message for `deny advisories licenses sources` incorrectly cites spec `021 3.6` (the main-workspace audit spec) instead of `031 3.9.2`, which is the governing section for this step; every other failure message in the same function correctly cites `031 3.9.2`."}]}Subject: 3dca8fd...d5a4707, diff digest f467e5f2002aa5e602fdcbfda3d0880a2b3cef07ece1ac1efd00ac021f7842ad, 1 call(s). An AI comment is not an approval. |
d5a4707 to
3dd4656
Compare
AI review (findings)Reviewing the diff for bugs, security issues, and spec inconsistencies.
The design is internally consistent with the stated intent:
The syft -q "oci-archive:$dir/$name" -o "[email protected]=$dir/$name.cdx.json"
…
cargo cyclonedx --manifest-path integrations/rustev-serve/Cargo.toml --format json --spec-version 1.5 --all --target "$target"
cp integrations/rustev-serve/rustev-serve.cdx.json "$dir/$name.crate.cdx.json"Contrast with Specs 031 / 042 The increment descriptions, owner-decision dates, and cross-references (3.9.1–3.9.3, 3.16, 058 3.3.4, 058 3.4.2) are self-consistent between the two spec edits and the workflow / release-set changes.
The {"head": "3dd4656cf5acd9f34563053a54da7a849c9c8d1f", "verdict": "findings", "findings": [{"path": "tools/rustev-release/artifacts.sh", "line": null, "summary": "In sbom-image, the syft and cargo-cyclonedx invocations inside the arch loop have no || fail guard; if cargo-cyclonedx fails without set -e active, cp silently fails, the crate SBOM is absent, and the omission goes undetected because scan-image checks only image SBOMs and the artifact upload uses if-no-files-found: ignore."}]}Subject: 3dca8fd...3dd4656, diff digest 7ab44c733afb133aeece1ba7dcdf42e8dba40528e02d575826c2ff9dcbe96332, 1 call(s). An AI comment is not an approval. |
The release workflow builds spec 042 3.16's rustev-serve image for linux/amd64 and linux/arm64 twice each on native runners, runs check.sh, requires identical OCI archives per platform, writes CycloneDX SBOMs and scans the crate with cargo deny and the base layers with grype (031 3.9). Nothing is attested or pushed: 058 3.3.4 allows no packages: write, and 0.4.0 ships without the image, so it stays absent in the release set and its scan findings are recorded without gating. qualify waits for the image jobs without depending on their result. Specs 042 (increment 9) and 031 record the change.
3dd4656 to
972b23d
Compare
AI review (no-findings)I reviewed all five changed files against the governance context and the PR diff. Here is a summary of what I checked.
Spec files -- The increment paragraphs are additive prose, consistent with the workflow behavior described in the diff. The SHA-256 values quoted for the dry-run archives are internal evidence; I cannot independently verify them but have no contrary evidence. No concrete defect found. {"head": "972b23d1c7e67107fc0f2d518a6ca37a90299c3a", "verdict": "no-findings", "findings": []}Subject: 3dca8fd...972b23d, diff digest 3aa0222db9e52eabfcc2f6d502d3d6f3b7adf1061ef814bffa5addcb968edb61, 1 call(s). An AI comment is not an approval. |
Builds the
rustev-serveimage of spec 042 3.16 in the release workflow, twice per platform, and checks, compares, describes and scans it, with no push. This closes 042's image acceptance item ("builds forlinux/amd64andlinux/arm64as non-root under spec 031's candidate workflow"). The owner decided on 2026-11-02 that 0.4.0 ships without the image, so it staysabsentin the release set.Change
tools/rustev-release/artifacts.shgains four commands:build-image <platform> <out> <epoch>: no cache, a fresh BuildKit builder pinned by digest (moby/buildkit:v0.34.0), the commit's source date with layer timestamps clamped to it, an OCI archive, thenimage/check.shon the loaded image.compare-image <a> <b>: the two archives of each platform must be identical. A difference lists every differing archive entry and fails.sbom-image <dir> <epoch>: a CycloneDX 1.5 SBOM per platform archive (syft 1.54.1), plus the crate's own (cargo-cyclonedx0.5.9).scan-image <dir>:cargo deny0.20.2 overrustev-servewith the release policy, and grype 0.120.1 over each platform SBOM.GRYPE_FAIL_ON_SEVERITYcleared, so no repository, home or XDG config can add a fail-on setting. A non-zero exit is a tool error, never a finding..github/workflows/release.yml:imagebuilds the release and rebuild archives on native runners (ubuntu-24.04,ubuntu-24.04-arm).image-checksruns the comparison, the SBOMs and the scan, and uploads the evidence.qualifystays the last job (058 3.4.2, checked bytests/release_workflow.rs). It now also needsimage-checks. Itsif:reads onlyverify-release, so an image failure doesn't hold back qualification.release-set.json: the image's absence reason now says why it is absent.status:andimplementation:are unchanged.Evidence
linux/arm64: two builds on independent builders gave byte-identical archives, andcheck.shpassed.ce15f7e2…, arm64f9cbe36c…), andcheck.shpassed on both.cargo deny: advisories, licenses and sources pass. Bans (2 duplicate versions, 5 wildcard path deps, first seen in run 41557841721) are recorded.distroless/cc-debian12base reports 61 findings on arm64 (libc6, libssl3, the gcc-12 runtime). These are recorded, not gating, while the image is absent. Before the image can be a member, two things are needed: a newer base digest, which clears the libssl3 fixes, and an owner-approved, expiry-bounded exception rule for the rest. Both go with draft spec 060 (spec(060): the service image in the release (amends 031 and 058) #458), which proposes the push for 0.4.1.Approval
This edits
.github/workflows/release.yml, so it needs the owner's approval of thestatecraft-review-exceptionEnvironment once.Checks
make gatebash scripts/check-authored-content.shmake codesh -n tools/rustev-release/artifacts.sh