feat(sandbox): add querystring to QuickJS module registry - #10362
Open
kwburns-kong wants to merge 2 commits into
Open
feat(sandbox): add querystring to QuickJS module registry#10362kwburns-kong wants to merge 2 commits into
kwburns-kong wants to merge 2 commits into
Conversation
Pure-JS reimplementation with parity tests against real node:querystring.
✅ Circular References ReportGenerated at: 2026-08-10T18:06:17.963Z Summary
Click to view all circular references in PR (9)Click to view all circular references in base branch (9)Analysis✅ No Change: This PR does not introduce or remove any circular references. This report was generated automatically by comparing against the |
… gap parse()'s per-key/value decode shares unescape()'s fallback-to-unchanged-input behavior on malformed percent-encoding, but this was only documented for unescape() and had no test coverage for parse(). Extends the PERMISSIONS.md and code-comment gap description to cover parse(), and pins the divergence against real node:querystring in querystring.regression.test.ts. Also adds adversarial regression coverage confirming the __proto__/constructor prototype-pollution defense holds under a live sandboxed run. See SANDBOX-SECURITY-FINDINGS.md for the full security-review write-up.
kwburns-kong
marked this pull request as ready for review
August 10, 2026 18:00
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.
Pure-JS
querystringreimplementation for the QuickJS plugin sandbox, grantable viapermissions.modules. Adds parity tests against realnode:querystringand a manifest-grant test block. Gaps documented in PERMISSIONS.md.Part of the legacy-module porting plan (
packages/insomnia/src/templating/sandbox/plans/). Milestone 2a.Security review (2b)
Independent sandbox-security review completed. Capability gating (baseline exclusion, manifest-grant requirement,
resolveTemplateTagModules/canonicalizeModuleresolution), the absence of any live host-object reference inQUERYSTRING_FACTORY's exports, andparse()'sObject.create(null)prototype-pollution defense were all confirmed correct — the last one via an actual adversarial run inside the sandbox (crafted__proto__/constructorquery keys, cross-render leakage), not just source reading.One real gap found and fixed in this module's own scope:
parse()'s per-key/value decode sharesunescape()'s fallback-to-unchanged-input behavior on malformed percent-encoding, but this was only documented (and tested) forunescape(). Extended the PERMISSIONS.md/code-comment documentation to coverparse()too, and added a regression test pinning the divergence against realnode:querystring. No behavior change — it's a decode-fidelity gap, not a security issue (the fallback can only ever return the caller's own original substring unchanged, never smuggle new characters, and never throws uncontrolled). Full detail inSANDBOX-SECURITY-FINDINGS.md.