redhatproductsecurity/prodsec-skills/ossfuzz
Claude Code and agent skill by redhatproductsecurity/prodsec-skills
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
OSS-Fuzz provides free continuous fuzzing for open source projects. Use when setting up continuous fuzzing infrastructure or enrolling projects.
Install
npx vskill@latest install redhatproductsecurity/prodsec-skills/ossfuzzSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as redhatproductsecurity/prodsec-skills/ossfuzz.
OSS-Fuzz
OSS-Fuzz is an open-source project developed by Google that provides free distributed infrastructure for continuous fuzz testing. It streamlines the fuzzing process and facilitates simpler modifications. While only select projects are accepted into OSS-Fuzz, the project's core is open-source, allowing anyone to host their own instance for private projects.
Overview
OSS-Fuzz provides a simple CLI framework for building and starting harnesses or calculating their coverage. Additionally, OSS-Fuzz can be used as a service that hosts static web pages generated from fuzzing outputs such as coverage information.
Key Concepts
| Concept | Description | |
|---|---|---|
| helper.py | CLI script for building images, building fuzzers, and running harnesses locally | |
| Base Images | Hierarchical Docker images providing build dependencies and compilers | |
| project.yaml | Configuration file defining project metadata for OSS-Fuzz enrollment | |
| Dockerfile | Project-specific image with build dependencies | |
| build.sh | Script that builds fuzzing harnesses for your project | |
| Criticality Score | Metric used by OSS-Fuzz team to evaluate project acceptance |
When to Apply
Apply this technique when:
- Setting up continuous fuzzing for an open-source project
- Need distributed fuzzing infrastructure without managing servers
- Want coverage reports and bug tracking integrated with fuzzing
- Testing existing OSS-Fuzz harnesses locally
- Reproducing crashes from OSS-Fuzz bug reports
Skip this technique when:
- Project is closed-source (unless hosting your own OSS-Fuzz instance)
- Project doesn't meet OSS-Fuzz's criticality score threshold
- Need proprietary or specialized fuzzing infrastructure
- Fuzzing simple scripts that don't warrant infrastructure
Quick Reference
| Task | Command | |
|---|---|---|
| Clone OSS-Fuzz | git clone https://github.com/google/oss-fuzz | |
| Build project image | python3 infra/helper.py build_image --pull <project> | |
| Build fuzzers with ASan | python3 infra/helper.py build_fuzzers --sanitizer=address <project> | |
| Run specific harness | python3 infra/helper.py run_fuzzer <project> <harness> | |
| Generate coverage report | python3 infra/helper.py coverage <project> | |
| Check helper.py options | python3 infra/helper.py --help |
OSS-Fuzz Project Components
OSS-Fuzz provides several publicly available tools and web interfaces:
Bug Tracker
The bug tracker allows you to:
- Check bugs from specific projects (initially visible only to maintainers, later made public)
- Create new issues and comment on existing ones
- Search for similar bugs across all projects to understand issues
Build Status System
The build status system helps track:
- Build statuses of all included projects
- Date of last successful build
- Build failures and their duration
Fuzz Introspector
Fuzz Introspector displays:
- Coverage data for projects enrolled in OSS-Fuzz
- Hit frequency for covered code
- Performance analysis and blocker identification
Read this case study for examples and explanations.
Step-by-Step: Running a Single Harness
You don't need to host the whole OSS-Fuzz platform to use it. The helper script makes it easy to run individual harnesses locally.
Step 1: Clone OSS-Fuzz
Step 2: Build Project Image
This downloads and builds the base Docker image for the project.
Step 3: Build Fuzzers with Sanitizers
Sanitizer options:
--sanitizer=addressfor AddressSanitizer with LeakSanitizer- Other sanitizers available (language support varies)
Note: Fuzzers are built to /build/out/<project-name>/ containing the harness executables, dictionaries, corpus, and crash files.
Step 4: Run the Fuzzer
The helper script automatically runs any missed steps if you skip them.
Step 5: Coverage Analysis (Optional)
First, install gsutil (skip gcloud initialization).
Use --no-corpus-download to use only local corpus. The command generates and hosts a coverage report locally.
See official OSS-Fuzz documentation for details.
Common Patterns
Pattern: Running irssi Example
Use Case: Testing OSS-Fuzz setup with a simple enrolled project
Expected Output:
Pattern: Enrolling a New Project
Use Case: Adding your project to OSS-Fuzz (or private instance)
Create three files in projects/<your-project>/:
1. project.yaml - Project metadata:
2. Dockerfile - Build dependencies:
3. build.sh - Build harnesses:
Docker Images in OSS-Fuzz
Harnesses are built and executed in Docker containers. All projects share a runner image, but each project has its own build image.
Image Hierarchy
Images build on each other in this sequence:
- [base_image](https://github.com/google/oss-fuzz/blob/master/infra/base-images/base-image/Dockerfile) - Specific Ubuntu version
- [base_clang](https://github.com/google/oss-fuzz/tree/master/infra/base-images/base-clang) - Clang compiler; based on
base_image - [base_builder](https://github.com/google/oss-fuzz/tree/master/infra/base-images/base-builder) - Build dependencies; based on
base_clang
- Language-specific variants: `base_builder_go`, etc.
- See /oss-fuzz/infra/base-images/ for full list
- Your project Docker image - Project-specific dependencies; based on
base_builderor language variant
Runner Images (Used Separately)
- [base_runner](https://github.com/google/oss-fuzz/tree/master/infra/base-images/base-runner) - Executes harnesses; based on
base_clang - [base_runner_debug](https://github.com/google/oss-fuzz/tree/master/infra/base-images/base-runner-debug) - With debug tools; based on
base_runner
Advanced Usage
Tips and Tricks
| Tip | Why It Helps | |
|---|---|---|
| Don't manually copy source code | Project Dockerfile likely already pulls latest version | |
| Check existing projects | Browse oss-fuzz/projects for examples | |
| Keep harnesses in separate repo | Like curl-fuzzer - cleaner organization | |
| Use specific compiler versions | Base images provide consistent build environment | |
| Install dependencies in Dockerfile | May require approval for OSS-Fuzz enrollment |
Criticality Score
OSS-Fuzz uses a criticality score to evaluate project acceptance. See this example for how scoring works.
Projects with lower scores may still be added to private OSS-Fuzz instances.
Hosting Your Own Instance
Since OSS-Fuzz is open-source, you can host your own instance for:
- Private projects not eligible for public OSS-Fuzz
- Projects with lower criticality scores
- Custom fuzzing infrastructure needs
Anti-Patterns
| Anti-Pattern | Problem | Correct Approach | |
|---|---|---|---|
| Manually pulling source in build.sh | Doesn't use latest version | Let Dockerfile handle git clone | |
| Copying code to OSS-Fuzz repo | Hard to maintain, violates separation | Reference external harness repo | |
| Ignoring base image versions | Build inconsistencies | Use provided base images and compilers | |
| Skipping local testing | Wastes CI resources | Use helper.py locally before PR | |
| Not checking build status | Unnoticed build failures | Monitor build status page regularly |
Tool-Specific Guidance
libFuzzer
OSS-Fuzz primarily uses libFuzzer as the fuzzing engine for C/C++ projects.
Harness signature:
Build in build.sh:
Integration tips:
- Use
$LIB_FUZZING_ENGINEvariable provided by OSS-Fuzz - Include
-fsanitize=fuzzeris handled automatically - Link against static libraries when possible
AFL++
OSS-Fuzz supports AFL++ as an alternative fuzzing engine.
Enable in project.yaml:
Integration tips:
- AFL++ harnesses work alongside libFuzzer harnesses
- Use persistent mode for better performance
- OSS-Fuzz handles engine-specific compilation flags
Atheris (Python)
For Python projects with C extensions.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingmodule/skills/ossfuzz/SKILL.md
Popularity
- Repository stars
- 49
- Repository forks
- 6
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 21 Aug 2026, 3 months ago.
Extension points
configConfiguration overrides
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/redhatproductsecurity/prodsec-skills/ossfuzz)