All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Support for CircleCI attestations (#166). This is work aligned with adding CircleCI as a Trusted Publisher in pypi. (#19349)
- Support for verifying Google Cloud attestations has been added to the CLI.
- The minimum Python version required is now
3.10
- Upgraded
sigstoredependency to>=4.0.0. Since version4.0.0,sigstoresupports signing using the new Rekor v2 instance, which will become the default in the future. We force the version to 1, so any attestations created withpypi-attestations==0.0.28will still contain Rekor v1 entries. - Repository has been moved to the
pypiGitHub org. The new URL is https://github.com/pypi/pypi-attestations.
- Verification now compares the distribution filenames of artifacts and attestations by parsing them first and comparing its components (i.e. normalized name, version, tags) instead of doing a filename string comparison. This fixes an issue where verification would fail due to the artifact filename having the wheel tags in a different order than the ones in the attestation. (#127)
- This library no longer enforces distribution name "ultranormalization," which went above the requirements specified in PEP 740 (#124)
- Make the
GooglePublishertype and APIs public (#117)
- The
GooglePublishertype has been added to support Google Cloud-based Trusted Publishers (#114)
- The CLI has a new subcommand
convert, which takes a Sigstore bundle and converts it to a PEP 740 attestation.
- The
Attestation.verify(...)API has been changed to accept anofflineparameter that, when True, disables TUF refreshes. - The CLI
verifycommands now also accept an--offlineflag that disables TUF refreshes. Additionally, when used with theverify pypisubcommand, the--offlineflag enforces that the distribution and provenance file arguments must be local file paths.
- Fixed a bug where
GitHubPublisherpolicy verification would fail if theSource Repository ReforSource Repository Digestclaim was missing from the attestation's certificate. We require at least one of the two claims, but not necessarily both (#109)
- The
inspectsubcommand now ignores inputs that don't match*.attestation, rather than failing on them (#93)
- The CLI subcommand
verify attestationnow supports.slsa.attestationfiles. When verifying an artifact, both.publish.attestationand.slsa.attestationfiles are used (if present). - The CLI subcommand
verify pypinow supports a friendlier syntax to specify the artifact to verify. The artifact can now be specified with apypi:prefix followed by the filename, e.g:pypi:sampleproject-1.0.0.tar.gz. The old way (passing the direct URL) is still supported. - The CLI subcommand
verify pypinow supports passing the local paths to the artifact and its provenance file, allowing the user to verify files already downloaded from PyPI. The artifact path is passed as usual, whereas the provenance file path is passed using the--provenance-fileoption.
- The CLI entrypoint is now
pypi-attestations(#82) - The CLI
verifysubcommand has been changed toverify attestation, as inpypi-attestations verify attestation --identity ...(#82)
- The CLI has a new subcommand
verify pypi, which takes a URL to a PyPI distribution (either a wheel or a source distribution) and a GitHub/GitLab repository. The command verifies the distribution by downloading it and its provenance from PyPI, verifying them usingsigstoreand checking that the repository matches the one in the PyPI provenance file. (#82)
- Explicitly support sigstore-python 3.6 (#79)
This is a corrective release for 0.0.18.
- The
Attestationtype now has acertificate_claimsproperty to expose underlying Fulcio signing certificate extensions (#70)
- The
GitLabPublisherpolicy now takes the workflow file path in order to verify attestations, rathen than assuming it will always begitlab-ci.yml(#71). - The
GitLabPublisherno longer expects claims being passed during construction, rather therefandshaclaims are extracted from the certificate's extensions, similar toGitHubPublisher's behavior (#71).
- Publisher classes (
GitLabPublisherandGitHubPublisher) no longer take a claims dictionary during construction (#72).
Attestation.statementhas been added as a convenience API for accessing the attestation's enveloped statement as a dictionary
This is a corrective release for 0.0.14.
- The
DistributionAPI now handles ZIP source distributions (those ending with.zip) instead of rejecting them as invalid (#68)
-
The minimum Python version required has been brought back to
3.9(#64). -
The
Attestation.verify(...)API has been changed to remove theVerifierargument in favor of an optionalstaging: boolkwarg to select the Sigstore instance (#62) -
The
Attestation.verify(...)API has been changed to accept bothPublisherandVerificationPolicyobjects as a policy. The publisher object is internally converted to an appropriate verification policy.
-
python -m pypi_attestations verifynow handles inputs likedist/*gracefully, by pre-filtering any attestation paths from the inputs. -
python -m pypi_attestations verifynow exits with a non-zero exit code if the verification step fails (#57)
- Base64-encoded bytes inside Attestation objects contained newline characters every 76 characters due to a bug in Pydantic's Base64Bytes type. Those newlines were also (incorrectly) ignored by Pydantic during decoding (#48).
- The minimum version of sigstore-python is now
3.2.0, owing to private API changes (#45)
- The minimum Python version required has been bumped to
3.11(#37)
- The
Provenance,Publisher,GitHubPublisher,GitLabPublisher, andAttestationBundletypes have been added (#36).
- The
Distributiontype and APIs have been added, allowing a user to supply a pre-computed digest instead of performing I/O (#34)
signandverifyno longer perform I/O (#34)
verify: catch another leaky error case (#32)
AttestationTypeis now re-exported at the top-level as a public API (#31)
AttestationTypehas been added, as an enumeration of all currently known attestation types (by URL) (#29)
Attestation.verifynow checks the attestation's type againstAttestationTypebefore returning it (#29)
Attestation.signnow only returnsAttestationErrorwhen failing to sign a distribution file (#28)
- The
python -m pypi_attestationsCLI has been added. This CLI is primarily intended for local development, and not for external use. Its flags and commands are not subject to stabilization unless explicitly documented in a future release (#22)
-
The name of this project is now
pypi-attestations, renamed frompypi-attestion-models(#25) -
The model conversion functions have been moved into the
Attestationclass (#24)
0.0.5 - 2024-06-20
Attestation.verifynow returns the inner statement's predicate components (#20)
0.0.4 - 2024-06-11
- Switch to in-toto statements (#18)
0.0.3 - 2024-06-10
- No functional changes.
0.0.2 - 2024-05-16
- Update
sigstoreto 3.0.0
0.0.1 - 2024-05-15
- Initial implementation