id: segment-public-api

info:
  name: Segment Public API Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/segment.yml
    - https://segment.com/docs/api/public-api/
    - https://segment.com/blog/how-segment-proactively-protects-customer-api-tokens/
  metadata:
    verified: true
  tags: keys,file,segment,token
file:
  - extensions:
      - all

    extractors:
      - type: regex
        part: body
        regex:
          - '(sgp_[a-zA-Z0-9]{64})'
# digest: 4a0a0047304502202781d5fc51179615c6c4c10c4fd8eec90dc4c682c8cbe5e8ef52b17d5fc8176a022100a3a0d4424e49090d806e5fadb4a4dbc26701886eeb7115355193e60757a1300c:922c64590222798bb761d5b6d8e72950