cargo-fuzz

cargo-fuzz is a skill for Claude Code from RedHatProductSecurity/prodsec-skills. It costs 32 tokens per session (2,937 once invoked), scanned A, original, Apache-2.0.

A Rust fuzzing tool for Cargo projects. It repeatedly feeds unexpected input to code to look for crashes and other bugs.

In plain words
What is it for?
Use it to create fuzz tests in Rust, run them through Cargo, and test code that handles arbitrary or untrusted input.
Why use it?
It reduces the need to hand-write every test case and can expose failures that normal tests miss. It also supports checks for some memory errors.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the prodsec-skills plugin — 133 skills shipped together

Good fit Use it to create fuzz tests in Rust, run them through Cargo, and test code that handles arbitrary or untrusted input.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/redhatproductsecurity/prodsec-skills/cargo-fuzz
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add RedHatProductSecurity/prodsec-skills --skill cargo-fuzz
Clone the repo
git clone --depth 1 https://github.com/RedHatProductSecurity/prodsec-skills

Made for: Claude Code.

Or install prodsec-skills, the plugin that ships this one along with the rest of its 133 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cargo-fuzz

README.md
[![agentmods](https://agentmods.dev/badge/skills/redhatproductsecurity/prodsec-skills/cargo-fuzz/github.svg)](https://agentmods.dev/skills/redhatproductsecurity/prodsec-skills/cargo-fuzz)
Your own site
<a href="https://agentmods.dev/skills/redhatproductsecurity/prodsec-skills/cargo-fuzz"><img src="https://agentmods.dev/badge/skills/redhatproductsecurity/prodsec-skills/cargo-fuzz/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cargo-fuzz

Your own site · 80×15
<a href="https://agentmods.dev/skills/redhatproductsecurity/prodsec-skills/cargo-fuzz"><img src="https://agentmods.dev/badge/skills/redhatproductsecurity/prodsec-skills/cargo-fuzz.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,937 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.02937
Opus 5 $0.00016 $0.01469
Sonnet 5 $0.00006 $0.00587
Haiku 4.5 $0.00003 $0.00294

Measured 10d ago against content hash 6af37bff09a7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

cargo-fuzz scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -o fuzz/corpus/fuzz_target_1/320x240.ogg \
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

module/skills/cargo-fuzz/SKILL.md · 458 lines

How it starts

The opening of the file, as written. The whole thing — 458 lines — stays where its author put it; the contents beside it link to each section on GitHub.

cargo-fuzz

cargo-fuzz is the de facto choice for fuzzing Rust projects when using Cargo. It uses libFuzzer as the backend and provides a convenient Cargo subcommand that automatically enables relevant compilation flags for your Rust project, including support for sanitizers like AddressSanitizer.

When to Use

cargo-fuzz is currently the primary and most mature fuzzing solution for Rust projects using Cargo.

Fuzzer Best For Complexity
cargo-fuzz Cargo-based Rust projects, quick setup Low
AFL++ Multi-core fuzzing, non-Cargo projects Medium
LibAFL Custom fuzzers, research, advanced use cases High

Choose cargo-fuzz when:

  • Your project uses Cargo (required)
  • You want simple, quick setup with minimal configuration
  • You need integrated sanitizer support
  • You're fuzzing Rust code with or without unsafe blocks

Quick Start

#![no_main]

use libfuzzer_sys::fuzz_target;

fn harness(data: &[u8]) {
    your_project::check_buf(data);
}

fuzz_target!(|data: &[u8]| {
    harness(data);
});

Initialize and run:

cargo fuzz init
# Edit fuzz/fuzz_targets/fuzz_target_1.rs with your harness
cargo +nightly fuzz run fuzz_target_1

Installation

cargo-fuzz requires the nightly Rust toolchain because it uses features only available in nightly.

Prerequisites

  • Rust and Cargo installed via rustup
  • Nightly toolchain

Linux/macOS

# Install nightly toolchain
rustup install nightly

# Install cargo-fuzz
cargo install cargo-fuzz

Verification

cargo +nightly --version
cargo fuzz --version

Writing a Harness

Project Structure

cargo-fuzz works best when your code is structured as a library crate. If you have a binary project, split your main.rs into:

src/main.rs  # Entry point (main function)
src/lib.rs   # Code to fuzz (public functions)
Cargo.toml

Initialize fuzzing:

cargo fuzz init

This creates:

fuzz/
├── Cargo.toml
└── fuzz_targets/
    └── fuzz_target_1.rs

Read the full file on GitHub · 458 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 458 lines · 32 tokens per session scan A 6af37bff09a7

Subscribe to this mod's changes

cargo-fuzz is a skill published in the GitHub repository RedHatProductSecurity/prodsec-skills (52 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 32 tokens to every session and 2,937 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.