added support & unit-tests for more fuzzing parts #4610
Closed
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.
Proposed changes
I have added support for specifying more parts in the fuzzing templates. This is in reference to Issue #4113
This PR includes code changes and unit-tests related to:
and
Behavior Explanation
When
http[].fuzzing[].part
in the specified template is set tobody
, appropriate request body fuzzing shall be applied depending on whetherContent-Type: application/x-www-form-urlencoded
orContent-Type: application/json
or/graphql
overContent-Type: application/json
.When
http[].fuzzing[].part
in the specified template is set toall
, fuzzing behavior shall occur as per expectation whenpart: query
andpart: headers
along with request body fuzzing (as described above) in the order: Query Parameters then Header Values finally Body.URL Encoded bodies
Supported
JSON bodies
All nested values (Arrays & Objects nested within Arrays & Objects) of type
string
are considered for fuzzing (either at parallelly or sequentially depending on the existingsingle
ormultiple
mode) and all other types such as boolean, numbers etc. are ignored.Supported
GraphQL bodies
Requests with
Content-Type: application/graphql
is not supported in this PR. Only requests with path/graphql
,Content-Type: application/json
and request body having referenced variables i.e..variables
are supported in this PR.Supported
Not-yet supported
Checklist