ruzzy

Fuzz Ruby code and C extensions with Ruzzy and sanitizers.

19.0k|5.6k|Updated Jul 9, 2024
One-click install
npx skills add https://github.com/elizaOS/eliza --skill ruzzy-elizaos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ruzzy
Source: https://github.com/elizaOS/eliza/tree/main/packages/skills/skills/testing-handbook-skills/skills/ruzzy
Command: npx skills add https://github.com/elizaOS/eliza --skill ruzzy-elizaos

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps developers find memory corruption and undefined behavior bugs in Ruby code and C extensions by using coverage-guided fuzzing.

Core Features & Use Cases

  • Fuzzing Ruby Code: Apply fuzzing techniques to pure Ruby applications and libraries.
  • Fuzzing C Extensions: Detect memory safety issues in Ruby C extensions.
  • Sanitizer Integration: Leverages AddressSanitizer (ASan) and UndefinedBehaviorSanitizer (UBSan) for deep bug detection.
  • Use Case: A developer can use this skill to automatically test a Ruby gem with native extensions, uncovering critical memory leaks or crashes before they impact users.

Quick Start

Run the Ruzzy fuzzer with the provided toy example to verify installation.

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 to find memory corruption bugs?

To fuzz Ruby code, apply coverage-guided fuzzing techniques that automatically generate test inputs to uncover memory corruption. This approach tests pure Ruby applications and libraries to detect hidden crashes and memory leaks before deployment.

Can I use AddressSanitizer to detect memory issues in Ruby C extensions?

Yes, AddressSanitizer integrates with coverage-guided fuzzing to detect memory corruption in Ruby C extensions. This combination identifies critical memory safety issues and undefined behavior in native code during automated testing.

What is coverage-guided fuzzing and how does it work with Ruby?

Coverage-guided fuzzing monitors code execution paths to generate inputs reaching untested areas. For Ruby, it uses a tracer script to track execution and automatically discover bugs in both pure Ruby code and C extensions.

Does UndefinedBehaviorSanitizer work when fuzzing Ruby gems with native extensions?

Yes, UndefinedBehaviorSanitizer works alongside AddressSanitizer during fuzzing to detect undefined behavior in Ruby gems with native extensions. This combined approach catches both memory corruption and logic errors in C code.

What's the best way to test a Ruby gem for memory leaks before release?

The best way is coverage-guided fuzzing integrated with AddressSanitizer, which automatically tests Ruby gems with native extensions to uncover memory leaks and crashes before they impact users in production.

Why does my Ruby C extension crash with memory corruption during testing?

Memory corruption crashes in Ruby C extensions often stem from undefined behavior or memory safety issues. Coverage-guided fuzzing with sanitizer integration can automatically identify the root cause of these critical bugs.