I agree that package squatting for the purpose of claiming them to yourself is deplorable. User mahkoh seems to have done exactly that, registering package names like audio and emoji.
Iâm not very familiar with the ecosystem, and I would like know more. Did they more to a different approach?
As one of the people mentioned in that link, I would like to re-state my case for having some package names protected/blacklisted. Itâs not very hard to get into big trouble cargo-installing the wrong thing. Perhaps when youâre tired you might make a mistake copying a package name from the web, and run cargo install install interestingpackage. Perhaps (like me) you watch a presentation that tells you to cargo install miri , so you do it, but you realise the presenter never actually reserved that name so you might as well just have gotten malware. So some package names (like install) should probably just be blacklisted, and names like miri should really be registered before you tell people to install it.
Given that those things didnât happen, I did what I thought was the next best thing, although I remain more than happy to blacklist/transfer those names. I understand that not everybody agrees with me.
kbknapp on Reddit writes
Itâs interesting to see the packages registered âBecause someone might copy paste âsomethingâ into the terminal and install a package which is a security risk.â While I agree that could be an attack vector, Iâd find it pretty hard to believe the crates.io/Rust team wouldnât take down a package which was blatantly doing this.
but I disagree that this is a good approach. How will you know if such a package is malicious? It is really really hard (impossible?) to figure out what the contents of a package is, without installing it. The crates.io web site doesnât seem to have any support for this.
(Perhaps we should open a thread about making package contents inspectable from the web interface or otherwise.)