id: redoc-api-docs

info:
  name: ReDoc API Docs - Detect
  author: Hamza Sahin
  severity: info
  description: |
    ReDoc API documentation interface is available without authentication, potentially exposing information about the API endpoints.
  reference:
    - https://redocly.com/docs/redoc
  metadata:
    verified: true
    max-request: 4
    shodan-query: html:"redoc.standalone.js"
  tags: api,openapi,redoc,exposure,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/redoc"
      - "{{BaseURL}}/docs"
      - "{{BaseURL}}/api/docs"
      - "{{BaseURL}}/openapi"

    stop-at-first-match: true

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains_any(body, "__REDOC_EXPORT", "redoc.standalone.js")'
        condition: and
# digest: 4a0a0047304502206c310c3db1c0d50c1e992604a087e397db865c5a7cd9fb603682aaf0644009e7022100a7fb16a298a818011d05d808f426012ddea2af48c055fafcc3f766bc0bfff178:922c64590222798bb761d5b6d8e72950