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

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

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

      - type: word
        words:
          - "Unknow Directive < @a >."
        part: body
# digest: 4a0a004730450221009449558828ae2768b5cb7804c3fb6f67451abad8acf52692f53676413f25718d022035ba6cd1cc02630579758e37f21490d747607f8674117cd710a1e048413d2a36:922c64590222798bb761d5b6d8e72950