id: huggingface-user-access

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
  tags: huggingface,keys,file,ai

file:
  - extensions:
      - all

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