fuzzing-jvm-expert
Skill13k starsChanged 10 months agoApache-2.0View on GitHub
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. JVM projects must use the JVM base builder image: Set language: jvm in project.yaml. The simplest Jazzer harness receives raw bytes via fuzzerTestOneInput: FuzzedDataProvider splits the raw byte stream into typed values, which is essential for targets that require…
Trending
Quiet since June.about the whole repository
Who's talking about google/oss-fuzz
- A Hacker News story“OSS-Fuzz – Continuous Fuzzing for Open Source Software”Hacker News · Mar 1, 2018 · 74 points
- rust-lang/rust“proposal: make fuzzing a first class citizen”GitHub · Feb 17, 2017 · 70 reactions
- godotengine/godot-proposals“Add Godot Engine to oss-fuzz”GitHub · Oct 19, 2019 · 23 reactions
- @graemerocher.bsky.social“Some tremendous work by @yawk.at happening at github.com/micronaut-pr... Thanks to OSSFuzz billions of fuzz …”Bluesky · Jan 30, 2025 · 18 likes
- A Hacker News story“Xz: Disable ifunc to fix Issue 60259”Hacker News · Mar 29, 2024 · 18 points
The biggest 5 of 33 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 33
Talked about on GitHub, Hacker News and Bluesky (33 times).
On GitHub · 21
- Feb 17, 2017proposal: make fuzzing a first class citizen — rust-lang/rust70 reactions · 8 comments
- Oct 19, 2019Add Godot Engine to oss-fuzz — godotengine/godot-proposals23 reactions · 9 comments
- Oct 24, 2023Multiprocess tracking issue — bitcoin/bitcoin12 reactions · 2 comments
- Dec 3, 2020Added 2 fuzzers — go-gitea/gitea8 reactions · 21 comments
- Apr 22, 2024Node.js Security team Meeting 2024-04-25 — nodejs/security-wg6 reactions · 1 comment
16 more on GitHub
- Jan 15, 2024Node.js Security team Meeting 2024-01-18 — nodejs/security-wg6 reactions · 1 comment
- Dec 18, 2023Node.js Security team Meeting 2023-12-21 — nodejs/security-wg6 reactions · 2 comments
- Apr 8, 2024Fuzzing — envoyproxy/gateway5 reactions · 11 comments
- Jul 25, 2017have a go with oss-fuzz — libvips/libvips5 reactions · 10 comments
- May 20, 2024Node.js Security team Meeting 2024-05-23 — nodejs/security-wg4 reactions
- May 6, 2024Node.js Security team Meeting 2024-05-09 — nodejs/security-wg4 reactions
- Mar 25, 2024Node.js Security team Meeting 2024-03-28 — nodejs/security-wg4 reactions · 2 comments
- Mar 11, 2024Node.js Security team Meeting 2024-03-14 — nodejs/security-wg4 reactions · 3 comments
- Jan 29, 2024Node.js Security team Meeting 2024-02-01 — nodejs/security-wg4 reactions · 3 comments
- Dec 4, 2023Node.js Security team Meeting 2023-12-07 — nodejs/security-wg4 reactions · 2 comments
- Nov 4, 2022moving quic-go to its own org: quic-go/quic-go — quic-go/quic-go4 reactions · 16 comments
- Nov 24, 2020Continuous fuzzing by way of OSS-Fuzz integration — SerenityOS/serenity4 reactions · 18 comments
- Apr 13, 2020Integrating with OSS-Fuzz — bitcoin-core/secp256k14 reactions · 19 comments
- Mar 31, 2020Fuzzing Lua (LuaJit) in Tarantool — tarantool/tarantool4 reactions · 5 comments
- Jun 10, 2026OSS-Fuzz issue 522117389 — google/flatbuffers3 reactions
- Apr 8, 2026Support TSAN — tarantool/tarantool3 reactions · 4 comments
On Hacker News · 10
- Mar 1, 2018OSS-Fuzz – Continuous Fuzzing for Open Source Software74 points · 5 comments
- Mar 29, 2024Xz: Disable ifunc to fix Issue 6025918 points · 2 comments
- Jul 10, 2023Fixed Spelling Errors or Typos12 points · 3 comments
- Dec 6, 2022OSS-Fuzz – continuous fuzzing for open source software3 points · 1 comment
- Oct 31, 2016Google releases oss-fuzz: continuous fuzzing of open source software3 points
5 more on Hacker News
- Nov 28, 2017OSS-Fuzz2 points
- May 13, 2017OSS-Fuzz – continuous fuzzing of open source software2 points
- Nov 1, 2016Oss-fuzz: continuous fuzzing of open source software2 points
- Dec 2, 2016OSS-Fuzz – Continuous Fuzzing for Open Source Software1 point
- Oct 13, 2016Applying coverage-guided fuzzing on scale to Open Source Software1 point
On Bluesky · 2
- Jan 30, 2025Some tremendous work by @yawk.at happening at github.com/micronaut-pr... Thanks to OSSFuzz billions of fuzz tests (yes billions!) are being… — @graemerocher.bsky.social18 likes and reposts
- Mar 11, 2021Include a comprehensive test suite with test archives with the code. Add the project to OSS-Fuzz (https://github.com/google/oss-fuzz). I… — @admvonschneider.bsky.social0 likes and reposts · 1 reply
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- fuzzing-go-expertSkill
- fuzzing-memory-unsafe-expertSkill
- fuzzing-python-expertSkill
- fuzzing-rust-expertSkill
- oss-fuzz-engineerSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 85
If initialisation is expensive (loading config, creating DB connections, etc.), put it in an optional static method that Jazzer calls once …
- Very specific: line 145
Place dictionaries at $OUT/<fuzzer_name>.dict.
- Very specific: line 167
Configures JVM memory appropriately: use the mem_settings pattern shown above to avoid OOM kills during runs vs.
- Very specific: line 201
When iterating locally clone the upstream repo and switch the Dockerfile from RUN git clone to COPY to avoid network round-trips.
- Distinctive: line 203
Document why each entry point was chosen and what class of bugs it may find.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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:
FROM gcr.io/oss-fuzz-base/base-builder-jvmSet language: jvm in project.yaml.
Harness structure — raw bytes
The simplest Jazzer harness receives raw bytes via fuzzerTestOneInput:
import com.code_intelligence.jazzer.api.FuzzedDataProvider;
public class MyTargetFuzzer {
public static void fuzzerTestOneInput(byte[] data) {
try {
MyLibrary.parse(data);
} catch (ExpectedExceptionType e) {
// Ignore expected exceptions; they are not bugs.
}
}
}Harness structure — typed input via FuzzedDataProvider
FuzzedDataProvider splits the raw byte stream into typed values, which is
essential for targets that require structured input:
import com.code_intelligence.jazzer.api.FuzzedDataProvider;
public class MyTargetFuzzer {
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
String header = data.consumeString(64);
int version = data.consumeInt();
byte[] payload = data.consumeRemainingAsBytes();
try {
MyLibrary.process(header, version, payload);
} catch (IllegalArgumentException | IOException e) {
// Expected — not a finding.
}
}
}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:
public class MyTargetFuzzer {
private static MyClient client;
public static void fuzzerInitialize() {
client = new MyClient(/* static config */);
}
public static void fuzzerTestOneInput(FuzzedDataProvider data) {
client.process(data.consumeRemainingAsBytes());
}
}Building in OSS-Fuzz
The build.sh pattern for Maven projects:
# Build the project JARs.
$MVN package -DskipTests -Dmaven.javadoc.skip=true
# Collect JARs needed at runtime.
ALL_JARS="mylib-1.0.jar"
BUILD_CLASSPATH=$(echo $ALL_JARS | xargs printf -- "$OUT/%s:"):$JAZZER_API_PATH
RUNTIME_CLASSPATH=$(echo $ALL_JARS | xargs printf -- "\$this_dir/%s:"):\$this_dir
for fuzzer in $(find $SRC -maxdepth 1 -name '*Fuzzer.java'); do
fuzzer_basename=$(basename -s .java "$fuzzer")
javac -cp $BUILD_CLASSPATH "$fuzzer"
cp $SRC/$fuzzer_basename.class $OUT/
# Wrapper script that launches jazzer_driver with the right arguments.
echo "#!/bin/bash
this_dir=\$(dirname \"\$0\")
if [[ \"\$@\" =~ (^| )-runs=[0-9]+($| ) ]]; then
mem_settings='-Xmx1900m:-Xss900k'
else
mem_settings='-Xmx2048m:-Xss1024k'
fi
LD_LIBRARY_PATH=\"$JVM_LD_LIBRARY_PATH\":\$this_dir \\
\$this_dir/jazzer_driver --agent_path=\$this_dir/jazzer_agent_deploy.jar \\
--instrumentation_includes=com.example.** \\
--cp=$RUNTIME_CLASSPATH \\
--target_class=$fuzzer_basename \\
--jvm_args=\"\$mem_settings\" \\
\$@" > $OUT/$fuzzer_basename
chmod u+x $OUT/$fuzzer_basename
doneFor 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
FuzzedDataProviderfor 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_includesto 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, andNullPointerExceptionon invalid input are usually expected — decide which are genuine bugs for this project.
What JVM fuzzing finds
- Unexpected exceptions:
NullPointerException,ArrayIndexOutOfBoundsException,ClassCastException,NumberFormatExceptionon 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_buildoutput carefully. - Build the project outside the fuzzing harness first (
mvn packageorgradle build) to ensure the project itself compiles cleanly. - When iterating locally clone the upstream repo and switch the Dockerfile from
RUN git clonetoCOPYto avoid network round-trips. - Document why each entry point was chosen and what class of bugs it may find.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

