6 ms·
I wonder why we can’t have pip packages be published by username or organization, like pip install google/tensorflow It would significantly reduce the att
by jerpint 4y ago
I wonder why we can’t have pip packages be published by username or organization, like
pip install google/tensorflow
It would significantly reduce the attack space
- louislang 4y agonpm does something similar with their scoped packages. It fixes the problem for the top level packages, but you'd still have to contend with the transitive dependencies written by smaller organizations or individual contributors. In this case, you have to guarantee that no one involved in the dependency chain ever typos anything.
- jerpint 4y agoThis is true, and wouldn’t remove the entire space of attack, but would still limit it to some extent.
- louislang 4y agoOh absolutely. Unless everyone wants to be cool and stop publishing malware, gotta take a defense in depth approach here.
- collinmanderson 4y ago"you'd still have to contend with the transitive dependencies written by smaller organizations or individual contributors" - generally these are the higher risk dependencies anyway and should probably be used with extra caution anyway.
- YetAnotherNick 4y agoIt gives false sense of security. What about google_official/tensorflow
- germandiago 4y agoIt would still be an improvement if companies make clear what their namespace is.
- cozzyd 4y agogoogle.com/tensorflow (and you'd have to prove you own google.com) not perfect, but better.
- weberer 4y agoI've always been a fan of how Java packages do it where the TLD is first.
- __warlord__ 4y agoTIL https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html https://www.oracle.com/java/technologies/javase/codeconventi...
- comprev 4y agoPerhaps something like Docker hub where "official" images are like "/_/nginx" So "_google/tensorflow" would be official. "google/tensorflow" would not be (plus it would be reserved by default to avoid confusion).
- nine_k 4y agoWhat if the package is signed by a key available at google.com/pypi/key ? Actually it should be not just a key but a whole TLS certificate, with references to a CA, activity dates, etc.
- blibble 4y agoMaven had this 20 years ago quite why python refuses to learn from anything that went before it I really dont know “Namespaces are one honking great idea — let's do more of those!”
- permo-w 4y agoone of main issues I have with java is how messy it is to import external modules. python is a breath of fresh air comparitively. introducing this kind of thing as mandatory is a step away from that