繁体   English   中英

Gemfury 是否可以防止依赖混淆?

[英]Does Gemfury protect against dependency confusion?

鉴于 Alex Birsan 透露他能够通过依赖性混淆在主要私营公司内部运行代码(将包上传到与公司的私有/内部 package 同名的公共存储库,但版本号更高),Gemfury 是否有保护反对这个?

我知道混合索引有很长的路要走,因为如果适用,所有依赖项都将首先从 Gemfury 存储库中提取,但这是否包括版本检查? For example: if my Gemfury repo contains package A with version 1.1 and the public repo contains package A with version 1.2, and my package.json is set to pull the package with the highest minor number, is Gemfury smart enough to pull version 1.1 from我的本地仓库而不是来自公共仓库的 1.2?

答案取决于 package 管理器。 对于在客户端执行多 repo 解析的 package 管理器,这将取决于 package 管理器的实现。 对于某些人,您可以显式指定每个依赖项的来源,从而避免 repo 混淆。 鉴于 Alex Birsan 的启示,各种 package 经理正在单独解决这个问题。

As far as Gemfury's blending indexes for npm and Go Modules, the blending is done at the package level, so if a named package exists in your private account, only private versions are surfaced to the client for that package. 这避免了公共索引中的版本干扰私有 package。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM