Repository navigation
feat: ship the SARIF taxonomy as a verified catalog release asset - #443
Merged
Merged
Conversation
Signed-off-by: chaksaray <chaksaray@gmail.com>
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.
Closes #442.
Ships the SARIF taxonomy as a verified catalog-release asset,
ave-taxonomy.json, built by thecatalog-releaseworkflow from the release's own records, listed inSHA256SUMS, attested with the other data files, and verified byscripts/check_release_assets.pyby regenerating it and demanding a byte match. The first release that carries it is v1.3.0, and v1.3.0 must not be cut before this merges: from v1.3.0 the verifier requires the file, so a workflow that does not build it fails its own verification.What changed
catalog-release.yml): after the records and manifest,python3 scripts/build_taxonomy.py --records release/ave-records.json --release "v$VERSION" --release-date <the manifest's generated_at date> --download-uri <the asset's own URL> --out release/ave-taxonomy.json;SHA256SUMScovers three files; the verifier gets--repo "$GITHUB_REPOSITORY"; the attestation and the release upload include the taxonomy. It never runs the workflow, creates a tag or a release.check_release_assets.py):check_taxonomyregenerates the taxonomy fromave-records.jsonand compares bytes; when it differs it names the header field, then the taxon, that differs, before the generic "same content, different bytes" message.TAXONOMY_FROM = (1, 3, 0): from that tag a missing file is an error andSHA256SUMSmust list it; v1.0.0 to v1.2.0 verify without it (and are checked like any other if they have one). New--repo owner/name(defaultaveproject/ave): the taxonomy'sdownloadUrimust point at the repository it is published under. Standard library only.v1.2.9instead ofv9.9.9: they test "a tag missing from the repository" and used a tag at or above v1.3.0, where the taxonomy is now (correctly) required.dist/ave-taxonomy-latest.jsonis the moving one), the implementer guide, CHANGELOG.Checked
python -m pytest tests -q: 1041 passed, 1 skipped. 70 in the three release files (33 existing verifier tests, 30 new intests/test_release_taxonomy.py, 7 intests/test_catalog_release_workflow.py).run:blocks, extracted and executed forVERSION=1.3.0(npm ci, then the node build,jq -r '.generated_at[:10]', the taxonomy generation,sha256sum, and the verifier): exit 0,AVE v1.3.0: 89 records on schema 1.3.0, checksums match, source_commit 0753b2d... (checked against the given commit). ave-taxonomy.json regenerated from the records and matches (89 taxa).The taxonomy came out stamped1.3.0, dated 2026-11-04, withhttps://github.com/aveproject/ave/releases/download/v1.3.0/ave-taxonomy.json, andsha256sum -c SHA256SUMSwas OK for all three files.SHA256SUMSrefreshed so only the content was wrong, each exit 1:ave-taxonomy.json taxon AVE-2026-00004 is not what ave-records.json producesave-taxonomy.jsondeleted:SHA256SUMS does not list ave-taxonomy.jsonandave-taxonomy.json is missing (releases from v1.3.0 carry it)downloadUriset tohttps://example.org/x.json:ave-taxonomy.json downloadUri is 'https://example.org/x.json', expected 'https://github.com/aveproject/ave/releases/download/v1.3.0/ave-taxonomy.json'sha256updated without regenerating the taxonomy:ave-taxonomy.json taxon AVE-2026-00046 is not what ave-records.json produces--repo, attestation, upload, and an input interpolated into a command), run withPYTHONDONTWRITEBYTECODE=1; both edited files were restored byte for byte.validate_records.py,build_taxonomy.py --checkandcheck_terms_sync.pypass.records/,schema/anddist/are untouched. No em dashes added.Not run
gh attestation verifyon the taxonomy asset. Run that once on the v1.3.0 draft before anyone is told the taxonomy is attested.from __future__ import annotations, but I ran 3.12 only.jq1.7 was already on the machine (not 1.7.1); the runner'spythoncommand is not on this machine, so the dry run put an alias topython3on the PATH and left the workflow's text as it is.After merge (maintainer)
When v1.3.0 is cut: run Actions > catalog-release with
draft=true; check the draft has the four files (records, manifest, taxonomy,SHA256SUMS); then from a clean directory runsha256sum -c SHA256SUMS,python scripts/check_release_assets.py . --tag v1.3.0 --repo aveproject/ave, andgh attestation verify ave-taxonomy.json --repo aveproject/ave.