Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check OIDC issuer claim when verifying uploaded PEP740 attestations #16860

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

facutuesca
Copy link
Contributor

This PR adds a check to the PEP-740 attestations uploaded via Trusted Publishing, to make sure that the OIDC issuer in the certificate matches the OIDC issuer used for Trusted Publishing. Since we currently only support uploading attestations via GitHub Actions, that's the only provider we need to modify.

There are two commits, the first one moves the *_OIDC_ISSUER_URL constants from oidc/utils.py to their corresponding model file (oidc/models/{github,gitlab,etc}.py), in order to be able to use them inside the models (otherwise it's a circular import).

The second commit adds the check discussed in the first paragraph.

cc @woodruffw @di

@facutuesca facutuesca requested a review from a team as a code owner October 9, 2024 17:41
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