TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Rust crate rg typosquatting/redirect to ripgrep

87 点作者 super_linear超过 1 年前

8 条评论

lapinot超过 1 年前
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 未加载
alphazard超过 1 年前
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 未加载
sixhobbits超过 1 年前
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.
Xymist超过 1 年前
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.
oars超过 1 年前
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 未加载
miki123211超过 1 年前
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;.
jbaber超过 1 年前
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 未加载
acheong08超过 1 年前
I prefer Go’s imports via Git
评论 #37407497 未加载