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

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: 490a0046304402202874fc45718b020a2300d5375200ddc43c5f1208fb54c0d7a2583cdc7bb9782d022071b324f8af77384bd1bff97c3bb6e46e7997a3e50b23afb6bb07394c2e331c82:922c64590222798bb761d5b6d8e72950