id: particle-access

info:
  name: particle.io Access Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/particle.io.yml
    - https://docs.particle.io/reference/cloud-apis/api/
  metadata:
    verified: true
  tags: particle,keys,file

file:
  - extensions:
      - all

    extractors:
      - type: regex
        part: body
        regex:
          - 'https://api\.particle\.io/v1/[a-zA-Z0-9_\-\s/"\\?]*(?:access_token=|Authorization:\s*Bearer\s*)\b([a-zA-Z0-9]{40})\b'
          - '(?:access_token=|Authorization:\s*Bearer\s*)\b([a-zA-Z0-9]{40})\b[\s"\\]*https://api\.particle\.io/v1'
# digest: 4a0a004730450221008a0a6bfa62f5572886e233321caf2d70d15711b10a77bd02bf86003c4c5d815202204907d01439962cd8d5804a3cab115b92372b715441326c3a67a011186bf1e433:922c64590222798bb761d5b6d8e72950