Skip to content

test(validate-submission): accept a real build-module attestation from main - #59

Merged
afonsojramos merged 1 commit into
mainfrom
test/attestation-accept-fixture
Oct 9, 2026
Merged

afonsojramos merged 1 commit into
mainfrom
test/attestation-accept-fixture

Conversation

@afonsojramos

@afonsojramos afonsojramos commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds the accept-path test for attestation verification, using a real attestation: spicetify/actions build-module building its fixture module on main (run 37997562109). provenanceFrom must verify it and report the source commit, ref, and run. The existing fixtures already cover refusals (a pull request ref of the builder, and a different signing workflow).

Validation

  • node --test scripts/validate-submission.test.mts: 32 passed.
  • pnpm fmt:check and pnpm check pass.
  • verifyWithGh was run against the real zip from that run and returned the same provenance (spicetify/actions@91b890c).

Summary by CodeRabbit

  • Tests
    • Added validation coverage for build provenance attestations, including checks that a recorded artifact digest and repository match and that the associated commit, source reference, and workflow run are returned correctly.

@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4e0cc2a7-b630-409d-ae33-f8aa55a31429

📥 Commits

Reviewing files that changed from the base of the PR and between 4d034f2 and 8647b5f.


📒 Files selected for processing (2)
  • scripts/fixtures/attestation-build-module-main.json
  • scripts/validate-submission.test.mts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.



Walkthrough

The change adds a SLSA provenance attestation fixture for a build-module ZIP. A test checks that provenanceFrom accepts the fixture and returns the expected commit, branch ref, and Actions run URL.

Changes

Build-module provenance validation

Layer / File(s) Summary
Fixture-backed provenance validation
scripts/fixtures/attestation-build-module-main.json, scripts/validate-submission.test.mts
The fixture records a build-module ZIP digest and SLSA provenance metadata. The test checks the matching digest and repository, then verifies the returned commit, refs/heads/main ref, and Actions run URL.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 8647b

This adds regression coverage for a main-branch build attestation without changing runtime validation behavior. No actionable merge-blocking risk is apparent.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: adding a validation test that accepts a real build-module attestation from the main branch.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.


✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the build’s small trail,
And finds the commit, ref, and run.
The ZIP’s attestation joins the test,
Its recorded digest matches the one.
Then off I hop beneath the moon.

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

This run reviewed the full PR: a test-only addition of the main-ref accept path for provenanceFrom, backed by a real build-module attestation fixture.

  • New fixture scripts/fixtures/attestation-build-module-main.json — a real gh attestation verify --format json result signed by spicetify/actions/.github/workflows/build-module.yml@refs/heads/main, source commit 91b890c761e773236bed6cb3ab78da223b83e523, digest sha256:6889aebe…aa21, run 37997562109.
  • New test scripts/validate-submission.test.mts:91 — asserts provenanceFrom(released, releasedZip, "spicetify/actions") returns a provenance carrying the expected commit, ref, and run, complementing the existing refusal fixtures (PR-ref builder, foreign signer).

The fixture digest matches the test's releasedZip, and every field lines up with the checks in provenanceFrom (source repository, buildSignerURI prefix plus refs/heads/main, github-hosted runner, 40-hex commit). Verified locally: node --test scripts/validate-submission.test.mts → 32 pass, pnpm fmt:check clean. The tsc errors in modules/stdlib/src/registers/* are pre-existing and untouched by this diff.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@afonsojramos
afonsojramos merged commit dd26c78 into main Oct 9, 2026
7 checks passed
@afonsojramos
afonsojramos deleted the test/attestation-accept-fixture branch October 9, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant