id: openapi

info:
  name: OpenAPI - Detect
  author: pdteam,ynnirc
  severity: info
  description: OpenAPI was detected.
  reference:
    - https://www.openapis.org/
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
    cvss-score: 0
    cwe-id: CWE-200
  metadata:
    max-request: 1
  tags: exposure,api,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/openapi.json"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - openapi
          - paths
        condition: and

      - type: word
        part: header
        words:
          - application/openapi+json
          - application/json
        condition: or

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