ruzy

Fuzz Ruby code and C extensions with ASan/UBSan instrumentation.

Updated May 2, 2026
One-click install
npx skills add https://github.com/ayehiaa/my-travel-assistant --skill ruzy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ruzy
Source: https://github.com/ayehiaa/my-travel-assistant/tree/main/.agents/skills/ruzzy
Command: npx skills add https://github.com/ayehiaa/my-travel-assistant --skill ruzy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you detect crashes and memory corruption in Ruby code by running coverage-guided fuzzing with sanitizer instrumentation instead of relying on hand-written tests that miss edge cases.

Core Features & Use Cases

  • Coverage-guided Ruby fuzzing: Uses Ruzzy (libFuzzer-based) to systematically explore inputs for both pure Ruby code and Ruby C extensions.
  • Sanitizer support for bug detection: Leverages AddressSanitizer (ASan) and UndefinedBehaviorSanitizer (UBSan) to surface memory safety issues like heap overflows and undefined behavior.
  • Harness-driven execution: Lets you define deterministic harnesses (and, for pure Ruby, an additional tracer step) so crashes can be reproduced with minimized inputs.

Use Case Example: You want to harden a Ruby gem with a native extension; fuzz the extension’s parser by feeding arbitrary binary inputs until sanitizer reports a heap use-after-free.

Quick Start

Run the included toy harness with: set ASAN_OPTIONS to suitable values, then execute Ruzzy via LD_PRELOAD and run the toy entrypoint to confirm it can find a crash and write artifacts.

Frequently Asked Questions about ruzy

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

FAQPage Schema
How do I fuzz Ruby C extensions to find memory safety bugs?

Coverage-guided fuzzing with ASan and UBSan sanitizers detects memory safety bugs by systematically exploring arbitrary inputs to surface heap overflows and undefined behavior that hand-written tests miss. This approach systematically explores inputs to find crashes faster than hand-written tests.

How does coverage-guided fuzzing work with ASan and UBSan in Ruby?

Coverage-guided fuzzing uses libFuzzer to systematically explore inputs while ASan and UBSan instrumentation surfaces memory safety bugs like heap overflows and undefined behavior in Ruby code. This approach systematically explores inputs to find crashes faster than hand-written tests.

Can I fuzz pure Ruby logic or does it only work for native C extensions?

You can fuzz pure Ruby logic using a tracer and harness pattern, and fuzz Ruby C extensions with a single harness that exercises native parsing. Both approaches require deterministic test_one_input harness logic that returns 0.

What environment setup is required to run Ruby fuzzing with libFuzzer?

Ruby fuzzing requires building and installing ruzzy, setting appropriate ASAN_OPTIONS environment variables, and executing the fuzzing run via LD_PRELOAD to properly load the sanitizer instrumentation libraries.

Why does my Ruby fuzzer crash before finding any bugs in my code?

Crashes may occur if ASAN_OPTIONS are not set to suitable values or if LD_PRELOAD is not configured correctly. Run the included toy harness first to confirm the setup can find a crash and write artifacts successfully.