PyPI導入數位見證以強化安全防護,Python供應鏈信任機制再升級
支付動態 · 2024-11-18

PyPI數位認證讓套件維護者在發布Python套件時,加入經過身分驗證的數位簽章,徹底提升供應鏈安全與追溯性,替代傳統PGP簽章機制

Python軟體生態系迎來一項重要功能,PyPI(Python Package Index)正式啟用數位見證(Digital Attestations)功能,讓套件維護者可以在發布時,加入經過身分驗證的數位簽章,進一步強化軟體供應鏈安全性。此項新措施將可提高套件的可信度並強化整體安全性。根據官方資料,目前已經有超過2萬筆數位見證上傳至PyPI,而這樣大量採用的趨勢,也顯示出業界對軟體安全的高度需求。

數位見證的正式實施,代表著Python PEP 740實作完成。PEP 740是PyPI供應鏈安全策略的一環,隨著可信發布(Trusted Publishing)的支援,PyPI正逐步淘汰傳統的PGP簽章機制。數位見證相比PGP簽章具有三大優點。首先,數位見證基於OIDC(OpenID Connect)身分驗證進行簽署,不再仰賴公私金鑰對,從根本解決了金鑰遺失或是遭竊的風險。這種身分導向的簽章,大幅降低傳統加密系統的安全風險,特別是當前供應鏈攻擊頻傳的環境,進一步強化了安全性。

其次,數位見證可提供明確的上游原始碼程式庫連結,尤其是自動化發布流程,諸如GitHub Actions的專案。見證標示PyPI上檔案和來源庫、工作流程以及生成該檔案的提交紀錄之間的關聯,使每個發布套件都具有可追溯性。對於企業和使用者個人而言,這代表著PyPI上每個套件版本,都可被驗證來源,防範供應鏈劫持和假冒專案的風險。

再者,數位見證在上傳時即需要完成驗證,確保所有發布到PyPI的證明皆為可被驗證。先前PGP簽章機制並不強制實行此相應要求,導致一些未經驗證的簽章出現在平臺上,影響使用者對簽章的信任,而隨著PEP 740的落實,PyPI便可徹底解決這個問題,使數位簽章成可靠的供應鏈保護機制。

PyPI推出兩個新工具供使用者方便驗證檔案的數位見證資訊,使用者可以透過新設計的Integrity API程式化存取數位見證,或直接在PyPI網站的新介面,檢視每個檔案的詳細資訊,包含所有相關數位見證。這些工具提供更高的透明度,讓開發者和使用者能夠即時查證所使用套件的安全性。

符合條件的專案將能夠自動生成數位見證,不需要額外配置即可啟用。使用GitHub Actions發布並依循可信發布原則,且採用pypa/gh-action-pypi-publish發布的套件,已經自動啟用數位見證。之後PyPI計畫逐步推展至其他可信發布環境,讓更多發布環境均可自動生成見證,擴大數位見證的覆蓋範圍。

Popular articles
UK MPs reopen 2025 gambling inquiry as reform stalls
Regulation
Vietnam's tightening online gaming policy creates new market opportunities
Southeast Asia
Across 6 Cities: HUIDU Invites You to 8 World Cup Parties Redefining High-Value Social Networking
HUIDU Focus
HUIDU Invites You to Booth T70 at iGB L!VE 2026 — Let’s Ignite London This July!
HUIDU Focus
1spin4win grows its Latin American presence by partnering with Fortuna Juegos
Online Game
GAT Expo Puerto Rico Will Pulse with the New Era of Gaming in the Caribbean
Marketing
PropellerAds Shared a New iGaming Case Study: 97,674 Installs and 12,701 Deposits in 3 Months
Marketing
New Jersey July Gambling Revenue Hits $606M, Sweeps Casinos Banned
Regulation
B2B Tech Infrastructure Gains Momentum in Philippine Gaming Sector
Southeast Asia
Are you ready to maximize your earnings? Try ProPush.me Constructor!
Marketing
GAT CDMX 2025 Institutional Academy: Leaders and Experts Analyze the Present and Future of the Gaming Industry in Mexico and Lat
Sports Game
Kazakhstan plans to penalise online casino promotions
Regulation
Indiana online casino bill stalls in House committee
Regulation
Brazil Proposes Raising Gambling Tax Rate to 24%, With Revenue Allocated to Social Security and Healthcare
Regulation
Institutional Academy that exceeded expectations marked the opening of GAT CDMX
Online Game
Home
Game
Cooperation
Find
My