为开源包生态构建可信分发证明,防止依赖混淆攻击
Cryptographic Registry Provenance: Structural Defense Against Dependency Confusion in AI Package Ecosystems
- 用加密签名实现注册表身份认证,确保包来自可信源
- 发布者与注册表双重签名,防篡改且不可抵赖
- 消费者可验证注册表指纹,适合安全敏感的AI系统
依赖混淆攻击利用软件分发中的结构漏洞:包安装后缺乏其来源注册表的密码学证明。现有防御均基于配置,配置错误时会无声失效。本文提出一种密码学分发溯源系统,包含三个组件:(1)注册表加密身份,每个注册表持有Ed25519密钥对并签名所有分发的工件;(2)双签名模型,发布者在打包时签名,注册表在发布时二次签名;(3)权威命名空间绑定,消费者固定注册表指纹,解析器可密码学拒绝未经授权的工件。三重防御层需同时被攻破才可成功攻击。在八个生态系统(npm、Cargo、Hex.pm、PyPI、Go modules、Docker/OCI、NuGet、Maven)的对比显示,无一同时具备强制发布者签名、加密注册表身份、强制注册表二次签名及客户端密码学校验。该系统可扩展至AI生成物溯源,作为带签名属性,并支持治理型依赖解析。案例研究将分发溯源与三层运行时治理架构结合,构建无密码学间隙的四阶段生命周期链。
原文摘要 · Abstract (English)
Dependency confusion attacks exploit a structural gap in software distribution: once a package is installed, there is no cryptographic proof of which registry distributed it. Every existing defense is configuration-based and fails silently when misconfigured. We present a cryptographic distribution provenance system comprising three components: (1) cryptographic registry identity, where every registry holds an Ed25519 keypair and signs every artifact it distributes; (2) a dual-signature model, where the publisher signs at packaging time and the registry countersigns at publication time; and (3) authoritative namespace binding, where consumers pin registry fingerprints and the resolver cryptographically rejects artifacts from unauthorized registries. These create three defense layers requiring simultaneous compromise for a successful attack. A comparison across eight ecosystems (npm, Cargo, Hex.pm, PyPI, Go modules, Docker/OCI, NuGet, Maven) shows no existing ecosystem combines mandatory publisher signing, cryptographic registry identity, mandatory registry countersigning, and consumer-side cryptographic enforcement. The system extends to AI-generation provenance as a signed attribute and governance-enforced dependency resolution. A case study integrates distribution provenance with a three-layer runtime governance architecture, creating a four-phase lifecycle chain with no cryptographic gaps.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。