Cryptographic Registry Provenance: Structural Defense Against Dependency Confusion in AI Package Ecosystems

Alan L. McCann · 2026

Read Cryptographic Registry Provenance: Structural Defense Against Dependency Confusion in AI Package Ecosystems by Alan L. McCann (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-03309.txt.

Introduction

Alan L. McCann proposes a signed-proof defense against dependency confusion attacks. In such attacks, installers are tricked into fetching a bad package from the wrong registry. Once a package is installed, no proof shows which registry supplied it. Current defenses rely on settings, and they fail silently when misconfigured.

Each registry holds a signing key. It requires signatures from both publisher and registry. Consumers pin approved registry fingerprints, so the resolver rejects all else. An attacker must breach all three layers at once. A survey of eight ecosystems finds none has all the required pieces today. The work gives package users a clear way to check where each file came from.

Catalog record

CREATORAlan L. McCann
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE57 KB
LICENSEhttp://creativecommons.org/publicdomain/zero/1.0/
RIGHTSCC0
SOURCEarXiv

Source: https://arxiv.org/abs/2605.03309

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Cryptographic Registry Provenance: Structural Defense Against Dependency Confusion in AI Package Ecosystems Alan L. McCann Abstract 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. 1 Introduction Software supply chain attacks have emerged as one of the most consequential threat categories in modern software engineering. The 2021 ua-parser-js incident affected over 7 million weekly npm downloads when an attacker gained access to the maintainer’s account and published malicious versions npm Security 2021 . The 2018 event-stream attack inserted a targeted cryptocurrency theft module into a package with 1.5 million weekly downloads npm Security 2018 . The 2024 xz-utils backdoor demonstrated that even cryptographically signed packages are vulnerable when the signing key holder is socially engineered Freund 2024 . Among supply chain attack vectors, dependency confusion occupies a distinctive position: it is structurally simple, reliably exploitable, and undefended at the artifact level in every major package ecosystem. First systematized by Birsan Birsan 2021 , the attack exploits a fundamental architectural gap: once a package is installed on a consumer’s system, there is no cryptographic proof of which registry distributed it. 1.1 The Structural Gap Consider an enterprise running a private package registry at registry.acme.com alongside the public registry. Both can host packages under the @acme namespace: the private registry legitimately, the public registry through namespace squatting or misconfiguration. The enterprise’s build system resolves @acme/utils by querying configured registries. If the public registry returns a higher version number, the resolver may select it over the private registry’s version. Every existing mitigation operates at the configuration layer: • npm : .npmrc registry and @scope:registry settings • PyPI/pip : --index-url and --extra-index-url flags • Go modules : GOPROXY environment variable • Maven : <repositories> XML configuration in pom.xml • NuGet : nuget.config package source mappings (added 2022) If the configuration is incorrect, missing, or overridden by a CI/CD environment variable, the attack succeeds silently. The artifact on disk carries no evidence that would allow post-installation verification of its distribution path. 1.2 Contributions This paper makes the following contributions: 1. Cryptographic registry identity (Section 5 ): every registry instance holds an Ed25519 keypair and publishes its identity at a well-known endpoint. The registry signs every artifact it accepts, creating an artifact-level cryptographic proof of the distribution path. 2. A dual-signature distribution model (Section 6 ): published artifacts carry two independent signatures (a publisher signature created at packaging time and a registry attestation created at publication time) with countersigning semantics that preserve temporal ordering and independent claims. 3. Authoritative namespace binding (Section 7 ): consumers declare which registries are authoritative for which namespaces and pin registry key fingerprints. The package resolver cryptographically rejects artifacts from unauthorized registries. 4. A two-layer archive format (Section 4 ): a provenance envelope (uncompressed) wrapping source contents (compressed), enabling verification without full decompression. 5. A six-level verification chain (Section 8 ): progressive verification from file integrity through publisher authenticity, registry attestation, and lineage provenance. 6. A systematic ecosystem comparison (Section 10 ): analysis of eight major ecosystems showing no existing system combines all four capabilities (mandatory signing, registry identity, registry countersigning, consumer enforcement). 7. Case study: integration with runtime governance (Section 11 ): we demonstrate integration with a three-layer structural governance architecture McCann 2026e , extending it to a four-phase lifecycle chain with no cryptographic gaps. Two extensions (AI-generation provenance and governance-enforced dependency resolution) are discussed as future work directions in Section 13 . Scope and companion papers. This paper addresses the distribution phase of the governance lifecycle: proving which registry distributed an artifact. It completes a four-phase chain from build provenance through distribution to runtime governance. McCann 2026e establishes the structural governance architecture that this paper extends to the supply chain. McCann 2026c mechanizes the runtime safety properties (454 theorems in Rocq) that govern artifacts after installation. McCann 2026b proves that the four governed primitives are expressively complete and semantically transparent; registry verification operates at the syntactic level (cryptographic properties), where decidability holds. McCann 2026a lifts these results to a parametric algebraic framework; the coterminous boundary principle applies equally to distribution verification: every package either passes full verification or is rejected. McCann 2026d addresses the executor-level gap: purity certificates issued at build time compose with the distribution signatures described here to form a complete trust chain from source to execution. 1.3 Paper Structure Section 2 surveys related work in package security and supply chain provenance. Section 3 defines the threat model. Sections 4 – 8 present the architecture. Section 9 formalizes security properties. Section 10 compares against existing ecosystems. Section 11 describes integration with runtime governance. Section 12 evaluates performance and security. Section 13 discusses limitations, future work, and preliminary extensions. Section 14 concludes. 2 Related Work 2.1 Package Signing Package signing has evolved from optional to increasingly mandatory across ecosystems. npm introduced Sigstore-based provenance attestations in 2023 GitHub and npm 2023 , providing keyless signing tied to CI/CD identities via OIDC federation. PyPI adopted PEP 740 attestations in 2024 Woodruff and Ingram 2024 , also Sigstore-based. NuGet has supported X.509 author signatures since 2018 and repository countersignatures since 2019 Microsoft 2018 . Hex.pm signs packages with a per-repository key inside a protobuf envelope Hex.pm 2016 . Cargo does not natively sign packages but the third-party cargo-vet tool provides supply chain auditing Mozilla 2022 . These efforts focus on publisher identity , proving who built the artifact. None except NuGet and Hex address registry identity : proving which registry distributed it. Even NuGet’s repository countersignature is optional and not enforced during package installation by default Microsoft 2018 . 2.2 Sigstore and Keyless Signing Sigstore Callaway et al. 2022 eliminated long-lived signing keys entirely. Publishers authenticate via OIDC (e.g., GitHub Actions identity), receive a short-lived certificate from Fulcio, sign the artifact, and the signature is recorded in the Rekor transparency log. Consumers verify by checking the transparency log rather than managing a trusted key set. Sigstore excels at proving publisher identity in CI/CD-centric workflows. It does not address registry provenance: the transparency log records who signed , not which registry distributed . An artifact signed via Sigstore in a GitHub Actions workflow and uploaded to two different registries produces identical signatures; the distribution path is invisible. 2.3 Software Bill

Read the complete text