Skip to content

feat: add callout to discourage security research#19855

Open
miketheman wants to merge 2 commits into
pypi:mainfrom
miketheman:miketheman/assert-not-doing-research
Open

feat: add callout to discourage security research#19855
miketheman wants to merge 2 commits into
pypi:mainfrom
miketheman:miketheman/assert-not-doing-research

Conversation

@miketheman
Copy link
Copy Markdown
Member

Signed-off-by: Mike Fiedler miketheman@gmail.com

@miketheman miketheman added the HTML requires change to HTML files label Apr 13, 2026
@miketheman
Copy link
Copy Markdown
Member Author

What it looks like:

image

@miketheman miketheman marked this pull request as ready for review April 13, 2026 20:55
@miketheman miketheman requested a review from a team as a code owner April 13, 2026 20:55
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@miketheman miketheman force-pushed the miketheman/assert-not-doing-research branch from 0c63d40 to 20e7e7b Compare April 13, 2026 21:05
@nlhkabu
Copy link
Copy Markdown
Contributor

nlhkabu commented Apr 13, 2026

@miketheman - wondering what this looks like as part of the overall registration flow?
My concern is for the 99.9% of users who are not abusing PyPI being hit in the face with this :)

Could we instead introduce a registration field that asks the user why they are setting up their account?

Something like:
Label: "Account purpose"
Checkboxes: "Upload packages for distribution to others", "Security research", "Other", etc. (we would need to come up with a good list here)

Then if the user selects "Security research" then we hit them with this?

@kam193
Copy link
Copy Markdown

kam193 commented Apr 14, 2026

This is a good point. However, I was thinking that we have forgotten about two popular abuses that are not limited to the security research:

  • obfuscation
  • using PyPI as large file storage (yeah... Uploading 100s of ebooks or splitting and uploading 10s of files to host a LLM model is a thing)

I think that an alternative to selective displaying the message could be adding a point about them, and maybe going from red to yellow frame wit black text, to indicate it's a preventive warning instead of hit in a face? 😅

@miketheman
Copy link
Copy Markdown
Member Author

@miketheman - wondering what this looks like as part of the overall registration flow? My concern is for the 99.9% of users who are not abusing PyPI being hit in the face with this :)

Could we instead introduce a registration field that asks the user why they are setting up their account?

Something like: Label: "Account purpose" Checkboxes: "Upload packages for distribution to others", "Security research", "Other", etc. (we would need to come up with a good list here)

Then if the user selects "Security research" then we hit them with this?

I intended to place this right above the "submit" button at the bottom of the registration page to make it very apparent.

On the adding a selection box, maybe? In my emails with some folks, they don't consider what they are doing to be "Security research" - so maybe that's part of it. I often get a "but it's authorized by Company A!" - which doesn't matter here. They may also state "it's not research, it's actually a supply chain attack simulation" 😮‍💨 So I'm dubious that adding a selector would move the needle, but am happy to entertain it. A challenge with that approach is that then we should probably store that selected data somewhere, which makes this implementation harder than a big callout block.

This is a good point. However, I was thinking that we have forgotten about two popular abuses that are not limited to the security research:

  • obfuscation
  • using PyPI as large file storage (yeah... Uploading 100s of ebooks or splitting and uploading 10s of files to host a LLM model is a thing)

I think that an alternative to selective displaying the message could be adding a point about them, and maybe going from red to yellow frame wit black text, to indicate it's a preventive warning instead of hit in a face? 😅

Thanks for noting those cases - absolutely should be added. I used the callout-block__danger class for the redness - can totally change to callout-block__warning (similar to what quarantined projects display today).

@kam193
Copy link
Copy Markdown

kam193 commented Apr 23, 2026

I was thinking about the flow and other use cases. I believe the purpose selection won't work (for reasons you mentioned), and I'm more and more in the direction of "making it applicable for everyone". And as part of that, I'd suggest one more change: instead of I assert that I will not use this account for security research or testing., maybe go in the direction of just I agree to respect PyPI's Terms of Service and Acceptable Use Policy.

It's not an uncommon pattern to have such agreement explicitly, it still draws attention to additional explanations of the AUP, and should make it less strange for people who use PyPI for genuine use cases.

@miketheman
Copy link
Copy Markdown
Member Author

And as part of that, I'd suggest one more change: instead of I assert that I will not use this account for security research or testing., maybe go in the direction of just I agree to respect PyPI's Terms of Service and Acceptable Use Policy.

We already have a line on the registration page:

By registering, you agree to the PyPI Terms of Service.

I like the idea of echoing that as a checkbox with links, and would expand to:

By registering, you agree to the PyPI Terms of Service and Acceptable Use Policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HTML requires change to HTML files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants