feat: add automated fuzzing with Jazzer.js#2119
feat: add automated fuzzing with Jazzer.js#2119biplavbarua wants to merge 2 commits intohandlebars-lang:masterfrom
Conversation
|
Thanks for the PR. There is already a very good PR from @manunio that adds jazzer: #2022 I didn't merge this back then because I wanted to make sure that the fuzzing integration actually finds injection bugs (like prototype pollution). If you can configure the inputs and the fuzzer to find this previously fixed security issue (with the security patch removed), I'll merge it: #1736 |
|
I've updated the fuzzer configuration to detect the prototype pollution issue (finding 'function' signatures or 'Object' type leaks in output). I also added a regression seed 'fuzz/corpus/prototype_pollution_seed' which demonstrates the detection (it triggers a finding if the fix is removed, and passes with the fix present). Please verify. |
|
I just committed a few security fixes: 68d8df5 Would be interesting to see if the fuzzer could have found any of those with a little bit of help. |
Add automated fuzzing with Jazzer.js
Description
This PR adds automated fuzzing infrastructure using Jazzer.js, addressing Issue #1999.
Fuzzing helps uncover edge cases and security vulnerabilities (such as ReDoS or crashes) by continuously testing the
Handlebars.compilefunction with random, coverage-guided inputs.Changes
@jazzer.js/core(v2.1.0).fuzz/fuzz_compile.jswhich targets thecompilefunction.npm run fuzzcommand.Verification
Ran the fuzzer locally:
Result:
The fuzzer runs successfully.
Fixes #1999