ossfuzz
它能做什么
这项技能为开源项目准备 OSS-Fuzz,并在本地运行其辅助工具。适合想获得免费持续模糊测试、并需要帮助复现漏洞报告的开源维护者。
适用场景
- ✓你维护一个开源项目,并希望获得 OSS-Fuzz 的持续模糊测试时。
- ✓你收到了 OSS-Fuzz 的漏洞报告,需要在自己的电脑上复现崩溃时。
- ✓你想在提交 OSS-Fuzz 构建之前先在本地测试它时。
技能链接
https://github.com/trailofbits/skills/blob/main/plugins/testing-handbook-skills/skills/ossfuzz/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“你能帮我把我的开源 C 库加入 OSS-Fuzz,并先在我的电脑上测试构建吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会编写项目文件,例如项目配置、Dockerfile 和构建脚本,然后使用 OSS-Fuzz 的辅助工具在本地构建并运行测试驱动。复现崩溃的步骤与此相同。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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 | uv run --no-project python infra/helper.py build_image --pull <project> |
| Build fuzzers with ASan | uv run --no-project python infra/helper.py build_fuzzers --sanitizer=address <project> |
| Run specific harness | uv run --no-project python infra/helper.py run_fuzzer <project> <harness> |
| Generate coverage report | uv run --no-project python infra/helper.py coverage <project> |
| Check helper.py options | uv run --no-project python 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
git clone https://github.com/google/oss-fuzz
cd oss-fuzz
uv run --no-project python infra/helper.py --help
Step 2: Build Project Image
uv run --no-project python infra/helper.py build_image --pull <project-name>
This downloads and builds the base Docker image for the project.
Step 3: Build Fuzzers with Sanitizers
uv run --no-project python infra/helper.py build_fuzzers --sanitizer=address <project-name>
Sanitizer options:
--sanitizer=addressfor AddressSanitizer with LeakSanitizer- Other sanit
常见问题
OSS-Fuzz 是免费的吗?
该技能将其描述为面向开源项目的免费服务,但只接受部分被选中的项目。
我可以自己架设一份吗?
可以。其核心是开源的,因此私有项目可以运行自己的实例。
项目需要哪些文件?
需要一个项目配置文件、一个 Dockerfile 和一个构建脚本,该技能会帮你设置。
详情
作者的原始描述
Enrolls a project in OSS-Fuzz, Google's free continuous fuzzing service for open source, and drives it locally. Covers project.yaml, Dockerfile and build.sh setup, the helper scripts, reproducing OSS-Fuzz crash reports, and the acceptance criteria. Use when setting up continuous fuzzing for an open-source project, reproducing an OSS-Fuzz bug report, or testing an OSS-Fuzz build before submitting it.
repo: trailofbits/skills
热度
- GitHub 星标
- 8.0k
- 排名
- #12722
- 许可证
- CC-BY-SA-4.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
audit-context-building
8.0k帮你的智能体在安全审查之前熟悉一个陌生的代码库,梳理每个函数的假设、保证和依赖关系。
algorand-vulnerability-scanner
8.0k帮你的智能体扫描 TEAL 或 PyTeal 编写的 Algorand 智能合约,检查 11 类常见安全问题,如重新密钥攻击和未校验费用。
audit-prep-assistant
8.0k帮你的智能体为外部安全审查做好代码准备,包括静态分析、测试覆盖、死代码清理和清晰的文档。
cairo-vulnerability-scanner
8.0k帮你的智能体扫描 StarkNet 上的 Cairo 智能合约,检查 6 类严重问题,包括算术溢出、有风险的跨层消息和签名重放。