📌 Description
src/middleware/queryParser.ts and src/services/queryParser.ts translate
request query strings into filters. There is no dedicated test proving they
reject __proto__/constructor keys and unsafe operator injection. A gap here
could allow prototype pollution or filter-bypass.
This issue adds focused injection and prototype-pollution tests for the query
parser.
Goal: prove the query parser rejects prototype-pollution keys and unsafe
operators while accepting valid filters.
🎯 Requirements and Context
- Must assert
__proto__, constructor, and prototype keys are rejected.
- Must assert unsupported operators and unknown fields are rejected.
- Must assert valid filters still parse correctly.
- Must run with
bun test.
🛠️ Suggested Execution
1. Fork the repo and create a branch
git checkout -b test/queryparser-injection
2. Implement changes
- Add
src/tests/queryParser.injection.test.ts.
3. Test and commit
- Run with
bun test.
- Cover edge cases: pollution keys, unknown field, bad operator, valid filter.
Example commit message
test: queryParser prototype-pollution and injection guards
✅ Guidelines
- Minimum 95% test coverage on the new/changed lines.
- Clear, reviewer-friendly documentation.
- No regressions on existing query parsing.
- Timeframe: 96 hours.
🏷️ Labels
type-testing · type-security · area-backend · MAYBE REWARDED · GRANTFOX OSS · OFFICIAL CAMPAIGN
💬 Community & Support
- Join the Disciplr contributor Discord to coordinate, ask questions, and get
unblocked fast: https://discord.gg/xvNAvMJf
- Please introduce yourself in the channel before you start so we can avoid
duplicate work, pair you with a reviewer, and get your PR merged quickly.
- Maintainers actively triage this channel and aim for fast, clear, respectful
reviews — reach out any time you're blocked.
📌 Description
src/middleware/queryParser.tsandsrc/services/queryParser.tstranslaterequest query strings into filters. There is no dedicated test proving they
reject
__proto__/constructorkeys and unsafe operator injection. A gap herecould allow prototype pollution or filter-bypass.
This issue adds focused injection and prototype-pollution tests for the query
parser.
🎯 Requirements and Context
__proto__,constructor, andprototypekeys are rejected.bun test.🛠️ Suggested Execution
1. Fork the repo and create a branch
2. Implement changes
src/tests/queryParser.injection.test.ts.3. Test and commit
bun test.Example commit message
✅ Guidelines
🏷️ Labels
type-testing·type-security·area-backend·MAYBE REWARDED·GRANTFOX OSS·OFFICIAL CAMPAIGN💬 Community & Support
unblocked fast: https://discord.gg/xvNAvMJf
duplicate work, pair you with a reviewer, and get your PR merged quickly.
reviews — reach out any time you're blocked.