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

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

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

      - type: word
        words:
          - 'Must provide an operation.'
        part: body
# digest: 4a0a0047304502200febe011e21cad0d3aa6f8b115961048d2bbd105d5b791a83765147f4ae85b09022100a21abcfe9efcb75be0f1d15496ab4dbe6573b3fa70641976baa853b9126309ee:922c64590222798bb761d5b6d8e72950