Repository navigation
fix: ensure AddRequestMutator uses appropriate ParameterContents for parameters - #317
Merged
grebnetiew merged 11 commits intoJun 23, 2026
Merged
Conversation
β¦parameters The AddRequestMutator was inserting raw bytes for all parameters, which is incorrect for non-bytes parameters (e.g., strings, numbers). This change ensures that parameters are given a default string value (from random bytes) when their type is not explicitly bytes, aligning with the ParameterContents enum variants. This addresses issue #19: \"AddRequestMutator inserts bytes instead of correct type of data\".
ThomasTNO
reviewed
May 26, 2026
Member
|
Thanks @DC925928496, I cleaned your commit. Furthermore: The fix is partially correct but incomplete. What it fixes: What it doesn't fix:
|
Member
|
Suggested an alternative fix |
ThomasTNO
approved these changes
Jun 9, 2026
grebnetiew
approved these changes
Jun 23, 2026
grebnetiew
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me! Thanks for spotting this.
grebnetiew
enabled auto-merge (squash)
June 23, 2026 10:45
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.
Problem
The
AddRequestMutatorwas inserting raw bytes (ParameterContents::Bytes) for all parameters, regardless of their actual type. This is incorrect for non-bytes parameters (e.g., strings, numbers) because the fuzzer expects parameters to match their specified type (e.g., a string parameter should be aLeafValue(String)). This could lead to type mismatches when the fuzzer attempts to use the parameter values in requests.Fix
Changed the mutator to generate appropriate default values for parameters:
ParameterContents::LeafValue(SimpleValue::String(s)).bytes_b64), we keep the existing behavior of usingParameterContents::Bytes.This ensures that the fuzzer inserts data of the correct type for each parameter, aligning with the
ParameterContentsenum variants.Related Issues
Fixes #19