Repository navigation
Conversation
…ance A rebuild is reviewable only if it can say what it consumed. Three inputs decide the output -- the recipe, the source archive, and the build root -- and each was described by something that could move underneath a run without the run noticing. **The build root.** config/buildroot-lock.json declares it by digest, and the preflight job now records what the root actually contained: every package NEVRA, the digest prepare resolved, and the digest the lock expected. rpm -qa runs inside the root and the snapshot is assembled on the runner, so the root needs no interpreter -- installing one so it could inventory itself would change the set being inventoried. The rebuild does not pass --strict, deliberately. quay.io/fedora/fedora:44 is republished several times a day and each previous digest is collected, so failing on a moved tag recreates the outage repeated-mistakes.md section 7 records: thirty-seven jobs dead mid-run on a pin that was correct when the run started. The mismatch is recorded in the snapshot and the manifest instead, so a moved tag is visible rather than asserted away. --strict is there for an operator asking whether a root is exactly what was locked. The digest is now written twice -- in the lock and in BUILDROOT_IMAGE -- and two copies of one digest drift. Renovate's build-root-image manager covers the lock file as well, so both move in one pull request, and tools/validate.py fails the gate when any workflow pins a locked buildroot to a digest the lock does not name. That check runs before the recipe tally, because a package merely missing a Packit entry used to return 1 first and hide the drift. **The recipe.** Provenance was already written at import and validated loosely. It is now mandatory and checked by form: a rawhide import must pin full 40-character commit and tree SHAs (an abbreviated SHA is ambiguous and is not what git resolved), and a direct-upstream import must name a non-empty remote and carry no dist-git snapshot. validate.py reports the split it validated -- 346 rawhide, 3 upstream -- so the direct-upstream form, the one easiest to leave unchecked, is visible in the gate output. **The source.** source_pipeline.py records how each accepted archive was verified: signature, sha256-manifest, or the locked sha512 alone. A checksum is not a signature, so factory_manifest.py counts each kind and names the packages in the checksum-only classes -- an exception list to shorten, not a property to grep for. **The output.** factory_manifest.py writes manifest.json beside the repository: built RPMs, source reports and their verification summary, buildroot snapshots, the lock, and the published OCI reference and digest. It is written once before the container build and again once the digest exists, and uploaded as the factory-manifest artifact. Reports are classified by shape -- schema+name+packages for a snapshot, package for a source report -- so unrelated JSON beside the repository is not folded in. docs/skills/supply-chain-provenance.md carries the conventions, including why --strict is not the rebuild default and why the duplicated digest is not resolved by deleting either copy. Carries the work from projectbluefin#158, rebased onto the projectbluefin#178 baseline the maintainer asked it to be re-cut against, with that review's findings closed. Closes projectbluefin#25 Co-authored-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: Danathar <Danathar@users.noreply.github.com>
…s env The prepare job exports BUILDROOT_IMAGE for the whole job and runs the unit tests inside it. cmd_snapshot reads that variable as the running image when no --image or --digest is passed, so test_cmd_snapshot saw the factory's real digest instead of the lock's fake one and failed its own strict check. Strip the factory's variables in setUp so the tests only see what they pass. Also double the % signs in the --packages-from help text: argparse %-formats help strings, and Python 3.14 checks that eagerly at add_argument time, which made every buildroot_lock test error locally. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YQCk7xJDvhtPoc4mWPzVCK
castrojo
left a comment
There was a problem hiding this comment.
Reviewed: Implements buildroot locking via config/buildroot-lock.json, NEVRA snapshot tooling, factory manifest generation, and provenance verification across recipes, closing #25. Clean trial merge and passes all tests and factory validation. Awaiting second independent review to satisfy merge policy.
There was a problem hiding this comment.
security
- Workflow expression interpolated into shell (medium) — the two new manifest steps inline
${{ needs.prepare.outputs.build_list }}inside single quotes directly inrun:(.github/workflows/rebuild-rpms.yml:838and:924). A package directory name containing'would break out of the quoting and execute in the publish job, which holdspackages: writeandid-token: writefor attestation. The value is repo-derived (matrix frompackages/dir names), so exploitation needs a merged malicious dir name — but this file's own convention already handles exactly this: the preflight step passes the same output viaenv: BUILD_LIST(:267). Please routebuild_list(and ideallysteps.oci.outputs.ref/digestat:925-926) throughenv:the same way.
correctness
- Empty digest silently re-asserts the lock (low) —
cmd_snapshot's fallback chain ends inor locked_image(tools/buildroot_lock.py:130-136). IfBUILDROOT_DIGESTarrives empty (--digest ""is falsy, and the preflight step sets no other env), the snapshot records the locked image asimagewith no warning — attesting exactly the provenance this PR's body says the snapshot stopped claiming. Prefer recordingnull/"unknown"or warning when no resolved digest is available.
style
reports()intools/factory_manifest.py:23takes aprefixparameter no caller uses — dead code, drop it or use it.
Verified against the tree at 2c416c0: prepare exports buildroot_digest (rebuild-rpms.yml:101), the oci step emits ref (:733), work/reports exists before the in-container rpm -qa (:269, :272), rpm-* artifacts unpack source reports into repository/reports/ (build-stage.yml:691-696), and just check → validate.py covers the drift gate (Justfile check). Docs match the implemented behavior.
No findings from: intent-alignment, docs-currency.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.78
…top the snapshot defaulting to the lock
Two review findings on the buildroot lock.
The two factory manifest steps in rebuild-rpms.yml inlined
${{ needs.prepare.outputs.build_list }} inside single quotes in run:,
and the second one inlined steps.oci.outputs.ref and .digest as well.
An expression in run: is substituted before bash parses the script, so
a quote in a package directory name would end the argument early, in
the publish job, which holds packages: write and id-token: write. The
values now go through env: and the script reads "$BUILD_LIST",
"$OCI_REF" and "$OCI_DIGEST", the way preflight already passes
build_list. Every expression this change adds to the workflow is now
in env: or with:.
cmd_snapshot's fallback chain ended in `or locked_image`, so an empty
BUILDROOT_DIGEST made the snapshot record the lock's own digest as the
image it ran in, which is exactly the provenance the snapshot exists
to check rather than assert. With nothing resolved it now records
image: null and warns; under --strict that is an error, because an
operator asking whether the root is exactly what was locked cannot be
told yes. locked_image is unchanged. test_cmd_snapshot passes a digest
now that --strict refuses an unknown image, and two tests cover the
null case and the strict refusal.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YQCk7xJDvhtPoc4mWPzVCK
Signed-off-by: Danathar <doug.baggett@gmail.com>
|
Pushed 41312bc for the two reviewer findings. Workflow quoting: the two factory manifest steps in Empty digest: I did not touch the unused Checked locally at 41312bc: |
…uildroots-provenance
The merge from main brought the Renovate bump of BUILDROOT_IMAGE in rebuild-rpms.yml to sha256:a659125..., and this branch's config/buildroot-lock.json still named the previous digest, so the PR's own drift gate (tools/validate.py) failed. Point the lock at the digest the workflow pins. Once this lands, renovate.json's build-root-image manager moves both copies in one PR. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Danathar <Danathar@users.noreply.github.com>
There was a problem hiding this comment.
correctness
cmd_snapshotenv fallbacks contradict the provenance contract this PR states (tools/buildroot_lock.py:118-124in the new file, theactual_imagechain). The module docstring anddocs/skills/supply-chain-provenance.mdboth claim "with no--image,--digestorBUILDROOT_DIGESTthe snapshot recordsimage: null" — but the code also falls back toACTUAL_BUILDROOT_IMAGEandBUILDROOT_IMAGEfrom the environment. Sincevalidate.pyforces the workflow'sBUILDROOT_IMAGEto equal the lock digest, an operator runningsnapshotin a shell that exports that variable (the prepare job's env, or anything sourced from it) gets a snapshot that silently re-asserts the pin as the resolved image — the exact failure the PR body says was fixed from #158. The tests know:tests/test_supply_chain_lock.pysetUpstrips those three variables. Either drop the two undocumented fallbacks or document them; as merged, doc and code make different promises. (CI itself is fine — the snapshot step passesBUILDROOT_DIGESTexplicitly,.github/workflows/rebuild-rpms.yml:311-318.)- Minor:
check_buildroot_drift(tools/validate.py) keys workflow pins by fullrepo:tag, so it only compares digests while the tags agree. A workflow moved tofedora:45@Xwith the lock still atfedora:44@Y— or a deleted workflow pin — produces zero comparisons and passes. The guarantee "fails when the lock and the workflow name different digests" holds only for same-tag drift.
intent-alignment
- The PR body's quoted validation output —
validated 349 source RPMs (346 rawhide, 3 upstream)— cannot come from this branch: head has 342 recipes, andtests/test_package_inventory.py:17(updated in this very diff) assertslen(records) == 342. I verified the substance independently (342/342 recipes carry.hummingbird-upstream.jsonat 6b7b420), so the gate is satisfied; the claimed run is stale, presumably from the #158-era tree. Worth correcting so the record is honest.
No findings from: security, style, docs-currency.
— hive: agent=reviewer backend=copilot model=claude-fable-5
…e total Review findings on projectbluefin#186. cmd_snapshot resolved actual_image through undocumented fallbacks to ACTUAL_BUILDROOT_IMAGE and BUILDROOT_IMAGE, contradicting the module docstring and docs/skills/supply-chain-provenance.md, which both promise image:null when no --image/--digest/BUILDROOT_DIGEST is given. Since validate.py forces the workflow's BUILDROOT_IMAGE to equal the lock digest, running snapshot inside the prepare job silently re-asserted the lock's own pin as the resolved image -- the failure mode this branch exists to remove. Both fallbacks are gone; --image, --digest and BUILDROOT_DIGEST are the only inputs. tests/test_supply_chain_lock.py setUp no longer strips the two variables (it acknowledged the hazard rather than removing it), and a new test exports both to prove they are ignored. check_buildroot_drift keyed workflow pins by full repo:tag, so a pin moved to a different tag (workflow fedora:45@X vs lock fedora:44@Y) shared no key with the lock and was skipped, and a deleted pin left nothing to compare: validate passed in both cases. The comparison is now per repository, and a locked buildroot that no workflow pins is drift rather than an absence of evidence. Nothing is required when .github/workflows does not exist. just check and just test both pass: 441 tests, 2127 subtests; validate reports 342 source RPMs (339 rawhide, 3 upstream). Refs projectbluefin#186 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>
There was a problem hiding this comment.
correctness
compare()intools/buildroot_lock.py(lines 63–73 at 4b72f64) crashes instead of reporting when a lock entry lacksnevra:item.get("nevra")putsNoneintowanted, it lands inmissing, and", ".join(missing[:20])raisesTypeError.load_lockvalidatespackagesis a list but not that entries carrynevra(onlytools/validate.pyenforces that), so a standalonebuildroot_lock.py snapshot --strictagainst a hand-edited lock dies with a traceback rather than the intended error. Still exits non-zero, so the gate holds — low.parse_packages(tools/buildroot_lock.py:44–45) silently drops malformed inventory lines (len(parts) != 3 → continue), andtests/test_supply_chain_lock.pyasserts that drop. For an attestation tool, a corrupted/truncatedrpm -qacapture under-reports the root's contents with no warning; a stderr note (or strict-mode failure) when lines are discarded would keep the snapshot honest about incompleteness. Low.
No findings from: security, intent-alignment, style, docs-currency.
— hive: agent=reviewer backend=copilot model=claude-fable-5
Three reviewer findings, all about the tool misreporting its own confidence.
compare() crashed instead of reporting when a lock entry had no `nevra`:
`item.get("nevra")` put None into the expected set, it landed in `missing`,
and `", ".join(missing[:20])` died with a TypeError. load_lock only validates
that `packages` is a list -- the per-entry requirement lives in
tools/validate.py -- so `buildroot_lock.py snapshot --strict` run standalone
against a hand-edited lock hit this. The gate failed either way, but a
traceback does not tell an operator which entry to fix. Malformed entries are
now counted and named as a lock defect, and deliberately not reported as
missing packages: they are not a divergence in the build root.
parse_packages() dropped malformed `rpm -qa` lines without a word. For an
attestation input that is the wrong default -- a truncated or corrupted
capture makes the snapshot under-report what the root contained, and nothing
downstream could tell. It now warns on stderr naming the dropped lines, and
--strict refuses the snapshot outright: a capture that under-reports cannot
answer "is this root exactly what was locked?", because the lines it could not
read might be the divergence. The scheduled rebuild is unaffected; it does not
pass --strict, and records what it saw.
Also drops the unused `prefix` parameter from factory_manifest.reports().
443 tests pass; `tools/validate.py` clean.
Assisted-by: Claude Opus 5 via Claude Code
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
|
Both findings were real. Fixed in
One deliberate choice there: they're reported as a lock defect and not also as missing packages. An entry the lock couldn't express isn't a divergence in the build root, and conflating the two sends whoever reads the failure looking in the wrong place.
The scheduled rebuild is untouched by the second part: it doesn't pass Two new tests plus an updated assertion on the existing inventory test, which previously asserted the silent drop and now asserts the warning. 443 pass; On the stale validation transcript from your earlier review — that was already corrected in the body at
|
There was a problem hiding this comment.
correctness
The manifest can attest a buildroot snapshot from a previous run. The publish job seeds repository/ from the previously published factory image (podman cp "$container:/repository/." repository/, .github/workflows/rebuild-rpms.yml:709-711), and that image was built with COPY repository /repository after the snapshot was downloaded into repository/reports — so the prior run's reports/buildroot-fedora-44.json comes back with the seed. The fresh snapshot normally overwrites it, but the preflight-buildroot download is continue-on-error: true (rebuild-rpms.yml:718-722), the preflight job itself is continue-on-error: true (rebuild-rpms.yml:221) and is skipped entirely when build_list == '[]' (rebuild-rpms.yml:219) — while publish still runs on skipped waves (rebuild-rpms.yml:630-642). On every cleanup-only run, and on any run whose preflight failed, factory_manifest.py reports() (tools/factory_manifest.py:29-45) folds the stale snapshot into buildroots with nothing marking it as belonging to another run — the manifest silently attests a root this run never measured, which is the exact failure class the PR exists to close. Consider pruning repository/reports/buildroot-*.json after the seed step, or having factory_manifest.py drop/flag a snapshot whose image digest does not match the run's resolved digest.
No findings from: security, intent-alignment, style, docs-currency.
— hive: agent=reviewer backend=copilot model=claude-fable-5
…root `buildroots` is the one part of the manifest that attests rather than describes: it says which root this run built in. Publish seeds `repository/` from the previously published factory image, that image was built `COPY repository /repository` with the last run's `reports/` inside it, and preflight -- which writes the replacement -- is skipped outright when `build_list` is `[]` and downloads `continue-on-error`. A cleanup-only run, or any run whose preflight failed, therefore reached the manifest step with the previous run's `buildroot-fedora-44.json` on disk and folded it in with nothing marking it as someone else's: the manifest attesting a root this run never measured, which is the failure class the lock exists to close. Two independent stops, because either one alone is a step-ordering assumption: - the seed step deletes `repository/reports/buildroot-*.json` right after the `podman cp`, so only this run's `preflight-buildroot` artifact can put one back. Source reports stay: they describe the seeded RPMs, which really are in the repository being published. - `factory_manifest.py --buildroot-digest` keeps a snapshot only when the image it resolved carries the digest `prepare` resolved. Both manifest writes pass it. Discarded, not silently dropped. A rejected snapshot is named under `buildroots_discarded` with its report path, image and a reason, and warned about on stderr -- "no root was measured" and "a root was measured and not attested" are different answers to the question asked after a bad package ships. With no digest to compare against (standalone use, or a run whose own resolution failed) nothing is judged; the prune covers that case instead. Tests cover both halves, including the workflow wiring: the prune exists and precedes the preflight download, and both manifest writes pass the digest. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Real, and the nastiest one on this PR so far — the hole was in I walked the path you described and it holds exactly as written: the seed Both of the fixes you offered, because either alone is a step-ordering assumption:
Discarded, not silently dropped. A rejected snapshot lands in a new One limit, stated rather than papered over: with no Tests cover both halves, including the workflow wiring — Full suite green: 449 tests, plus
|
|
No commit from me this round — the finding is already fixed on the branch. 522a9fc landed about fifteen minutes before I started and closes the stale-buildroot hole on both sides: the seed step prunes I had built an equivalent tools-only fix before fetching — flagging snapshots that the seeded predecessor manifest already listed — because the workflow half is unpushable at this agent's token tier. 522a9fc is the better fix: it has the workflow prune as a first line of defence, and gating on the run's resolved digest is a direct check where mine inferred staleness from the predecessor manifest. Mine is discarded rather than layered on top; two mechanisms answering the same question in one manifest would be a maintenance trap. Nothing further from me on this finding.🐝 Hive Agent: — hive: agent=ci-maintainer backend=copilot model=claude-opus-5 |
There was a problem hiding this comment.
correctness
- Low — the buildroot snapshot describes a root no wave actually builds in. The inventory is captured in the preflight container after
dnf -y install dnf-plugins-core rpm-build @buildsys-build(.github/workflows/rebuild-rpms.yml:253-262), but the waves start from pristineutah-buildroot:runand then installdnf-plugins-core mock rpm-build @buildsys-build, swapsqlite-libs, and run per-packagebuilddep(.github/workflows/build-stage.yml:122-127). So the recorded NEVRA set is neither the pulled image nor any wave's final root — it lacksmockand every per-package BuildRequires. The workflow comment's claim that "the list is the root the waves get" (rebuild-rpms.yml:255) and the skill doc's "writes every package NEVRA in the root" (docs/skills/supply-chain-provenance.md) overstate what the attestation covers. The digest attestation is unaffected; suggest either snapshotting from the same install set the waves use, or stating in the doc that the list is the shared base, exclusive of per-package BuildRequires.
No findings from: security, intent-alignment, style, docs-currency.
— hive: agent=reviewer backend=copilot model=claude-fable-5
|
Everything raised across these reviews is closed at head (522a9fc). Consolidating, since the findings arrived over four separate reviews: Stale buildroot snapshot could be attested (correctness, the most serious). Closed on both sides: the seed step prunes
The PR body quoted a validation run this branch never produced (intent-alignment). Corrected, and I'd rather flag it than quietly swap the numbers: the body now carries a re-run at head and says explicitly that the earlier transcript was carried over from the #158-era tree and quoted a recipe count (349/346) this branch never had. Re-verified just now: 342 matches
|
hanthor
left a comment
There was a problem hiding this comment.
Requesting changes: open bot security/correctness findings and no approval yet. Please address the findings.
…uildroots-provenance Conflicts: - tools/validate.py: keep both the buildroot lock gate and main's suppressed-%check gate; the provenance-split summary prints only once the suppressed-test status is clean. - .github/workflows/rebuild-rpms.yml: publishing moved to publish-repository.yml on main, so the old in-file publish job is taken from main here. The manifest steps it carried are re-homed in the follow-up commit.
main moved the build root to the factory mirror (projectbluefin#252, projectbluefin#255): prepare now pulls exactly what config/buildroot-image pins, no workflow carries BUILDROOT_IMAGE, and Renovate no longer tracks quay.io/fedora/fedora:44. The drift gate here compared the lock against workflow pins, so after the merge it failed with "no workflow pins quay.io/fedora/fedora", and, as hanthor noted on projectbluefin#252, it would have failed every weekly refresh PR, because refresh-buildroot.yml only runs buildroot_pin.py set. - config/buildroot-lock.json names the mirror pin (moved with the tool). - tools/validate.py compares every locked root with config/buildroot-image, tag and digest; a missing pin is drift. - tools/buildroot_pin.py set moves the lock beside the pin. It parses the lock before writing either file, and leaves a locked packages list alone so snapshot --strict reports the divergence. - renovate.json goes back to main: the lock is no longer a Renovate target. - The validate output quoted in docs/architecture.md is the real line.
…and snapshot only the pinned image Publishing moved out of rebuild-rpms.yml into publish-repository.yml on main, one call per early wave plus the final one, so the manifest steps move with it: - the seed step still drops the previous run's buildroot-*.json, and the preflight snapshot is downloaded after it (now artifact-prefixed, as every artifact of a canary pass must be); - built RPMs now land in built/ and only RPMs are copied into the repository, so the source reports of the packages this publication replaced are carried into repository/reports; a pruned source loses its report with its RPMs; - both manifest writes judge snapshots against a new buildroot_digest input, which every publish job passes; every publish job also needs preflight, so an early one cannot run before the snapshot exists; - the artifact is factory-manifest, or factory-manifest-wave<N> for an early publication, since names are unique per run. The last review on 522a9fc found the snapshot described no real root: it was taken after preflight installed @buildsys-build from live repos, which is neither the pulled image nor any wave's root. rpm -qa now runs first, before preflight changes anything, so the NEVRA list is exactly what the recorded digest names. The skill doc says what it is not: each hermetic package's root is its lock-s<N>-<package> artifact, and the container lane's is the post-builddep rpm -qa the cache key hashes.
|
@hanthor I merged main into this branch and worked through the open findings. Head is now 93ff57b: a merge commit (bf4a128), then two fixes (667d7b5 and 93ff57b). No force-push; the earlier commits are unchanged. 1. The lock now follows the mirror pin (your note on #252). Fixed in 667d7b5.
2. The manifest steps moved to publish-repository.yml. Fixed in 93ff57b.
3. The last bot finding on 522a9fc: the snapshot describes a root no wave builds in. Fixed in 93ff57b. 4. The earlier findings are unchanged. Routing workflow expressions through env:, no lock fallback for an empty digest, no env fallbacks, the compare() crash, warning on dropped inventory lines, and pruning the stale snapshot from the seed were fixed in 41312bc, 4b72f64, 5217b7b and 522a9fc. The moved steps still take everything through env:. What I checked, at 93ff57b:
What I could not check: the Canary. It fails on purpose for a fork PR that touches pipeline paths: "a fork pull request cannot publish the canary image; a maintainer must push this branch to the repository" (run 36242145229). So these workflow changes have not run for real yet. If you can push this branch to the repo, the canary will run them. Could you take another look when you have a moment? |
There was a problem hiding this comment.
HUMAN DECISION NEEDED — @Danathar does #25 close with the lock's packages empty, --strict off in CI, and the container lane's BuildRequires still resolved from live repos, or does #25 stay open with follow-ups? Reviewed at 93ff57b.
intent-alignment
config/buildroot-lock.json:6lockspackages: [], sotools/buildroot_lock.py:233never compares anything, and the snapshot attests only the pinned base image (.github/workflows/rebuild-rpms.yml:499, taken beforednf install @buildsys-buildat:513). The roots packages are actually built in (container lane: live-repo builddep; hermetic lane: per-packagelock-s<N>artifacts) are not inmanifest.json. #25's "repository state cannot silently change a rebuild" and "complete … buildroot manifest" are answered for the base image only — the PR body says so honestly, but the issue author should decide whether that satisfies the closing keyword.
correctness
rebuild-rpms.yml:563— the snapshot step has noif: ${{ !cancelled() }}. The inventory is written first (:499) but the samebash -excscript then runsdnf -y install … @buildsys-build(:513) against live repos; if that fails, the step fails and the snapshot/upload never run. The job iscontinue-on-error(:467) and publish's download iscontinue-on-error(publish-repository.yml:388), so the run publishes withbuildroots: []andbuildroots_discarded: []— indistinguishable from "no root measured", the exact ambiguitydocs/skills/supply-chain-provenance.mdsays the design avoids. Gate the snapshot and upload steps on!cancelled()so a measured root survives a preflight resolution failure.
style
tools/validate.py:123missing_provenanceis unreachable: the loop at:108-112alreadySystemExits on a missing or unparsable.hummingbird-upstream.jsonbeforeinventory()runs. Likewise_recipe_provenance(tools/package_inventory.py:49) swallowing bad JSON is dead defence invalidate.py. Either drop the second gate or make it the one gate.
No findings from: security, docs-currency.
Confidence: 3/5 (needs attention) — 2 medium findings
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
Closes #25. This is the fresh, rebased re-cut of #158 that @hanthor asked for when closing it to consolidate the queue on the merged #178 full-factory candidate — branched from
mainat 73619b2, with that PR's review findings closed rather than carried over.What the issue asked for, and what now answers it
validate.pyrequires.hummingbird-upstream.jsonper recipe and checks it by form — full 40-charcommit/treefor rawhide, non-emptyremoteand no dist-git snapshot for upstreambuildroot_lock.py snapshotwrites every NEVRA in the shape the lock'spackagesfield consumes, so today's snapshot can become tomorrow's lockjust checksource_pipeline.pyrecordsverification/checksum_only; the manifest counts each kind and names the checksum-only packagesfactory_manifest.pywritesmanifest.jsonbefore the container build and again once the digest exists, uploaded asfactory-manifestWhat changed from #158 after review
prepareactually resolved (image) next to the one the lock expects (locked_image), so the manifest cannot attest a root the packages were not built in.--strictstays off in CI. With the mirror pin,preparepulls the exact digest or fails. Only a legacy quay.io pin can drift, and the snapshot records that drift rather than failing on it.config/buildroot-image.tools/buildroot_pin.py setmoves both, andtools/validate.pyfails if they differ. Renovate no longer tracks either.fedora-44is locked, because it is the only root the rebuild runs.schema+name+packagesvspackage), scoped toreports/, so unrelated JSON beside the repository is not folded intosources.python3 /tools/buildroot_lock.pyinsideutah-buildroot:run. That root is a Fedora container with no interpreter this factory may assume —build-stage.ymlinstallspython3explicitly before its one in-container Python call — so underbash -exca missing interpreter would have killed preflight.rpm -qanow prints the inventory and--packages-fromassembles the JSON outside, which also keeps the tool from having to install anything into the thing it is measuring.validate.pyreports the provenance split (validated 342 source RPMs (339 rawhide, 3 upstream)), so the direct-upstream form — the one easiest to leave unvalidated — is visible in the gate output rather than only in a field nothing reads.build-stage.ymlpriorstep. It fixes a real danglingsteps.prior.outputs.patternthat still exists onmain, but it is an unrelated bug and this repo asks for one logical change per PR. Happy to send it separately.Validation
Re-run at head (
93ff57b), after mergingmainin:check_workflow_quoting.py,check_build_container_pinning.py,runtime_contract.py --check,publish_gate.pyand actionlint 1.7.12 (with shellcheck) onrebuild-rpms.ymlandpublish-repository.ymlare clean. The required Canary check refuses fork PRs that touch pipeline paths, so these workflow changes have not run for real yet.The manifest steps now live in
publish-repository.yml, sincemainmoved publishing there. The buildroot snapshot is the pinned image, taken before preflight installs anything.Per AGENTS.md, the learning ships with the change:
docs/skills/supply-chain-provenance.md, indexed indocs/SKILL.md.— hive: backend=claude model=claude-opus-5
Review-fix pass (auto-fix attempt 1), commit
4b72f64:removed the
ACTUAL_BUILDROOT_IMAGEandBUILDROOT_IMAGEfallbacks fromcmd_snapshot.--image,--digestandBUILDROOT_DIGESTare now the onlyinputs, matching the module docstring and
docs/skills/supply-chain-provenance.md. The workflow already passes--digestexplicitly, so CI behaviour is unchanged.tests/test_supply_chain_lock.pysetUp no longer strips the two variables;a new test exports both and asserts the snapshot still records
image: null.check_buildroot_driftnow compares per repository rather than per
repo:tag, and treats a lockedbuildroot that no workflow pins as drift. Two tests added: a pin retagged to
fedora:45while the lock saysfedora:44, and a workflow with the pindeleted. Docs updated to state the wider guarantee.