簡體   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