id: huggingface-user-access-token

info:
  name: HuggingFace User Access Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/huggingface.yml
    - https://huggingface.co/docs/hub/security-tokens
  metadata:
    verified: true
    max-request: 1
  tags: huggingface,exposure,tokens

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

    extractors:
      - type: regex
        part: body
        regex:
          - '\b(hf_[a-zA-Z]{34})\b'
# digest: 4a0a0047304502207012431744345aa11255b2db2c049d27a9a7b9e925328e1ca8a5ad23d827a67c022100c806175c7e62ef6a32b0fe3fde37a9864b675a70e125637f02a8c139042e1f6e:922c64590222798bb761d5b6d8e72950