cargo-fuzz

Automate fuzz testing for Rust projects with cargo-fuzz and libFuzzer.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/andrescardonas7/salchipapa-web --skill cargo-fuzz-andrescardonas7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cargo-fuzz
Source: https://github.com/andrescardonas7/salchipapa-web/tree/main/.cursor/skills/testing-handbook-skills/cargo-fuzz
Command: npx skills add https://github.com/andrescardonas7/salchipapa-web --skill cargo-fuzz-andrescardonas7

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers find bugs in Rust code by automatically generating diverse inputs to test program behavior, ensuring robustness and security.

Core Features & Use Cases

  • Automated Fuzzing: Integrates seamlessly with Cargo projects to run fuzzing campaigns.
  • Sanitizer Support: Automatically enables AddressSanitizer for memory error detection.
  • Structure-Aware Fuzzing: Supports the arbitrary crate for fuzzing complex data structures.
  • Use Case: You can use this Skill to fuzz a network parsing library in your Rust project to uncover potential vulnerabilities or crashes caused by malformed network packets.

Quick Start

Initialize fuzzing for your Rust project by running cargo fuzz init in your project's root directory.

Frequently Asked Questions about cargo-fuzz

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

FAQPage Schema
How do I set up fuzz testing for a Rust Cargo project?

Fuzzing Rust code involves automatically generating diverse inputs to test program behavior and find bugs. This Skill automates fuzz testing using cargo-fuzz to ensure robustness and security.

How do I find memory errors when fuzzing Rust code?

To find memory errors when fuzzing Rust code, the process integrates with libFuzzer and automatically enables AddressSanitizer. This sanitizer detects memory errors and crashes during your fuzzing campaign.

Can I fuzz complex data structures in my Rust library?

Yes, you can fuzz complex data structures in a Rust library by utilizing structure-aware fuzzing. The setup supports the `arbitrary` crate to handle and generate complex inputs for your tests.

Does cargo-fuzz work with sanitizers for detecting vulnerabilities?

Yes, cargo-fuzz works with sanitizers for detecting vulnerabilities by automatically enabling AddressSanitizer. This integration helps uncover potential memory errors and security flaws caused by malformed inputs.

What is the best way to fuzz a network parsing library in Rust?

The best way to fuzz a network parsing library in Rust is using an automated fuzzing campaign with cargo-fuzz. This approach tests your library with malformed network packets to uncover potential crashes.