Phase 0: prepare 1.0.0 baseline with CVE patches and CI#2
Merged
Conversation
added 2 commits
May 20, 2026 08:22
Phase 0 of the modernization plan. Today's code with the minimum patches to be CVE-clean on the original install target. Security: - Reject deparam parameter keys equal to __proto__, constructor, or prototype (prototype-pollution mitigation; same shape as qs CVE-2017-1000048 / CVE-2022-24999). - New maxDepth parameter on deparam (default 5) caps nesting depth; parameters exceeding it are silently dropped. Tooling: - Consolidate MIT-LICENSE.txt + jquery-MIT-LICENSE.txt + deparam-LICENSE into a single LICENSE with full attribution. - Add SECURITY.md disclosure policy. - Add .github/workflows/ci.yml: full mocha suite on Node 18/20/22/24 via setup-node, smoke test on Node 0.10/0.12/4/6/8/10/12/14/16 via Docker (native amd64 on Ubuntu runners), npm audit job. - Declare engines >=0.10 in package.json, add files allowlist, update homepage/bugs URLs. Tests: - Add test/conformance.spec.js: Reference Conformance Spec (58 cases) capturing the wire-format and security contract for future modernization phases and any replacement library. - Add test/smoke-floor.js: assertion-only smoke test (no chai/mocha transitive dependencies) that runs on ancient Node versions in CI. BREAKING CHANGE: deparam now rejects prototype-pollution keys and caps nesting depth at maxDepth (default 5). Both behaviors are pinned by the new conformance spec.
edwardsmit
added a commit
that referenced
this pull request
May 20, 2026
* feat!: prepare 1.0.0 baseline with CVE-shape patches and CI Phase 0 of the modernization plan. Today's code with the minimum patches to be CVE-clean on the original install target. Security: - Reject deparam parameter keys equal to __proto__, constructor, or prototype (prototype-pollution mitigation; same shape as qs CVE-2017-1000048 / CVE-2022-24999). - New maxDepth parameter on deparam (default 5) caps nesting depth; parameters exceeding it are silently dropped. Tooling: - Consolidate MIT-LICENSE.txt + jquery-MIT-LICENSE.txt + deparam-LICENSE into a single LICENSE with full attribution. - Add SECURITY.md disclosure policy. - Add .github/workflows/ci.yml: full mocha suite on Node 18/20/22/24 via setup-node, smoke test on Node 0.10/0.12/4/6/8/10/12/14/16 via Docker (native amd64 on Ubuntu runners), npm audit job. - Declare engines >=0.10 in package.json, add files allowlist, update homepage/bugs URLs. Tests: - Add test/conformance.spec.js: Reference Conformance Spec (58 cases) capturing the wire-format and security contract for future modernization phases and any replacement library. - Add test/smoke-floor.js: assertion-only smoke test (no chai/mocha transitive dependencies) that runs on ancient Node versions in CI. BREAKING CHANGE: deparam now rejects prototype-pollution keys and caps nesting depth at maxDepth (default 5). Both behaviors are pinned by the new conformance spec. * chore: commit package-lock.json for reproducible installs --------- Co-authored-by: Edward Smit <edwardsmit@xs4all.nl>
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
First phase of the modernization plan. Today's code, packaged honestly, with the minimum patches to be CVE-clean on the original install target (Node 0.10+).
deparamnow rejects__proto__/constructor/prototypekeys and caps nesting depth atmaxDepth(default 5)engines >=0.10,filesallowlistTest plan
testjob green on Node 18/20/22/24 (full mocha suite, 82 tests)floorjob green on Node 0.10 through 16 (smoke-floor.js, 28 assertions)auditjob reports zero runtime vulnerabilitiesnpm publishNotes
package-lock.jsonis intentionally not committed pending the lockfile-policy decision.BREAKING CHANGEfor any caller passing prototype-polluting keys or relying on >5-deep nested parameters; documented in the conformance spec.