feat: add automated fuzzing with Jazzer.js#2119
Open
biplavbarua wants to merge 2 commits intohandlebars-lang:masterfrom
Open
feat: add automated fuzzing with Jazzer.js#2119biplavbarua wants to merge 2 commits intohandlebars-lang:masterfrom
biplavbarua wants to merge 2 commits intohandlebars-lang:masterfrom
Conversation
Member
|
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 |
Author
|
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. |
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.
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