Skip to content

LS-PYPI-001: PyPI API Token

Severity HIGH
Blast radius Package registry supply-chain compromise
Rotate at https://pypi.org/manage/account/token/

If this leaks

Allows publishing new releases to PyPI for the scoped project(s), a supply-chain risk for every downstream consumer of the package.

What to do

  1. Rotate or revoke the credential at https://pypi.org/manage/account/token/.
  2. Check the provider's audit logs for use you don't recognise.
  3. Remove it from git history (leakscan purge --help) and load it from an environment variable or secret manager instead.

Pattern

pypi-[A-Za-z0-9_\-]{97,}

Suppress

On one line: # leakscan:ignore LS-PYPI-001. For the whole project:

disable_rules: [LS-PYPI-001]