ruzzy

Fuzz pure Ruby code and Ruby C extensions with coverage-guided libFuzzer instrumentation.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/TECH-HY/SKILLS --skill ruzzy-tech-hy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ruzzy
Source: https://github.com/TECH-HY/SKILLS/tree/main/skills/ruzzy
Command: npx skills add https://github.com/TECH-HY/SKILLS --skill ruzzy-tech-hy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Ruby lacks production-ready coverage-guided fuzzing tools, making it hard to detect memory corruption, undefined behavior, and crashes in Ruby applications and native C extensions before they reach production. ## Core Features & Use Cases - Pure Ruby Fuzzing: Uses a tracer-and-harness script pattern to apply coverage-guided fuzzing to pure Ruby code. - C Extension Fuzzing: Fuzzes Ruby gems with native extensions compiled with AddressSanitizer and UndefinedBehaviorSanitizer flags to detect heap overflows, use-after-free, and undefined behavior. - libFuzzer Integration: Passes all standard libFuzzer options (corpus directories, max_len, timeout) and supports crash reproduction from saved artifacts. - Use Case: Fuzz the msgpack gem by compiling it with sanitizer flags, writing a harness that calls MessagePack.unpack on fuzzer input, and running it under LD_PRELOAD with ASan to surface memory corruption bugs. ## Quick Start Install the ruzzy gem with clang, set the ASAN_OPTIONS environment variable, and run a fuzzing harness with LD_PRELOAD pointing to Ruzzy's ASan library.

Frequently Asked Questions about ruzzy

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

FAQPage Schema
How do I fuzz Ruby code with Ruzzy?

Fuzzing pure Ruby code requires two scripts: a tracer script that calls Ruzzy.trace with your harness path, and a harness script defining a test_one_input lambda passed to Ruzzy.fuzz. Run the tracer with LD_PRELOAD set to Ruzzy's ASan library path.

How do I fuzz Ruby C extensions for memory corruption?

Compile the gem with clang using -fsanitize=address,fuzzer-no-link flags, then write a single harness that calls the extension's API inside a lambda and rescues Ruby exceptions. Run it with LD_PRELOAD pointing to Ruzzy::ASAN_PATH to detect heap overflows and use-after-free.

Does Ruzzy work on macOS or Windows?

Ruzzy supports only Linux x86-64 and AArch64/ARM64 natively. For macOS or Windows, use the official Dockerfile or development environment provided in the Ruzzy GitHub repository.

Why does Ruzzy show memory leak warnings from the Ruby interpreter?

The Ruby interpreter itself leaks memory, which AddressSanitizer reports as noise. Set ASAN_OPTIONS with detect_leaks=0, along with allocator_may_return_null=1 and use_sigaltstack=0, before running any fuzzing campaign.

How do I reproduce a crash found by Ruzzy?

Pass the saved crash artifact file as an argument to your harness command, for example ruby harness.rb ./crash-<hash>, with the same LD_PRELOAD and ASAN_OPTIONS settings. The fuzzer re-runs that single input to reproduce the crash.