Repository navigation
ci: generate the PyPI SBOM through OIDC instead of deleted token secrets - #50
Merged
Merged
Conversation
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.
There was a problem hiding this comment.
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.
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.
Problem. #28 moved
sbomify.yamlfrom API tokens to OIDC trusted publishing, and theSBOMIFY_TOKEN/SBOMIFY_STAGE_TOKENsecrets were retired afterwards.pypi.yamlwas not part of #28 and still passesTOKEN: ${{ secrets.SBOMIFY_STAGE_TOKEN }}(TestPyPI job) andTOKEN: ${{ secrets.SBOMIFY_TOKEN }}(PyPI release job). Both now resolve to empty strings. sbomify-action falls back to OIDC whenTOKENis empty, so both "Generate SBOM (PEP 770)" steps already authenticate that way, without the workflow saying so:Authenticating to sbomify via github OIDC (component=rw6sHZjLbrDb)against stage.sbomify.com, and passes;Xt5ZkVk3DSSTagainst app.sbomify.com (audience=sbomify.com), and fails with403 repository not bound to this component.Change. Drop the dead
TOKENlines and setOIDC_AUDIENCEexplicitly, assbomify.yamldoes:stage.sbomify.comfor the TestPyPI job (keeping itsAPI_BASE_URL), andsbomify.comfor the PyPI release job. Both jobs already grantid-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 componentXt5ZkVk3DSST↔sbomify/py-libtea. sbomify matches it on the token'srepository_id1165700113 andrepository_owner_id166506945. 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.
actionlintreports no problems onpypi.yamlandsbomify.yaml. Nosecrets.references remain inpypi.yaml.