Skip to content

Commit 708a729

Browse files
authored
PEP 740: initial feedback (#3637)
Signed-off-by: William Woodruff <[email protected]>
1 parent 9c7c5e0 commit 708a729

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

peps/pep-0740.rst

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ it make a policy recommendation around mandatory digital attestations on
3333
release uploads or their subsequent verification by installing clients like
3434
``pip``.
3535

36-
Rationale
37-
=========
36+
Rationale and Motivation
37+
========================
3838

3939
Desire for digital signatures on Python packages has been repeatedly
4040
expressed by both package maintainers and downstream users:
@@ -49,6 +49,40 @@ expressed by both package maintainers and downstream users:
4949

5050
This proposal seeks to accommodate each of the above use cases.
5151

52+
Additionally, this proposal identifies the following motivations:
53+
54+
* Verifiable provenance for Python package distributions: many Python
55+
packages currently contain *unauthenticated* provenance metadata, such
56+
as URLs for source hosts. A cryptographic attestation format could enable
57+
strong *authenticated* links between these packages and their source hosts,
58+
allowing both the index and downstream users to cryptographically verify that
59+
a package originates from its claimed source repository.
60+
* Raising attacker requirements: an attacker who seeks to take
61+
over a Python package can be described along *sophistication*
62+
(unsophisticated to sophisticated) and *targeting* dimensions
63+
(opportunistic to targeted).
64+
65+
Digital attestations impose additional sophistication requirements: the
66+
attacker must be sufficiently sophisticated to access private signing material
67+
(or signing identities). They also impose additional targeting requirements:
68+
the release consistency requirement (mentioned below) means that the attacker
69+
cannot upload *any* attestation, but only one of a type already seen for a
70+
particular release. In the future, this could be further "ratcheted" down
71+
by allowing project maintainers to disable releases without attestations
72+
entirely.
73+
* Release consistency: in the status quo, the only attestation provided by the
74+
index is an optional PGP signature per release file
75+
(see :ref:`PGP signatures <pgp-signatures>`). These signatures are not
76+
checked by the index either for well-formedness or for validity, since
77+
the index has no mechanism for identifying the right public key for the
78+
signature.
79+
80+
Additionally, the index does not have an "all or none" requirement
81+
for PGP signatures, meaning that there is no consistency requirement
82+
between distributions within a release (and that maintainers may
83+
accidentally forget to upload signatures when adding additional
84+
release distributions).
85+
5286
While this PEP does not recommend a specific digital attestation format,
5387
it does recognize the utility of Trusted Publishing as a pre-existing,
5488
"zero-configuration" source of strong provenance for Python packages.
@@ -109,6 +143,8 @@ areas of Python packaging:
109143
Previous Work
110144
-------------
111145

146+
.. _pgp-signatures:
147+
112148
PGP signatures
113149
^^^^^^^^^^^^^^
114150

@@ -260,6 +296,10 @@ JSON-based Simple API
260296
``provenance`` object in the ``file`` dictionary for that file.
261297
* ``provenance``, when present, **MUST** be a :ref:`provenance object <provenance-object>`.
262298

299+
These changes require a version change to the JSON API:
300+
301+
* The ``api-version`` must specify version 1.2 or later.
302+
263303
Security Implications
264304
=====================
265305

0 commit comments

Comments
 (0)