Skip to content

refactor: migrate fuzzing container to ContFuzzer v2 interface#22178

Open
randyquaye wants to merge 1 commit intonextfrom
rq/contfuzzer-v2-container-compat
Open

refactor: migrate fuzzing container to ContFuzzer v2 interface#22178
randyquaye wants to merge 1 commit intonextfrom
rq/contfuzzer-v2-container-compat

Conversation

@randyquaye
Copy link
Copy Markdown
Collaborator

Summary

  • Replaces v1 CLI-flag interface (--fuzzer, --mode, --asm) with v2 env-var contract (FUZZ_TARGET, FUZZ_MODE, FUZZ_JOBS, etc.)
  • Flattens all variant binaries into /targets/<name>[_suffix] so each variant is an independent schedulable target
  • New merge_fuzzer_manifests_v2.py outputs schema v2 manifest for ORAS discovery
  • Entrypoint handles all 4 modes: fuzz, coverage, minimize, reproduce

Files changed

File What
container-builds/fuzzing-container/src/Dockerfile v2 manifest generation, /targets/ flattening, ENTRYPOINT
container-builds/fuzzing-container/src/Dockerfile.private Same changes as above (private repo variant)
container-builds/fuzzing-container/src/entrypoint.sh Rewritten for env-var interface
container-builds/fuzzing-container/run.sh Updated local runner (--target flag, env vars)
barretenberg/cpp/scripts/merge_fuzzer_manifests_v2.py New: schema v2 manifest generator
barretenberg/cpp/scripts/merge_fuzzer_manifests.py Deleted (v1)

Test plan

  • Build image: cd container-builds/fuzzing-container && docker build src/ -t bb-fuzz
  • List targets: docker run --rm bb-fuzz ls /targets/
  • Fuzz locally: ./run.sh --target <name> --mode fuzz --timeout 60
  • Coverage: ./run.sh --target <name> --mode coverage
  • Verify manifest: docker run --rm bb-fuzz cat fuzzer_manifest.json | python3 -m json.tool

🤖 Generated with Claude Code

@randyquaye randyquaye force-pushed the rq/contfuzzer-v2-container-compat branch from 0b25eb9 to 4e49196 Compare April 1, 2026 09:04
@randyquaye randyquaye changed the title WIP: migrate fuzzing container to ContFuzzer v2 interface refactor: migrate fuzzing container to ContFuzzer v2 interface Apr 1, 2026
@randyquaye randyquaye force-pushed the rq/contfuzzer-v2-container-compat branch from 97362b9 to 57cf84f Compare April 7, 2026 16:59
@randyquaye randyquaye marked this pull request as ready for review April 7, 2026 17:55
@randyquaye randyquaye requested a review from charlielye as a code owner April 7, 2026 17:55
@randyquaye randyquaye force-pushed the rq/contfuzzer-v2-container-compat branch 3 times, most recently from 14f44de to f7e28c5 Compare April 8, 2026 20:12
Copy link
Copy Markdown
Contributor

@Sarkoxed Sarkoxed left a comment

Choose a reason for hiding this comment

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

LGTM

@randyquaye randyquaye force-pushed the rq/contfuzzer-v2-container-compat branch from f7e28c5 to 704e7fa Compare April 9, 2026 21:35
Overhaul the fuzzing container to comply with the ContFuzzer v2
platform contract. Key changes:

- Entrypoint rewritten to honour FUZZ_MODE (fuzz | reproduce | coverage),
  FUZZ_TARGET, FUZZ_DURATION, FUZZ_WORKERS, FUZZ_MEMORY, FUZZ_CORPUS_DIR,
  FUZZ_CRASH_FILE, and FUZZ_OUTPUT_DIR environment variables.
- Coverage mode exports LCOV and llvm-cov JSON directly (no Python shim).
- Corpus merge hardened with single-thread defaults, logging, and restore.
- Fuzzer manifest generated from CMake targets instead of a hardcoded list.
- AVM-specific fuzzers scheduled only from the fuzzing-avm preset.
- Dockerfiles updated for non-root execution (CRS moved to /opt/bb-crs,
  source tree world-readable, home dir traversable by UID 65534).
- CI workflows use standard OCI labels and contfuzzer ORAS artifact type.
@randyquaye randyquaye force-pushed the rq/contfuzzer-v2-container-compat branch from 704e7fa to 04efbb8 Compare April 12, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants