harness-writing

Develop C++ fuzzing harnesses with FuzzedDataProvider for structured input validation.

Updated Nov 23, 2025
One-click install
npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill harness-writing-manuelbrandner85
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: harness-writing
Source: https://github.com/manuelbrandner85/Weltenbibliothekapp/tree/main/.agents/skills/harness-writing
Command: npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill harness-writing-manuelbrandner85

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the challenge of creating effective fuzzing harnesses that bridge the gap between random data generation and your application's API, ensuring critical code paths are exercised and bugs are discovered.

Core Features & Use Cases

  • Structured Input Handling: Provides patterns for using FuzzedDataProvider to extract typed data from raw byte streams.
  • Harness Optimization: Offers techniques for persistent mode fuzzing, input validation, and global state management to increase execution speed and reproducibility.
  • Use Case: When developing a new protocol parser, use this skill to implement a harness that correctly handles variable-length inputs and edge cases, preventing the fuzzer from wasting time on invalid data.

Quick Start

Use the harness-writing skill to generate a C++ fuzzing harness template for a binary protocol parser that requires structured integer inputs.

Frequently Asked Questions about harness-writing

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

FAQPage Schema
What is a fuzzing harness and why do I need one for security testing?

A fuzzing harness bridges random byte generation with application-specific APIs to exercise critical code paths. You need one to ensure fuzzers like libfuzzer or AFL++ effectively discover bugs in complex parsers and protocol handlers.

How do I build a fuzzing harness for a binary protocol parser?

To build a fuzzing harness for a binary protocol parser, use FuzzedDataProvider to extract structured typed data from raw byte streams. This ensures the fuzzer inputs valid variable-length data, maximizing code coverage and efficiency.

How does FuzzedDataProvider work when fuzzing C++ applications?

FuzzedDataProvider works by consuming raw random bytes and exposing methods to extract typed data, such as integers or strings. This allows your fuzzing harness to generate structured inputs required for testing complex serialization routines.

Can I use persistent mode fuzzing to increase execution speed?

Yes, you can use persistent mode fuzzing to increase execution speed. The harness implements persistent fuzzing loops and global state management, which maximizes bug detection efficiency by reusing the fuzzing process across multiple inputs.

What is the best way to handle variable-length inputs in a fuzzing harness?

The best way to handle variable-length inputs is to implement structured input validation using FuzzedDataProvider. This prevents the fuzzer from wasting time on invalid data by ensuring inputs match the expected protocol structure.

Why does my fuzzer waste time on invalid data during protocol testing?

Your fuzzer wastes time on invalid data because the harness lacks proper input validation. Implementing structured input handling with FuzzedDataProvider ensures the generated bytes match your API's expected formats before execution.