Skip to content

Docs: Document how to verify release artefacts #115

Closed

Description

Context

build-test-release.yaml and build-test-release-multiarch.yaml default attestations and sigstore_sign to true. Both call lfreleng-actions/python-build-action (v2.1.0), which runs actions/attest v4.2.2 and sigstore/gh-action-sigstore-python v3.5.0 inside the reusable workflow's python-build job. attach-artefacts then attaches each wheel and sdist to the GitHub release, together with its .sigstore.json bundle.

The README never says how a consumer verifies either. That leaves people with the obvious command, which fails for every release: the same trap go-workflows#98 and node-workflows#149 found in their documented commands.

Findings

The action runs inside the reusable workflow, so Fulcio names python-workflows' workflow file, at the ref the caller pinned, as the signer. The calling project and tag appear only in the GitHub OIDC extensions.

Observed on a real release, lfreleng-actions/github-network-audit v0.2.3 (caller pins build-test-release.yaml@2b32636…, python-workflows v0.5.0), from github_network_audit-0.2.3-py3-none-any.whl.sigstore.json (bundle v0.3):

OID (1.3.6.1.4.1.57264.) Field Value
SAN Identity https://github.com/lfreleng-actions/python-workflows/.github/workflows/build-test-release.yaml@2b326364c9dfffe1b6c8fddab5b517d8c92e5f5c
1.2 / 1.20 Workflow Trigger / Build Trigger push
1.5 Workflow Repository lfreleng-actions/github-network-audit
1.6 / 1.14 Workflow Ref / Source Repository Ref refs/tags/v0.2.3
1.9 Build Signer URI …/python-workflows/.github/workflows/build-test-release.yaml@2b32636…
1.18 Build Config URI https://github.com/lfreleng-actions/github-network-audit/.github/workflows/build-test-release.yaml@refs/tags/v0.2.3

Results (cosign v3.1.3, gh v2.102.0)

Command Result
gh attestation verify <whl> --repo <owner>/<repo> ❌ verifying with issuer "sigstore.dev"
+ --signer-workflow lfreleng-actions/python-workflows/.github/workflows/build-test-release.yaml --source-ref refs/tags/v0.2.3 ✅ Verification succeeded!
--source-ref refs/tags/v0.2.2 ❌ expected SourceRepositoryRef …
--source-ref refs/tags/V0.2.3 (wrong case) ❌ expected SourceRepositoryRef …
--repo of another repository ❌ no attestation found
--signer-workflow …/build-test-release-multiarch.yaml ❌ rejected
--signer-workflow prefix only (…/build-test-release, …/build-test) ❌ rejected
--signer-digest 2b32636… / all-zero SHA ✅ / ❌ expected BuildSignerDigest …
cosign, SAN regexp ending @refs/tags/v0.2.3 ❌ expected SAN value to match regex … got …@2b32636…
cosign, anchored SAN regexp + issuer + --certificate-github-workflow-repository / -ref / -trigger push, wheel and sdist ✅ Verified OK
same, wrong repository / wrong ref ❌ rejected
same, SAN regexp for build-test-release-multiarch.yaml ❌ rejected
same, tampered wheel ❌ invalid signature

The gh command passes for both the wheel and the sdist. The
wrong-case and prefix-only rows exercise the two fixes in gh v2.102.0
(GHSA-4mq3-hpgx-9cx8, GHSA-wjmr-j3rp-mh2g), the reason the section
should require that version.

cosign v3 reads the sigstore-python bundles directly, so consumers need no separate sigstore CLI.

Proposal

Add a "Verifying Release Artefacts" section to the README, matching the go-workflows and node-workflows sections (lfreleng-actions/go-workflows#99, lfreleng-actions/node-workflows#158):

gh attestation verify <dist-file> --repo <owner>/<repo> \
  --signer-workflow lfreleng-actions/python-workflows/.github/workflows/build-test-release.yaml \
  --source-ref refs/tags/<tag>

cosign verify-blob \
  --bundle <dist-file>.sigstore.json \
  --certificate-identity-regexp '^https://github\.com/lfreleng-actions/python-workflows/\.github/workflows/build-test-release\.yaml@' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  --certificate-github-workflow-repository <owner>/<repo> \
  --certificate-github-workflow-ref refs/tags/<tag> \
  --certificate-github-workflow-trigger push \
  <dist-file>

The section should also:

  • Name build-test-release-multiarch.yaml in both commands for multiarch callers. Each workflow's signature fails verification against the other's name, so this is not optional.
  • Require GitHub CLI v2.102.0 or later (GHSA-wjmr-j3rp-mh2g, GHSA-4mq3-hpgx-9cx8) and cosign v3 or later.
  • Explain optional revision pinning (--signer-digest <sha>; cosign --certificate-identity with the full …@<sha> SAN).
  • Say that the Workflow Repository and Ref extensions describe the calling run. They identify the packaged source only when the caller leaves the repository/ref inputs empty.
  • Keep this separate from the PEP 740 attestations PyPI holds. The caller's own publish job makes those, so they name the caller's workflow, not python-workflows.

Acceptance criteria

  • The documented commands verify a real python-workflows release artefact (wheel and sdist) for both release workflows, and reject one from another repository, tag or workflow file.

Out of scope

python-build-action's own README needs no change. Called directly from a project's own workflow, the signer is that workflow and --repo alone works.

Activity

  1. added
    documentation
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions