google/oss-fuzz/fuzzing-jvm-expert
Claude Code and agent skill by google/oss-fuzz
- vendor
Checking that the SKILL.md file is still in the repository.
Use this skill to fuzz open source JVM projects (Java, Kotlin, Scala, etc.) using Jazzer.
Install
npx vskill@latest install google/oss-fuzz/fuzzing-jvm-expertSKILL.md
Fuzzing JVM expert
This skill provides the agent with the knowledge and tools to write, build, and validate fuzz targets for JVM-based projects (Java, Kotlin, Scala, Groovy) integrated into OSS-Fuzz. JVM fuzzing uses Jazzer, which wraps libFuzzer and instruments JVM bytecode for coverage guidance.
Fundamental Concepts
OSS-Fuzz base image
JVM projects must use the JVM base builder image:
Set language: jvm in project.yaml.
Harness structure — raw bytes
The simplest Jazzer harness receives raw bytes via fuzzerTestOneInput:
Harness structure — typed input via FuzzedDataProvider
FuzzedDataProvider splits the raw byte stream into typed values, which is essential for targets that require structured input:
Useful FuzzedDataProvider methods:
| Method | Description | |
|---|---|---|
consumeBytes(n) | byte[] of length n | |
consumeRemainingAsBytes() | all remaining bytes | |
consumeString(maxLen) | arbitrary String | |
consumeAsciiString(maxLen) | ASCII-only String | |
consumeInt() / consumeInt(min, max) | int | |
consumeLong() | long | |
consumeBoolean() | boolean | |
consumeDouble() | double | |
pickValue(collection) | random element |
One-time setup with fuzzerInitialize
If initialisation is expensive (loading config, creating DB connections, etc.), put it in an optional static method that Jazzer calls once before fuzzing:
Building in OSS-Fuzz
The build.sh pattern for Maven projects:
For Gradle projects replace $MVN package with the appropriate Gradle command and adjust JAR paths accordingly.
Seed corpus and dictionaries
- Zip seed files to
$OUT/<fuzzer_name>_seed_corpus.zip. - Place dictionaries at
$OUT/<fuzzer_name>.dict. - For targets that parse a structured format, generating seeds with a script
beats hand-picking a few files — random mutation rarely passes the parser's early checks. See the structured seed generation reference.
Characteristics of good JVM fuzzing harnesses
- Targets attack surface: parsers, deserializers (JSON, XML, Protobuf,
custom binary formats), network protocol handlers, template engines, and any API that accepts untrusted bytes or strings.
- Catches expected exceptions: wrap calls in
try/catchfor all
documented exception types. Only unexpected exceptions and crashes are findings.
- Uses `FuzzedDataProvider` for structured input rather than passing raw
bytes to methods that expect well-formed data.
- Initialises heavy state in `fuzzerInitialize`: client connections,
parsers with complex configuration, and loaded schemas should be set up once.
- Avoids non-determinism: no
Math.random(), noSystem.currentTimeMillis()
in the fuzzing path, no thread spawning.
- Sets `--instrumentation_includes` to the package prefix of the target
library in the wrapper script — without this Jazzer cannot guide fuzzing.
- Configures JVM memory appropriately: use the
mem_settingspattern
shown above to avoid OOM kills during runs vs. crash reproduction.
- Avoids false positives:
OutOfMemoryError,StackOverflowError, and
NullPointerException on invalid input are usually expected — decide which are genuine bugs for this project.
What JVM fuzzing finds
- Unexpected exceptions:
NullPointerException,ArrayIndexOutOfBoundsException,
ClassCastException, NumberFormatException on paths that should not throw.
- Assertion errors and contract violations: internal consistency checks
that fail on adversarial input.
- Hang / infinite loops: detected by OSS-Fuzz's timeout.
- Security bugs: deserialization gadgets, path traversal via crafted
filenames, SSRF via crafted URLs — depends on the library.
- Logic bugs: incorrect output for valid-ish input.
Jazzer can also detect:
- SQL injection (via JDBC hooks)
- Path traversal (via file API hooks)
- Command injection (via
Runtime.exechooks)
Operational guidelines
- Always validate with:
`` python3 infra/helper.py build_fuzzers <project> python3 infra/helper.py check_build <project> python3 infra/helper.py run_fuzzer <project> <fuzzer_name> -- -max_total_time=30 ``
- An instant crash usually means a missing JAR on the classpath or an
uncaught expected exception — check check_build output carefully.
- Build the project outside the fuzzing harness first (
mvn packageor
gradle build) to ensure the project itself compiles cleanly.
- When iterating locally clone the upstream repo and switch the Dockerfile from
RUN git clone to COPY to avoid network round-trips.
- Document why each entry point was chosen and what class of bugs it may find.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 1 Oct 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinginfra/experimental/agent-skills/fuzzing-jvm-expert/SKILL.md
Popularity
- Repository stars
- 12,684
- Repository forks
- 2,913
- 7-day trend score
- 47
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/google/oss-fuzz/fuzzing-jvm-expert)