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.
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
PEP 763: Limiting deletions on PyPI #4080
PEP 763: Limiting deletions on PyPI #4080
Changes from 20 commits
6176ded
7db6359
ba5490a
27ab348
15db84b
4190787
54af5b7
a817cbb
1b1b646
ebb5456
600fa37
df34ddf
e994629
f2e3f21
9f3a2d2
0f72405
5bed2ce
689bfa5
ecccdc0
f7a9e74
2272ebb
afbc32d
1ebea39
46e6b23
5e28051
79115ed
a85925c
aad73dd
d451f3f
962c6f4
449a9d9
d7204a7
ed4733a
250c9c3
a800aaa
1f3dbcc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as https://github.com/python/peps/pull/4080/files#r1817037637 -- I like this rephrasing but I don't know whether it's kosher to rewrite a direct quote 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given above we discuss security implications of permitting deletions, I would expect that the security implications are this PEP makes things better (but also see my comment above).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A possible negative implication is that it may be harder to stop users from downloading a file that has security issues, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Yeah, I need to qualify this: the positive implication above was that external users of the index (e.g. companies) benefit from limiting deletion because it makes post-compromise triage and remediation simpler, since the attacker can't remove their trail as easily. I wasn't sure whether to put that under this section though, since it's an indirect/fuzzy security implication, but I'll work it in for further discussion.
@JelleZijlstra Could you elaborate a bit on what you're thinking here? This PEP doesn't stipulate any changes to PyPI admins' abilities to delete things, so the existing malware reporting and quarantining flows remain in place. So from my perspective this doesn't make it any harder to halt downloads of malicious packages.
OTOH, maybe you're thinking of packages that aren't malicious but just have security issues? For those I think the pre-existing "yank" mechanism is good enough (and is what people already use in practice), but I could add in some qualifications there if you think the PEP would benefit from it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, if a package maintainer discovers that there is malware in a package they released, they can delete the package. With this PEP's proposal, they'd have to instead wait for PyPI admins to get to it, which may take longer.
Example scenario: I am a maintainer of https://pypi.org/project/black/. I discover (e.g., through private disclosure) that one of the compiled wheels of the latest release contains malicious code due to a backdoor in cibuildwheel/GH Actions/mypyc (pretty outlandish scenarios, but bear with me). Right now, the first thing I would do is go to PyPI and delete the malicious wheel. With this PEP's proposal, I'd have to figure out the right channels to raise the issue to the PyPI admins, and possibly wait for some time.
This is not a common scenario and your answer could well be that the tradeoff is worth it, but it doesn't seem impossible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, thanks for elaborating! That's an interesting case -- I can see the argument that it represents a slightly worse security posture, since there's now a middleman (PyPI's admins) for malware response.
I think my position is that it's "worth it," especially now that PyPI has a dedicated malware reporting flow (see screencap) as well as project "quarantine" support for temporarily suspending a project's downloads without actually deleting it. But I'll make sure to include that in a revision to fairly characterize this PEP's changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that position makes sense to me!