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: 4a0a00473045022100879e0b18f15c9c84a441bffdeeb7a89bfcc2e0a5426c651b38a3f45313f9b49502201c74527d1b7416087a81cc3bbdb65bd7fcb2e31225b9a59434182fc71a0483fd:922c64590222798bb761d5b6d8e72950