Skip to content

S5: attestgate Builder; provenance -builder - #36

Merged
aledbf merged 2 commits into
mainfrom
attestgate-builder
Oct 13, 2026
Merged

aledbf merged 2 commits into
mainfrom
attestgate-builder

Conversation

@aledbf

@aledbf aledbf commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

S5's go-tools part. A step in a reusable workflow signs with a certificate naming that workflow (Build Signer URI), not the caller, so pinning it pins the code that built and attested.

attestgate Gate.Builder (a workflow file name):

  • the builder must be on: workflow_call alone;
  • every publishing step not in NotPublished must be inside it: an upload in the caller or any other workflow is a problem;
  • a job that uses: ./.github/workflows/<Builder> must be in a MainOnly workflow and grant id-token: write (a called workflow has at most its caller's permissions);
  • a Builder naming no file fails; inside the builder the usual provenance/SBOM rules still apply.

provenance -builder .github/workflows/<file> (Predicate.BuiltBy): in a called workflow GITHUB_WORKFLOW_REF is still the caller, so the predicate's builder.id would name the dispatched workflow while the certificate names the reusable one. BuiltBy sets the builder to that workflow at the run's ref; externalParameters.workflow stays the dispatched one.

Tests: TestABuilderIsWhereEveryUploadIs, TestABuilderIsTheReusableWorkflowAtTheRunsRef, the command's -builder cases. task lint, task mutate (0 survived).

🤖 Generated with Claude Code

aledbf and others added 2 commits October 13, 2026 14:08
A step in a reusable workflow signs with a certificate that names that workflow,
not its caller. Gate.Builder names it: it must be on: workflow_call alone, every
publishing step must be inside it, and a job that calls it must be in a MainOnly
workflow and grant id-token: write (a called workflow has at most its caller's
permissions). A verifier then pins the builder: the code that built and attested.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
In a called workflow GITHUB_WORKFLOW_REF is still the caller, so the predicate's
builder named the dispatched workflow while the certificate names the reusable
one. Predicate.BuiltBy(path) sets the builder to that workflow of the same
repository at the run's ref; the dispatched one stays the build's workflow.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@aledbf aledbf changed the title attestgate: Builder, the reusable workflow every upload is in S5: attestgate Builder; provenance -builder Oct 13, 2026
@aledbf
aledbf merged commit a38a073 into main Oct 13, 2026
1 check passed
@aledbf
aledbf deleted the attestgate-builder branch October 13, 2026 17:13
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