harness-writing

Guide writing fuzzing harnesses in C++, Rust, and Go.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/sudohakan/claude-code-dotfiles --skill harness-writing-sudohakan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: harness-writing
Source: https://github.com/sudohakan/claude-code-dotfiles/tree/main/config/skills/trailofbits-security/plugins/testing-handbook-skills/skills/harness-writing
Command: npx skills add https://github.com/sudohakan/claude-code-dotfiles --skill harness-writing-sudohakan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides techniques and patterns for writing effective fuzzing harnesses, ensuring that fuzzers can properly exercise the System Under Test (SUT) and uncover critical bugs.

Core Features & Use Cases

  • Harness Design Patterns: Learn how to structure your fuzzing entry points for various languages (C++, Rust, Go).
  • Input Handling: Techniques for parsing complex data, validating input sizes, and using specialized data providers.
  • Use Case: When developing a new security feature that parses user-provided network protocols, use this Skill to write a fuzzing harness that feeds malformed data to the parser, aiming to find vulnerabilities.

Quick Start

Write a minimal C++ fuzzing harness for a target function named process_data.

Frequently Asked Questions about harness-writing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a fuzzing harness for structured data parsing in C++?▼

To write a fuzzing harness for structured data in C++, use FuzzedDataProvider to extract and mutate complex input types, ensuring the fuzzer properly exercises the System Under Test to uncover parsing vulnerabilities.

What is the best way to structure a fuzzing harness for Rust and Go?▼

The best way to structure a fuzzing harness for Rust and Go is to design targeted entry points using tool-specific advice for cargo-fuzz and go-fuzz, applying structure-aware fuzzing techniques to maximize code coverage.

Does this guidance cover structure-aware fuzzing with Protocol Buffers?▼

Yes, this guidance covers structure-aware fuzzing with Protocol Buffers, detailing how to feed malformed protocol data into your parser to effectively identify deep security vulnerabilities.

How do I avoid common anti-patterns when using libFuzzer and AFL++?▼

To avoid common anti-patterns with libFuzzer and AFL++, implement proper input validation, utilize interleaved fuzzing techniques, and structure your entry points to prevent the fuzzer from getting stuck.

When should I use FuzzedDataProvider instead of raw byte buffers in my harness?▼

You should use FuzzedDataProvider instead of raw byte buffers when your target requires multiple distinct data types or structured input extraction, enabling the fuzzer to generate semantically valid test cases.

Can I use this approach to find vulnerabilities in network protocol parsers?▼

Yes, you can use this approach to find vulnerabilities in network protocol parsers by writing a fuzzing harness that feeds malformed data directly to the parser, exposing critical security bugs.