Repository navigation
docs/reuse-audit: record the shipped DSH version and gate the recipe against the pin - #3494
Merged
Merged
Conversation
…against the pin `shipped-pins.json` still named DSH 0.2.2-rc.1 as the image version while `runtime/ds-bot-upstream.pin.json` pins 0.2.2-rc.5 and the recipe installs exactly that. The inventory in that record was built from the rc.1 tarball (20 files, 76,416 bytes unpacked); the shipped rc.5 tarball is 536 files, 6,230,712 bytes unpacked and was never read file by file. - image_recipe.dsh -> 0.2.2-rc.5, plus dsh_audit_snapshot 0.2.2-rc.1 - audit_status block in the rc.1 record: audited_version, shipped_version, shipped_version_audited false, rc.5 tarball integrity/shasum/size, and a blocker that forbids reading the inventory as an audit of what ships - verify-reuse-audit-pins.py: image_recipe.dsh must equal the pin, the snapshot must name the audited npm version, and the record must not claim the shipped version was audited - tests/test_shipped_licenses.py: same invariants Refs #3493
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
docs/reuse-audit/shipped-pins.jsonrecordedimage_recipe.dshas0.2.2-rc.1whileruntime/ds-bot-upstream.pin.jsonpins0.2.2-rc.5and the recipe installs exactly that (theDSH_VERSIONbuild-arg). Nothing compared the two, so the delivery record and the shipped artifact could disagree silently.This slice makes the record say what ships and makes the disagreement a check failure:
image_recipe.dshbecomes0.2.2-rc.5, with a siblingdsh_audit_snapshot: 0.2.2-rc.1.audit_statusblock inside thedsh_0_2_2_rc_1record carriesaudited_version(rc.1),shipped_version(rc.5),shipped_version_audited: false, the rc.5 npm tarball integrity/shasum/file counts, and a blocker sentence: the inventory covers rc.1 (20 files, 76,416 bytes unpacked), the shipped rc.5 tarball is 536 files / 6,230,712 bytes unpacked and was not read file by file, so the inventory must not be read as an audit of what ships and no redistributable image may be published on it.scripts/verify-reuse-audit-pins.pynow requiresimage_recipe.dshto equal the pin, the snapshot to name the audited npm version,shipped_versionto equal the pin, andshipped_version_auditedto be exactlyfalse.tests/test_shipped_licenses.pyasserts the same invariants.No licence text changes, no dependency changes, no version claims beyond what the pin and the registry say.
Why the gate is needed
verify-reuse-audit-pins.pyonly read thedsh_0_2_2_rc_1record (npm integrity, git tag, libreoffice kit);tests/test_shipped_licenses.pyasserted phrases inside that record. Neither looked atimage_recipe. The merged#3491changed the image's DSH version and did not touch this record, which is exactly the drift that stayed invisible.Evidence (local, on this host, not CI)
Replayed on a clean
1f62d02b1df63ca8bd5215c7469c39223f4d7406tarball; base tree rebuilt as74859f440f2584fde3954984e466eb4584ea7df0, which is the tree GitHub reports for that commit. Patch applies withgit apply --checkrc 0 andwrite-treegivesc6a01ad43494362edca297e5f1ba3f6097835171; the branch commitede26cd4229557b4e48d54fbf435f894da1548fdhas that tree.python3 scripts/verify-reuse-audit-pins.py-> rc 0, 29OKlines, includingOK image recipe DSH 0.2.2-rc.5 matches the pin; audited snapshot 0.2.2-rc.1 records the shipped version as unaudited.image_recipe.dshback to0.2.2-rc.1->FAIL: image_recipe.dsh '0.2.2-rc.1' != pin dsh '0.2.2-rc.5', rc 1.python3 -m unittest tests.test_shipped_licenses-> 5 tests OK.unittest discoverandnode --test --test-concurrency=2 tests/*.test.mjs.This is a local reading only; CI results are separate and are not claimed here.
Scope
Docs, one verification script and one test file. One reviewable slice; no product behaviour changes.
Refs #3493