PyPI API Token

Detects PyPI (Python Package Index) upload tokens. The fixed marker pypi-AgEIcHlwaS5vcmc is the base64 encoding of "pypi.org", making these tokens near-unmistakable. A leaked token lets an attacker publish malicious package releases.

Type
regex
Engine
universal
Confidence
high
Confidence justification
High confidence: the static pypi-AgEIcHlwaS5vcmc marker decodes to "pypi.org" and does not occur outside genuine PyPI tokens, giving near-zero false positives.
Jurisdictions
global
Regulations
Criminal Code Act 1995 (Cth)
Frameworks
CIS Controls, ISO 27001, NIST CSF, SOC 2
Data categories
credentials, security
Scope
narrow
Risk rating
9
Platform compatibility
Purview: Compatible, GCP DLP: Compatible, Macie: Compatible, Zscaler: Compatible, Palo Alto: Compatible, Netskope: Compatible

Pattern

pypi-AgEIcHlwaS5vcmc[A-Za-z0-9_-]{50,1000}

Corroborative evidence keywords

pypi, pypi.org, twine, upload token, api token, PYPI_TOKEN, __token__

Proximity: 300 characters

Should match

Should not match

Known false positives

References