id: sonarqube-token

info:
  name: SonarQube Token Disclosure
  author: Ice3man
  severity: info
  reference:
    - https://docs.sonarqube.org/latest/user-guide/user-token/
  metadata:
    max-request: 1
  tags: exposure,token,sonarqube

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

    extractors:
      - type: regex
        part: body
        regex:
          - "sonar.{0,50}(?:\"|'|`)?[0-9a-f]{40}(?:\"|'|`)?"
# digest: 490a0046304402202dcbf62cf0010849cd25f86285d01ecf8d5f6cd6b24ee9586cedc618d4b627b5022019dc44ccd774b56505d5396358e19daf38118618c6cfe1a59d16127e5ff84a5e:922c64590222798bb761d5b6d8e72950