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: 4b0a00483046022100b1f505d3e844a33b2512ed3d067693da52a8c8b6d191f0a03820bfdd97970f42022100fd80d564667c58c121a5fc92292aa9570ea1034a7a378a77ef834ec0d7ec07d5:922c64590222798bb761d5b6d8e72950