TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Rust crate rg typosquatting/redirect to ripgrep

87 pointsby super_linearalmost 2 years ago

8 comments

lapinotalmost 2 years ago
Note that this problem of squatting (like many others security problems) is mostly a consequence of unmanaged repositories where developers publish themselves (like crates.io here, npm, pypi or the various &quot;app stores&quot;). Well-tended community-organized repositories, like most linux distribution have, do separate the role of package maintainer. This makes a much needed buffer between users and the developers, which regularly have contradicting interests, security-, support- and integration-wise.<p>See ddevault&#x27;s two very clear explanations of this issue: <a href="https:&#x2F;&#x2F;drewdevault.com&#x2F;2019&#x2F;12&#x2F;09&#x2F;Developers-shouldnt-distribute.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;drewdevault.com&#x2F;2019&#x2F;12&#x2F;09&#x2F;Developers-shouldnt-distr...</a> and <a href="https:&#x2F;&#x2F;drewdevault.com&#x2F;2021&#x2F;09&#x2F;27&#x2F;Let-distros-do-their-job.html" rel="nofollow noreferrer">https:&#x2F;&#x2F;drewdevault.com&#x2F;2021&#x2F;09&#x2F;27&#x2F;Let-distros-do-their-job....</a>
评论 #37390148 未加载
评论 #37406105 未加载
alphazardalmost 2 years ago
The Go modules ecosystem doesn&#x27;t suffer from the squatting problem because they chose not to create a new vacant namespace, and the corresponding rush to fill it.<p>They easily could have. pkg.go.dev could be like npm. It&#x27;s not a question of cost, google is paying for the infrastructure.<p>It seems that language creators generally get this false impression that if they are the one to create the new namespace, then it will be high quality, and the best packages will get the short de-facto names. Maybe a few of the packages they wrote themselves can get some of the first names.<p>That&#x27;s never what happens. The wise solution is just to use DNS. We already have names, people pay for them, there is infrastructure for selling them, there is an auditable certificate system. A new package namespace won&#x27;t have any of that.
评论 #37395400 未加载
sixhobbitsalmost 2 years ago
I&#x27;ve definitely found `<a href="https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;bs4&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;bs4&#x2F;</a>` useful - in Python if you want to use BeautifulSoup (a common package for parsing and manipulating HTML), you import it with `from bs4 import BeautifulSoup`, but you install it with `pip3 install beautifulsoup4`.<p>In this case, the `bs4` package actually directly installs what you need, though I agree with the arguments in the article why this might not be ideal.<p>It would be nice if the committees that deal with the language itself could also look after things like this as it&#x27;s hard to say objectively (main package needs x installs&#x2F;month?) when something is squatting and when it is useful, but I think a &#x27;common sense&#x27; approach goes pretty far.
Xymistalmost 2 years ago
I&#x27;ve found this useful several times, and wish that `fd-find` did the same thing. It&#x27;s not an unreasonable thing to do, IMO, under the appropriate circumstances.
oarsalmost 2 years ago
Interesting read. Thanks for sharing!<p>This was created a year ago and Crates.io haven&#x27;t taken it down so I assume they&#x27;re ok with it.
评论 #37389676 未加载
评论 #37389175 未加载
miki123211almost 2 years ago
THe same strategy is employed by PyTorch. If you do &quot;pip install PyTorch&quot;, like I&#x27;ve done many times, it just tells you to &quot;pip install torch&quot; instead. To be even more confusing, though, the Anaconda package is actually named &quot;PyTorch&quot;.
jbaberalmost 2 years ago
rg&#x27;s a rusty ag. To install ag, you usually have to guess something like &quot;ag-the-silver-searcher&quot;. Not easy.
评论 #37390653 未加载
acheong08almost 2 years ago
I prefer Go’s imports via Git
评论 #37407497 未加载