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

Add claims to Attestation #70

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

Add claims to Attestation #70

wants to merge 9 commits into from

Conversation

DarkaMaul
Copy link
Collaborator

Some important points :

  • I've added a more recent attestation (the one from the latest version of this package because earlier artifact were missing newer Fulcio extensions)
  • I've used the same logic as sigstore-python to decode the value, but this create an implicit transitive dependency on pyasn1. This should probably be added to this package requirements list or modify sigstore-python to expose this information directly.

# Conflicts:
#	CHANGELOG.md
#	src/pypi_attestations/_impl.py
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Comment on lines +208 to +212
identifier = int(extension.oid.dotted_string.rsplit(".", 1)[1])
if (
extension.oid.dotted_string.startswith(fulcio_oid.dotted_string)
and 8 <= identifier <= 22
):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rathen than dynamically building the list of extension OIDs from .8 to .22 every time claims() is called, I wonder if we should have a constant SUPPORTED_FULCIO_OIDS: list[x509.ObjectIdentifier] which lists them all. WDYT?

src/pypi_attestations/_impl.py Outdated Show resolved Hide resolved
src/pypi_attestations/_impl.py Outdated Show resolved Hide resolved
src/pypi_attestations/_impl.py Outdated Show resolved Hide resolved
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.

3 participants