id: docker-hub-pat

info:
  name: Docker Hub Personal Access Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/dockerhub.yml
    - https://docs.docker.com/security/for-developers/access-tokens/
  classification:
    cwe-id: CWE-522,CWE-540
  metadata:
    verified: true
    max-request: 1
  tags: docker,exposure,tokens,vuln

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

    extractors:
      - type: regex
        part: body
        regex:
          - \b(dckr_pat_[a-zA-Z0-9_-]{27})(?:$|[^a-zA-Z0-9_-])
# digest: 4a0a00473045022054d464ba69d95e84db4cf1402d72daa008b65bf53b0e7fdd844f1790f07d2d14022100fc76dca8e124ffa0d29140ea50b50628c62c6523d3587f569a6d198881e43440:922c64590222798bb761d5b6d8e72950