id: sonarqube-public-projects

info:
  name: Sonarqube with public projects
  author: sickwell
  severity: low
  description: Sonarqube public projects detected.
  reference:
    - https://next.sonarqube.com/sonarqube/web_api/api/components/suggestions?internal=true
  metadata:
    max-request: 1
  tags: sonarqube,misconfig,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/api/components/suggestions?recentlyBrowsed="

    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200

      - type: word
        words:
          - '"results":'
          - '"items":'
          - '"more":'
        part: body
        condition: and
# digest: 4a0a00473045022030bf27dfb211b9b7f40ff7ef489ac5c27d0768551935983501644ebffd3a0034022100e2473d3efb107aab545e10b246827a2a12049073ec84bd814e8b7c4f6ce4617f:922c64590222798bb761d5b6d8e72950