Skip to content

Rule protecting against batching requests #37

Closed
@ldebruijn

Description

@ldebruijn

Is your feature request related to a problem? Please describe.
Implement a rule that protects the API against GraphQL Batching Attacks

Describe the solution you'd like
Provide a protection that poses a limit on the maximum size of batches

Describe alternatives you've considered
The existing max token protection already protects against batch attacks, but doesn't do so sufficiently as the need for support of large operations might collide with vulnerability to tiny operations in large batches.

Additional context
Batch request format

[
 {
   "query": "< query 0 >",
   "variables": { < variables for query 0 >, }
 },
 {
  "query": "< query 1 >",
  "variables": { < variables for query 1 >, }
 },
 {
 "query": "< query n >",
 "variables": { < variables for query n >, }
 }
]

Response format

[
  {
    “data”: { < ... >}
  },
  {
    “data”: { < ... > }
  },
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions