id: graphql-juniper-detect
info:
  name: Graphql Juniper Detect
  author: princechaddha
  severity: info
  reference: https://github.com/dolevf/graphw00f/blob/main/graphw00f/lib.py
  tags: tech,graphql,juniper

http:
  - method: POST
    path:
      - "{{BaseURL}}/graphql"
      - "{{BaseURL}}/api/graphql"
      - "{{BaseURL}}/query"
      - "{{BaseURL}}/"
    body: '{"query":"queryy { __typename }"}'
    headers:
      Content-Type: application/json
    redirects: true

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

      - type: word
        words:
          - 'Unexpected "queryy"'
        part: body
# digest: 490a004630440220594901de5c09d615d9b875be5cc6b0aa7a610119ead33fb72d4d2787f826e100022043c0e5f1c48c45234b54bd178ec2e96afa80806496c275c40b51e16e3e83be74:922c64590222798bb761d5b6d8e72950