Skip to content

Implement PEP-708 - Extend the repository API to mitigate "dependency confusion" attacks #998

Description

@dralley

PEP-708

Dependency confusion attacks, in which a malicious package is installed instead of the one the user expected, are an increasingly common supply chain threat. Most such attacks against Python dependencies, including the recent PyTorch incident, occur with multiple package repositories, where a dependency expected to come from one repository (e.g. a custom index) is installed from another (e.g. PyPI).

To help address this problem, this PEP proposes extending the Simple Repository API to allow repository operators to indicate that a project found on their repository “tracks” a project on different repositories, and allows projects to extend their namespaces across multiple repositories.

These features will allow installers to determine when a project being made available from a particular mix of repositories is expected and should be allowed, and when it is not and should halt the install with an error to protect the user.

Activity

  1. added 2 commits that reference this issue on Nov 14, 2025
    04ed021
    fb1bec8
  2. added 4 commits that reference this issue on Nov 26, 2025
    3c6551c
    d5a660a
    29c0f2f
    610ef15
  3. modified the milestone: on Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions