Skip to content

fuzz: Fix breadth first handling#7369

Open
kingthorin wants to merge 3 commits into
zaproxy:mainfrom
kingthorin:fuzz-breadth-depth
Open

fuzz: Fix breadth first handling#7369
kingthorin wants to merge 3 commits into
zaproxy:mainfrom
kingthorin:fuzz-breadth-depth

Conversation

@kingthorin

@kingthorin kingthorin commented May 19, 2026

Copy link
Copy Markdown
Member

Overview

  • Fix multi-location breadth payload combination (was incorrectly using depth-first-style iteration).
  • Rename strategies to Cluster Bomb and Pitchfork in code, UI, help, and tests; keep legacy depth/breadth config values working.
  • Update WebSockets fuzz handler for renamed Fuzzer replacer classes. (Build file was previously updated.)

From the payload lists 1,2,3 and a,b,c Pitchfork produces:
image

Related Issues

AI Disclosure

Cursor was used in the preparation of this change/PR.

@kingthorin
kingthorin marked this pull request as draft May 19, 2026 14:54
@psiinon

psiinon commented May 19, 2026

Copy link
Copy Markdown
Member

Logo
Checkmarx One – Scan Summary & Details8511e4a1-54c0-4d7e-8796-4aeca3fdbf97

Great job! No new security vulnerabilities introduced in this pull request


Use @Checkmarx to interact with Checkmarx PR Assistant.
Examples:
@Checkmarx how are you able to help me?
@Checkmarx rescan this PR

@kingthorin
kingthorin force-pushed the fuzz-breadth-depth branch from d97b65b to eacefd6 Compare May 19, 2026 15:34
@kingthorin
kingthorin marked this pull request as ready for review May 19, 2026 15:35
@thc202

thc202 commented May 19, 2026

Copy link
Copy Markdown
Member

This is just inverting depth not changing to breadth.

@kingthorin

This comment was marked as outdated.

@thc202

thc202 commented May 19, 2026

Copy link
Copy Markdown
Member

1a 2b 3c

@kingthorin
kingthorin force-pushed the fuzz-breadth-depth branch from eacefd6 to 8024737 Compare May 20, 2026 13:41
@kingthorin kingthorin changed the title fuzz: Fix breadth/depth handling fuzz: Remove breadth-first UI and migrate config May 20, 2026
@kingthorin
kingthorin force-pushed the fuzz-breadth-depth branch from 8024737 to 39cff9b Compare May 20, 2026 13:42
@thc202

thc202 commented May 20, 2026

Copy link
Copy Markdown
Member

Hide the UI components instead of removing all the code, the migration is also not needed, they behave the same.

@kingthorin
kingthorin force-pushed the fuzz-breadth-depth branch from 39cff9b to 6ad37b9 Compare May 20, 2026 13:58
@kingthorin kingthorin changed the title fuzz: Remove breadth-first UI and migrate config fuzz: Remove (hide) strategy UI components May 20, 2026
@kingthorin
kingthorin force-pushed the fuzz-breadth-depth branch from 6ad37b9 to d63851b Compare May 20, 2026 14:04
@kingthorin

This comment was marked as outdated.

@kingthorin
kingthorin marked this pull request as draft May 20, 2026 17:45
@kingthorin

This comment was marked as outdated.

@kingthorin
kingthorin marked this pull request as ready for review May 21, 2026 10:01
@kingthorin

This comment was marked as outdated.

@kingthorin
kingthorin force-pushed the fuzz-breadth-depth branch from d63851b to 1e06a97 Compare May 27, 2026 23:46
@kingthorin kingthorin changed the title fuzz: Remove (hide) strategy UI components fuzz: Fix breadth first handling May 27, 2026
Comment thread addOns/websocket/CHANGELOG.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the fuzzing payload-combination strategies to align with common “Cluster Bomb” and “Pitchfork” semantics, fixes multi-location iteration order, and propagates the renames through handlers, UI, help, and tests across the fuzz and websocket add-ons.

Changes:

  • Fix multi-location payload combination for the (formerly breadth-first) strategy by implementing Pitchfork lockstep iteration.
  • Rename payload replacement strategies to Cluster Bomb and Pitchfork, while keeping legacy config values (depth/breadth) working.
  • Update HTTP/WebSocket fuzzer handlers, UI labels, help content, and add unit coverage for the new strategies.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
addOns/websocket/src/main/java/org/zaproxy/zap/extension/websocket/fuzz/WebSocketFuzzerHandler.java Switch strategy wiring to the renamed multi-location replacers.
addOns/websocket/CHANGELOG.md Document websocket add-on update for renamed strategy handling.
addOns/fuzz/src/test/java/org/zaproxy/zap/extension/fuzz/messagelocations/MultipleMessageLocationsReplacerUnitTest.java Add unit tests covering iteration order and replacement-count behavior for both strategies.
addOns/fuzz/src/main/resources/org/zaproxy/zap/extension/fuzz/resources/Messages.properties Update base i18n keys/labels to “Cluster Bomb” and “Pitchfork”.
addOns/fuzz/src/main/javahelp/org/zaproxy/zap/extension/fuzz/resources/help/contents/options.html Expand help text with definitions/examples for Cluster Bomb vs Pitchfork behavior.
addOns/fuzz/src/main/java/org/zaproxy/zap/extension/fuzz/messagelocations/MultipleMessageLocationsPitchforkReplacer.java Rename and rework the former breadth-first replacer to implement Pitchfork lockstep iteration and count semantics.
addOns/fuzz/src/main/java/org/zaproxy/zap/extension/fuzz/messagelocations/MultipleMessageLocationsClusterBombReplacer.java Rename the former depth-first replacer to Cluster Bomb.
addOns/fuzz/src/main/java/org/zaproxy/zap/extension/fuzz/messagelocations/MessageLocationsReplacementStrategy.java Rename enum values/config ids and add legacy mapping for old config values.
addOns/fuzz/src/main/java/org/zaproxy/zap/extension/fuzz/impl/FuzzerOptionsPanel.java Update UI radio buttons and selection logic for renamed strategies.
addOns/fuzz/src/main/java/org/zaproxy/zap/extension/fuzz/httpfuzzer/HttpFuzzerHandler.java Switch strategy wiring to the renamed multi-location replacers.
addOns/fuzz/src/main/java/org/zaproxy/zap/extension/fuzz/FuzzOptionsPanel.java Update options panel to save/load the renamed strategy values.
addOns/fuzz/src/main/java/org/zaproxy/zap/extension/fuzz/FuzzOptions.java Update default strategy config id to the renamed value.
addOns/fuzz/CHANGELOG.md Document the strategy rename and the multi-location Pitchfork fix in the fuzz add-on changelog.
Comments suppressed due to low confidence (1)

addOns/fuzz/src/main/java/org/zaproxy/zap/extension/fuzz/messagelocations/MultipleMessageLocationsPitchforkReplacer.java:65

  • listCurrentReplacements is sized from the original generator set, but only indices [0..replacementGenerators.size()) are ever populated. If any generator is skipped during init (e.g. mlr.hasNext() is false), the array will retain nulls and currentReplacements.addAll(Arrays.asList(listCurrentReplacements)) will throw a NullPointerException. Also, numberOfReplacements currently computes the min of known sizes even if any generator reports UNKNOWN, which can misreport totals; if any generator is UNKNOWN the result should remain UNKNOWN.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kingthorin
kingthorin force-pushed the fuzz-breadth-depth branch from 7b7a3e7 to 51abccc Compare July 6, 2026 15:05
@kingthorin
kingthorin force-pushed the fuzz-breadth-depth branch from 51abccc to 51a3957 Compare July 16, 2026 12:25
Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
@kingthorin
kingthorin force-pushed the fuzz-breadth-depth branch from 51a3957 to 1a048ad Compare July 17, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants