id: mapbox-token

info:
  name: Mapbox Token
  author: Devang-Solanki
  severity: medium
  reference:
    - https://docs.gitguardian.com/secrets-detection/detectors/specifics/mapbox_token
    - https://github.com/zricethezav/gitleaks/blob/master/cmd/generate/config/rules/mapbox.go
  metadata:
    verified: true
  tags: file,keys,token,mapbox
file:
  - extensions:
      - all

    extractors:
      - type: regex
        name: mapbox-public-token
        part: body
        regex:
          - 'pk\.eyJ1Ijoi\w+\.[\w-]*'

      - type: regex
        name: mapbox-secret-token
        part: body
        regex:
          - 'sk\.eyJ1Ijoi\w+\.[\w-]*'
# digest: 4a0a00473045022100a7ea48306be5c2b2cfc395952e068bd2e299957868b11ba57c2c45fa49ff188502201ba10a29d5332a82ed0fa1c984668ce2df5e2213391127664a2eef6a04a299a9:922c64590222798bb761d5b6d8e72950