id: grafana-serviceaccount-token

info:
  name: Grafana Service Account Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/grafana-service-account-token.yaml
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/grafana-service-account-token.go
    - https://grafana.com/docs/grafana/latest/administration/service-accounts/
  metadata:
    verified: true
    max-request: 1
  tags: grafana,exposure,tokens

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)\b(glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 4a0a0047304502201e3f58085b0b849033953b5fa3f8e537d312915b8a970d980e69e3b58999327e0221009cc5e42a1f26a0b7bbb903002247973d3ad3c6a46dc1baf9921bcc5f88c24d58:922c64590222798bb761d5b6d8e72950