Skip to content

LS-PYPIRC-001: pypirc Password

Severity HIGH
Blast radius Package registry supply-chain compromise
Rotate at https://pypi.org/manage/account/token/
Applies to files matching (?:^|/)\.pypirc$

If this leaks

A password or token in .pypirc allows uploading releases to PyPI as you.

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

(?i)^\s*password\s*[=:]\s*(\S{8,})

Suppress

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

disable_rules: [LS-PYPIRC-001]