Giter Site home page Giter Site logo

Stack trace discovery about graphql-cop HOT 4 CLOSED

dolevf avatar dolevf commented on May 28, 2024
Stack trace discovery

from graphql-cop.

Comments (4)

dolevf avatar dolevf commented on May 28, 2024

Hi,

It's looking for specific response keys such as exception and tracing within the extensions key (where you should usually see tracing information). This could vary and be custom on different GraphQL servers but it should catch the standard ones.

e.g.

{"errors":"aaa","data":"aaa","extensions":{ "tracing":"some trace data"} }

from graphql-cop.

halfluke avatar halfluke commented on May 28, 2024

Thank you. I understand this issue is not in dvga because dvga does not return 'tracing', 'exception' or 'stacktrace', but shouldn't be the payload for this test be something like {"query": "query { __typenaaame }"} ?
At least it would trigger an error in this way.

(By the way, I have a PR ready to:

  • support multiple headers repeating -H more than once (I needed this to add a bearer token AND overwrite the Accept header, coz my app wanted it to be always set to application/json and graphql-cop sends */* by default). Or another example: dvga wants Accept: text/html on the GET request to correctly identify the IDE (graphiql - [LOW] GraphQL IDE - GraphiQL Explorer/Playground Enabled (Information Leakage))
  • Small increase to GET timeouts (from 5 seconds to 15), in case you want to intercept with Burp and take a look at the request
  • for loop to detect Graphiql IDEs with multiple GET requests in cases like my app, where graphql was located at /xxx/graphql.
    So GET requests will be sent to /graphiql /console /playground and then to /xxx/graphiql /xxx/console /xxx/playground etc..)

from graphql-cop.

dolevf avatar dolevf commented on May 28, 2024

First: Thank you for improving this tool! I will take a look at your PR once it's up.
Second: You are making a valid point. The query currently in use will not trigger an exception because it's valid across all GraphQL APIs. So exception won't be seen if there's nothing to throw exceptions on. However, tracing on other hand is sometimes shown as part of valid/non-valid requests.

I can look into maybe splitting this to two test cases so it covers both.

thanks!

from graphql-cop.

dolevf avatar dolevf commented on May 28, 2024

#14

from graphql-cop.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.