Skip to content

ci: generate the PyPI SBOM through OIDC instead of deleted token secrets - #50

Merged
aurangzaib048 merged 1 commit into
sbomify:masterfrom
aurangzaib048:ci/pypi-sbom-oidc
Nov 23, 2026
Merged

aurangzaib048 merged 1 commit into
sbomify:masterfrom
aurangzaib048:ci/pypi-sbom-oidc

Conversation

@aurangzaib048

Copy link
Copy Markdown
Collaborator

Problem. #28 moved sbomify.yaml from API tokens to OIDC trusted publishing, and the SBOMIFY_TOKEN / SBOMIFY_STAGE_TOKEN secrets were retired afterwards. pypi.yaml was not part of #28 and still passes TOKEN: ${{ secrets.SBOMIFY_STAGE_TOKEN }} (TestPyPI job) and TOKEN: ${{ secrets.SBOMIFY_TOKEN }} (PyPI release job). Both now resolve to empty strings. sbomify-action falls back to OIDC when TOKEN is empty, so both "Generate SBOM (PEP 770)" steps already authenticate that way, without the workflow saying so:

  • the TestPyPI job on master logs Authenticating to sbomify via github OIDC (component=rw6sHZjLbrDb) against stage.sbomify.com, and passes;
  • the v26.11.3 PyPI release job logs the same for Xt5ZkVk3DSST against app.sbomify.com (audience=sbomify.com), and fails with 403 repository not bound to this component.

Change. Drop the dead TOKEN lines and set OIDC_AUDIENCE explicitly, as sbomify.yaml does: stage.sbomify.com for the TestPyPI job (keeping its API_BASE_URL), and sbomify.com for the PyPI release job. Both jobs already grant id-token: write. The audiences are the ones the jobs use today, so authentication does not change. The file just stops referencing secrets that no longer exist.

Still needed for releases. The PyPI release job (and the tag-push SBOM upload in sbomify.yaml) needs a Trusted Publishing binding on app.sbomify.com for component Xt5ZkVk3DSST ↔ sbomify/py-libtea. sbomify matches it on the token's repository_id 1165700113 and repository_owner_id 166506945. Until that exists, the SBOM step stops the publish before tests, build or upload. This PR doesn't affect re-runs of the v26.11.3 release, which use the workflow at that tag.

Checked. actionlint reports no problems on pypi.yaml and sbomify.yaml. No secrets. references remain in pypi.yaml.

PR sbomify#28 moved sbomify.yaml from API tokens to OIDC trusted publishing, and
the token secrets were retired afterwards. pypi.yaml still passed
TOKEN: secrets.SBOMIFY_STAGE_TOKEN and secrets.SBOMIFY_TOKEN, which now
resolve to empty strings. sbomify-action falls back to OIDC when TOKEN is
empty, so both SBOM steps already authenticate that way. The TestPyPI job
logs "Authenticating to sbomify via github OIDC" against stage.sbomify.com.

Drop the dead TOKEN lines and set OIDC_AUDIENCE explicitly, as sbomify.yaml
does: stage.sbomify.com for the TestPyPI job (with its existing
API_BASE_URL) and sbomify.com for the PyPI release job. Both jobs already
grant id-token: write. The audiences match what the jobs use today, so
authentication does not change; the workflow now states it.
Copilot AI balanced review requested due to automatic review settings November 23, 2026 13:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@aurangzaib048
aurangzaib048 merged commit 3441862 into sbomify:master Nov 23, 2026
6 checks passed
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.

2 participants