You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GraphQL probes still let the runtime inflate a compressed response before the cap #722
The GraphQL probes behind security/graphql-introspection and security/graphql-get-mutations still fetch with the runtime's own Content-Encoding decoding: sendGraphqlProbe in packages/rules/src/security/graphql-probe.ts calls globalThis.fetch, then readCapped. Bun inflates a compressed body in full as soon as it arrives, before the capped read applies, so a site with active probing on can still answer a probe with a gzip or brotli bomb and cost the audit gigabytes of memory. Every other request the crawl and the audit send to the site moved to fetchUndecoded / readBodyCapped (packages/utils/src/response-body.ts) in #699.
Acceptance Criteria
The GraphQL probe request goes out with the runtime's decoding off (fetchUndecoded, or decompress: false plus the shared Accept-Encoding), and its body is read through the shared decoder no further than the probe's existing byte cap (GRAPHQL_RESPONSE_CAPS).
A probe whose response is a 1 GiB gzip bomb (and a brotli one) is read to its cap and stays under 256 MiB of RSS, in a test like packages/utils/tests/fetch-undecoded.test.ts.
A test with a global fetch spy shows the probe request carries decompress: false, and that an ordinary gzip-encoded GraphQL JSON response still parses to the same probe outcome.
security/graphql-introspection and security/graphql-get-mutations findings are unchanged on the existing rule tests.
Activity
fix(rules): GraphQL probe closes its connection after the capped read #…
fix(rules): GraphQL probes fetch undecoded and inflate no further tha…
fix(rules): GraphQL probe closes its connection after the capped read #…
fix(rules): GraphQL probes fetch undecoded and inflate no further tha…
fix(rules): GraphQL probe closes its connection after the capped read #…
fix(rules): GraphQL probes fetch undecoded so a compressed response c…