id: pypi-upload-token

info:
  name: PyPI Upload Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/pypi.yml
    - https://github.com/pypa/warehouse/issues/6051
    - https://pypi.org/project/pypitoken/
  metadata:
    verified: true
    max-request: 1
  tags: pypi,token,exposure

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    extractors:
      - type: regex
        part: body
        regex:
          - "(pypi-AgEIcHlwaS5vcmc[a-zA-Z0-9_-]{50,})"
# digest: 4a0a00473045022040806a88e2df0c42bc27a9b5302129759ae3ba896360a5e301cdef0747169774022100c6366b9592571144a48a9d40e41912c93a47148e3b23591ddf45a3d5a90aee1c:922c64590222798bb761d5b6d8e72950