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,vuln

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

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