id: apache-polaris-metrics-exposure

info:
  name: Apache Polaris - Information Disclosure
  author: icarot
  severity: medium
  description: |
    Detects a Apache Polaris server, the interoperable, open source catalog for Apache Iceberg.
  reference:
    - https://github.com/apache/polaris
  classification:
    cpe: cpe:2.3:a:apache:polaris:*:*:*:*:*:*:*:*
  metadata:
    vendor: apache
    product: polaris
    shodan-query: http.html:"org.apache.polaris"
  tags: apache,polaris,exposure,metrics,misconfig

http:
  - method: GET
    path:
      - "{{BaseURL}}/q/metrics"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - 'application="Polaris"'
          - 'org.apache.polaris'
        condition: and

      - type: status
        status:
          - 200
# digest: 4a0a00473045022074c941d033f9cbf5e5ebba07d25bb218550e52fd4b1eb24652ed9104ff712eeb022100b92347606766bfb23869f97befe082f2c07ad1ee341afca91598a23a9a38544f:922c64590222798bb761d5b6d8e72950