id: kube-api-version

info:
  name: Kube API Version
  author: sharath,raesene
  severity: info
  description: Searches for exposed Kubernetes API servers which return version information unauthenticated
  metadata:
    max-request: 1
  tags: tech,k8s,kubernetes,devops,kube,discovery

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

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

      - type: word
        part: body
        words:
          - '"major":'
          - '"minor":'
          - '"goVersion":'
        condition: and

    extractors:
      - type: json
        json:
          - ".gitVersion"
# digest: 490a00463044022049b6d4cec1b8757345e67d32d05b38515f497909180953e6136c0dc28d76555202200ad48689004d28291f3399b346f4128eccb62a32b854d63457ba4e28b14c8c89:922c64590222798bb761d5b6d8e72950