-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Security concerns from mypy --install-types
and malicious third-party stubs
#10538
Comments
See also pypi/warehouse#4967. This is a serious concern. |
Mypy ships with information about a various known stub packages and these are the only ones that it will suggest installing, or install using It makes sense to mention this in the documentation as otherwise users may be hesitant to install these packages without first manually validating them. Having a dedicated namespace for stub packages would be nice, but it's unclear when this might be supported. I have plans to claim |
@JukkaL Sounds like a good plan! Both restricting |
Note that |
Since this code path involves mypy recommending installation of a stub package, I thought I'd rename the enum to make it slightly clearer that this should only be triggered for packages we know to be good. Linking python#10538
Since this code path involves mypy recommending installation of a stub package, I thought I'd rename the enum to make it slightly clearer that this should only be triggered for packages we know to be good. Linking #10538 Co-authored-by: hauntsaninja <>
Reading the recent blog post announcing
--install-types
, I was concerned that malicious third parties might create atypes-$popular_package
package and have it recommended or even installed bymypy
.The docs for this feature don't outline any security considerations. Has the risk of malicious packages been considered? If so, what mitigations are in place? It would be great to document this.
The text was updated successfully, but these errors were encountered: