ossfuzz
Skill này làm gì
Skill này chuẩn bị một dự án mã nguồn mở cho OSS-Fuzz và chạy các công cụ hỗ trợ của nó trên máy cục bộ. Skill dành cho người duy trì mã nguồn mở muốn fuzzing liên tục miễn phí và hỗ trợ tái hiện các lỗi được báo cáo.
Khi nào nên dùng
- ✓Khi bạn duy trì một dự án mã nguồn mở và muốn fuzzing liên tục từ OSS-Fuzz.
- ✓Khi bạn nhận được báo cáo lỗi từ OSS-Fuzz và cần tái hiện crash trên máy của mình.
- ✓Khi bạn muốn kiểm thử một bản build OSS-Fuzz cục bộ trước khi gửi đi.
Liên kết skill
https://github.com/trailofbits/skills/blob/main/plugins/testing-handbook-skills/skills/ossfuzz/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể giúp tôi thêm thư viện C mã nguồn mở của mình vào OSS-Fuzz và kiểm thử build trên máy tính trước không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent viết các file của dự án, như file cấu hình, Dockerfile và script build, rồi dùng công cụ hỗ trợ của OSS-Fuzz để build và chạy các harness cục bộ. Việc tái hiện một crash theo đúng các bước này.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
OSS-Fuzz có miễn phí không?
Skill mô tả đây là dịch vụ miễn phí cho dự án mã nguồn mở, dù chỉ một số dự án được chọn mới được nhận.
Tôi có thể tự host một bản riêng không?
Có. Phần lõi là mã nguồn mở, nên dự án riêng tư có thể chạy bản riêng của mình.
Dự án cần những file nào?
Cần một file cấu hình dự án, một Dockerfile và một script build, và skill giúp thiết lập chúng.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 8.0k
- Vị trí xếp hạng
- #12722
- Giấy phép
- CC-BY-SA-4.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
audit-context-building
8.0kGiúp agent tìm hiểu một codebase lạ trước khi review bảo mật, lập bản đồ những gì mỗi hàm giả định, đảm bảo và phụ thuộc vào.
algorand-vulnerability-scanner
8.0kGiúp agent quét smart contract Algorand viết bằng TEAL hoặc PyTeal để tìm 11 vấn đề bảo mật phổ biến, như tấn công rekey và phí không được kiểm tra.
audit-prep-assistant
8.0kGiúp agent chuẩn bị codebase cho một đợt review bảo mật bên ngoài, với phân tích tĩnh, độ phủ test, dọn mã chết và tài liệu rõ ràng.
cairo-vulnerability-scanner
8.0kGiúp agent quét smart contract Cairo trên StarkNet để tìm 6 vấn đề nghiêm trọng, gồm tràn số học, thông điệp xuyên lớp rủi ro và replay chữ ký.
Skill tương tự
test-driven-development
311kDạy agent của bạn viết kiểm thử thất bại trước, xem nó thất bại, rồi viết đoạn mã ngắn nhất để vượt qua trước khi làm bất kỳ tính năng hay bản sửa nào.
verification-before-completion
311kDạy agent của bạn chạy kiểm tra thực tế và đọc kết quả đầu ra trước khi khẳng định một việc, bản sửa hoặc bản build đã hoàn thành hay vượt qua.
migrate-to-shoehorn
310kThay các ép kiểu rủi ro trong tệp kiểm thử bằng thư viện shoehorn, để các bài kiểm thử dùng dữ liệu một phần vẫn qua được kiểm tra kiểu.