Improve Batch Queries Scanner (#215)#221
Open
wjdwl002 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #215.
Adds an automated Batch Queries Scanner that probes whether a GraphQL
endpoint supports query batching, complementing the existing manual Batch
Queries tab. It detects two batching styles and surfaces results both as Burp
audit issues and in the InQL scan results tree.
Rationale
Previously InQL had no automated way to determine whether an endpoint supports
batching. Batching support is a meaningful finding because it enables
rate-limit bypass, brute-force amplification, and DoS via a single HTTP request.
What's included
BatchScanner.kt— sends two probes (__typename-based) and analyzes responses:query { inql_batch_alias1: __typename inql_batch_alias2: __typename }BurpScannerCheck.kt— reports a LOW/CERTAINAuditIssueper supported batch type during active audit.ScanResultsTreeNode.kt— adds a "Batch Query Detection" node to the scan tree.Config.kt— addsreport.batch,report.batch.alias,report.batch.arraytoggles (default on).build.gradle— adds JUnit 5 + Mockito test deps,useJUnitPlatform(), and a test source set.BatchScannerTest.kt— 30 unit tests covering payload generation, response analysis, and edge cases.Testing
./gradlew test --tests "inql.graphql.scanners.BatchScannerTest"→ BUILD SUCCESSFUL, 30 tests passing.Notes
the live
scan()path depends onBurp.Montoyaand is exercised at runtime.montoya-apiis declaredcompileOnlyin the main module, sotestCompileOnly/testRuntimeOnlyentries were added to make it available on the test classpath.