[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75HZGP1JFTS40AENHASWNJQ":3,"skill-same:01M75HZGP1JFTS40AENHASWNJQ":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":6,"updatedAt":32,"install":33,"resources":46},"01M75HZGP1JFTS40AENHASWNJQ","ruzzy",null,"Ruzzy is a coverage-guided Ruby fuzzer by Trail of Bits. Use for fuzzing pure Ruby code and Ruby C extensions.","agisota\u002Fold-one","agisota","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121413592?v=4","01M75B4BRNT67EC1NDRT8QZEP2","01M75B4BS7QR9VP580MSCPTS3X",3,"MIT","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fruzzy\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: ruzzy\ntype: fuzzer\ndescription: >\n  Ruzzy is a coverage-guided Ruby fuzzer by Trail of Bits.\n  Use for fuzzing pure Ruby code and Ruby C extensions.\n---\n\n# Ruzzy\n\nRuzzy is a coverage-guided fuzzer for Ruby built on libFuzzer. It enables fuzzing both pure Ruby code and Ruby C extensions with sanitizer support for detecting memory corruption and undefined behavior.\n\n## When to Use\n\nRuzzy is currently the only production-ready coverage-guided fuzzer for Ruby.\n\n**Choose Ruzzy when:**\n- Fuzzing Ruby applications or libraries\n- Testing Ruby C extensions for memory safety issues\n- You need coverage-guided fuzzing for Ruby code\n- Working with Ruby gems that have native extensions\n\n## Quick Start\n\nSet up environment:\n```bash\nexport ASAN_OPTIONS=\"allocator_may_return_null=1:detect_leaks=0:use_sigaltstack=0\"\n```\n\nTest with the included toy example:\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby -e 'require \"ruzzy\"; Ruzzy.dummy'\n```\n\nThis should quickly find a crash demonstrating that Ruzzy is working correctly.\n\n## Installation\n\n### Platform Support\n\nRuzzy supports Linux x86-64 and AArch64\u002FARM64. For macOS or Windows, use the [Dockerfile](https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fruzzy\u002Fblob\u002Fmain\u002FDockerfile) or [development environment](https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fruzzy#developing).\n\n### Prerequisites\n\n- Linux x86-64 or AArch64\u002FARM64\n- Recent version of clang (tested back to 14.0.0, latest release recommended)\n- Ruby with gem installed\n\n### Installation Command\n\nInstall Ruzzy with clang compiler flags:\n\n```bash\nMAKE=\"make --environment-overrides V=1\" \\\nCC=\"\u002Fpath\u002Fto\u002Fclang\" \\\nCXX=\"\u002Fpath\u002Fto\u002Fclang++\" \\\nLDSHARED=\"\u002Fpath\u002Fto\u002Fclang -shared\" \\\nLDSHAREDXX=\"\u002Fpath\u002Fto\u002Fclang++ -shared\" \\\n    gem install ruzzy\n```\n\n**Environment variables explained:**\n- `MAKE`: Overrides make to respect subsequent environment variables\n- `CC`, `CXX`, `LDSHARED`, `LDSHAREDXX`: Ensure proper clang binaries are used for latest features\n\n### Troubleshooting Installation\n\nIf installation fails, enable debug output:\n\n```bash\nRUZZY_DEBUG=1 gem install --verbose ruzzy\n```\n\n### Verification\n\nVerify installation by running the toy example (see Quick Start section).\n\n## Writing a Harness\n\n### Fuzzing Pure Ruby Code\n\nPure Ruby fuzzing requires two scripts due to Ruby interpreter implementation details.\n\n**Tracer script (`test_tracer.rb`):**\n\n```ruby\n# frozen_string_literal: true\n\nrequire 'ruzzy'\n\nRuzzy.trace('test_harness.rb')\n```\n\n**Harness script (`test_harness.rb`):**\n\n```ruby\n# frozen_string_literal: true\n\nrequire 'ruzzy'\n\ndef fuzzing_target(input)\n  # Your code to fuzz here\n  if input.length == 4\n    if input[0] == 'F'\n      if input[1] == 'U'\n        if input[2] == 'Z'\n          if input[3] == 'Z'\n            raise\n          end\n        end\n      end\n    end\n  end\nend\n\ntest_one_input = lambda do |data|\n  fuzzing_target(data)\n  return 0\nend\n\nRuzzy.fuzz(test_one_input)\n```\n\nRun with:\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby test_tracer.rb\n```\n\n### Fuzzing Ruby C Extensions\n\nC extensions can be fuzzed with a single harness file, no tracer needed.\n\n**Example harness for msgpack (`fuzz_msgpack.rb`):**\n\n```ruby\n# frozen_string_literal: true\n\nrequire 'msgpack'\nrequire 'ruzzy'\n\ntest_one_input = lambda do |data|\n  begin\n    MessagePack.unpack(data)\n  rescue Exception\n    # We're looking for memory corruption, not Ruby exceptions\n  end\n  return 0\nend\n\nRuzzy.fuzz(test_one_input)\n```\n\nRun with:\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby fuzz_msgpack.rb\n```\n\n### Harness Rules\n\n| Do | Don't |\n|----|-------|\n| Catch Ruby exceptions if testing C extensions | Let Ruby exceptions crash the fuzzer |\n| Return 0 from test_one_input lambda | Return other values |\n| Keep harness deterministic | Use randomness or time-based logic |\n| Use tracer script for pure Ruby | Skip tracer for pure Ruby code |\n\n> **See Also:** For detailed harness writing techniques, patterns for handling complex inputs,\n> and advanced strategies, see the **fuzz-harness-writing** technique skill.\n\n## Compilation\n\n### Installing Gems with Sanitizers\n\nWhen installing Ruby gems with C extensions for fuzzing, compile with sanitizer flags:\n\n```bash\nMAKE=\"make --environment-overrides V=1\" \\\nCC=\"\u002Fpath\u002Fto\u002Fclang\" \\\nCXX=\"\u002Fpath\u002Fto\u002Fclang++\" \\\nLDSHARED=\"\u002Fpath\u002Fto\u002Fclang -shared\" \\\nLDSHAREDXX=\"\u002Fpath\u002Fto\u002Fclang++ -shared\" \\\nCFLAGS=\"-fsanitize=address,fuzzer-no-link -fno-omit-frame-pointer -fno-common -fPIC -g\" \\\nCXXFLAGS=\"-fsanitize=address,fuzzer-no-link -fno-omit-frame-pointer -fno-common -fPIC -g\" \\\n    gem install \u003Cgem-name>\n```\n\n### Build Flags\n\n| Flag | Purpose |\n|------|---------|\n| `-fsanitize=address,fuzzer-no-link` | Enable AddressSanitizer and fuzzer instrumentation |\n| `-fno-omit-frame-pointer` | Improve stack trace quality |\n| `-fno-common` | Better compatibility with sanitizers |\n| `-fPIC` | Position-independent code for shared libraries |\n| `-g` | Include debug symbols |\n\n## Running Campaigns\n\n### Environment Setup\n\nBefore running any fuzzing campaign, set ASAN_OPTIONS:\n\n```bash\nexport ASAN_OPTIONS=\"allocator_may_return_null=1:detect_leaks=0:use_sigaltstack=0\"\n```\n\n**Options explained:**\n1. `allocator_may_return_null=1`: Skip common low-impact allocation failures (DoS)\n2. `detect_leaks=0`: Ruby interpreter leaks data, ignore these for now\n3. `use_sigaltstack=0`: Ruby recommends disabling sigaltstack with ASan\n\n### Basic Run\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby harness.rb\n```\n\n**Note:** `LD_PRELOAD` is required for sanitizer injection. Unlike `ASAN_OPTIONS`, do not export it as it may interfere with other programs.\n\n### With Corpus\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby harness.rb \u002Fpath\u002Fto\u002Fcorpus\n```\n\n### Passing libFuzzer Options\n\nAll libFuzzer options can be passed as arguments:\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby harness.rb \u002Fpath\u002Fto\u002Fcorpus -max_len=1024 -timeout=10\n```\n\nSee [libFuzzer options](https:\u002F\u002Fllvm.org\u002Fdocs\u002FLibFuzzer.html#options) for full reference.\n\n### Reproducing Crashes\n\nRe-run a crash case by passing the crash file:\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby harness.rb .\u002Fcrash-253420c1158bc6382093d409ce2e9cff5806e980\n```\n\n### Interpreting Output\n\n| Output | Meaning |\n|--------|---------|\n| `INFO: Running with entropic power schedule` | Fuzzing campaign started |\n| `ERROR: AddressSanitizer: heap-use-after-free` | Memory corruption detected |\n| `SUMMARY: libFuzzer: fuzz target exited` | Ruby exception occurred |\n| `artifact_prefix='.\u002F'; Test unit written to .\u002Fcrash-*` | Crash input saved |\n| `Base64: ...` | Base64 encoding of crash input |\n\n## Sanitizer Integration\n\n### AddressSanitizer (ASan)\n\nRuzzy includes a pre-compiled AddressSanitizer library:\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby harness.rb\n```\n\nUse ASan for detecting:\n- Heap buffer overflows\n- Stack buffer overflows\n- Use-after-free\n- Double-free\n- Memory leaks (disabled by default in Ruzzy)\n\n### UndefinedBehaviorSanitizer (UBSan)\n\nRuzzy also includes UBSan:\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::UBSAN_PATH') \\\n    ruby harness.rb\n```\n\nUse UBSan for detecting:\n- Signed integer overflow\n- Null pointer dereferences\n- Misaligned memory access\n- Division by zero\n\n### Common Sanitizer Issues\n\n| Issue | Solution |\n|-------|----------|\n| Ruby interpreter leak warnings | Use `ASAN_OPTIONS=detect_leaks=0` |\n| Sigaltstack conflicts | Use `ASAN_OPTIONS=use_sigaltstack=0` |\n| Allocation failure spam | Use `ASAN_OPTIONS=allocator_may_return_null=1` |\n| LD_PRELOAD interferes with tools | Don't export it; set inline with ruby command |\n\n> **See Also:** For detailed sanitizer configuration, common issues, and advanced flags,\n> see the **address-sanitizer** and **undefined-behavior-sanitizer** technique skills.\n\n## Real-World Examples\n\n### Example: msgpack-ruby\n\nFuzzing the msgpack MessagePack parser for memory corruption.\n\n**Install with sanitizers:**\n\n```bash\nMAKE=\"make --environment-overrides V=1\" \\\nCC=\"\u002Fpath\u002Fto\u002Fclang\" \\\nCXX=\"\u002Fpath\u002Fto\u002Fclang++\" \\\nLDSHARED=\"\u002Fpath\u002Fto\u002Fclang -shared\" \\\nLDSHAREDXX=\"\u002Fpath\u002Fto\u002Fclang++ -shared\" \\\nCFLAGS=\"-fsanitize=address,fuzzer-no-link -fno-omit-frame-pointer -fno-common -fPIC -g\" \\\nCXXFLAGS=\"-fsanitize=address,fuzzer-no-link -fno-omit-frame-pointer -fno-common -fPIC -g\" \\\n    gem install msgpack\n```\n\n**Harness (`fuzz_msgpack.rb`):**\n\n```ruby\n# frozen_string_literal: true\n\nrequire 'msgpack'\nrequire 'ruzzy'\n\ntest_one_input = lambda do |data|\n  begin\n    MessagePack.unpack(data)\n  rescue Exception\n    # We're looking for memory corruption, not Ruby exceptions\n  end\n  return 0\nend\n\nRuzzy.fuzz(test_one_input)\n```\n\n**Run:**\n\n```bash\nexport ASAN_OPTIONS=\"allocator_may_return_null=1:detect_leaks=0:use_sigaltstack=0\"\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby fuzz_msgpack.rb\n```\n\n### Example: Pure Ruby Target\n\nFuzzing pure Ruby code with a custom parser.\n\n**Tracer (`test_tracer.rb`):**\n\n```ruby\n# frozen_string_literal: true\n\nrequire 'ruzzy'\n\nRuzzy.trace('test_harness.rb')\n```\n\n**Harness (`test_harness.rb`):**\n\n```ruby\n# frozen_string_literal: true\n\nrequire 'ruzzy'\nrequire_relative 'my_parser'\n\ntest_one_input = lambda do |data|\n  begin\n    MyParser.parse(data)\n  rescue StandardError\n    # Expected exceptions from malformed input\n  end\n  return 0\nend\n\nRuzzy.fuzz(test_one_input)\n```\n\n**Run:**\n\n```bash\nexport ASAN_OPTIONS=\"allocator_may_return_null=1:detect_leaks=0:use_sigaltstack=0\"\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby test_tracer.rb\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| Installation fails | Wrong clang version or path | Verify clang path, use clang 14.0.0+ |\n| `cannot open shared object file` | LD_PRELOAD not set | Set LD_PRELOAD inline with ruby command |\n| Fuzzer immediately exits | Missing corpus directory | Create corpus directory or pass as argument |\n| No coverage progress | Pure Ruby needs tracer | Use tracer script for pure Ruby code |\n| Leak detection spam | Ruby interpreter leaks | Set `ASAN_OPTIONS=detect_leaks=0` |\n| Installation debug needed | Compilation errors | Use `RUZZY_DEBUG=1 gem install --verbose ruzzy` |\n\n## Related Skills\n\n### Technique Skills\n\n| Skill | Use Case |\n|-------|----------|\n| **fuzz-harness-writing** | Detailed guidance on writing effective harnesses |\n| **address-sanitizer** | Memory error detection during fuzzing |\n| **undefined-behavior-sanitizer** | Detecting undefined behavior in C extensions |\n| **libfuzzer** | Understanding libFuzzer options (Ruzzy is built on libFuzzer) |\n\n### Related Fuzzers\n\n| Skill | When to Consider |\n|-------|------------------|\n| **libfuzzer** | When fuzzing Ruby C extension code directly in C\u002FC++ |\n| **aflpp** | Alternative approach for fuzzing Ruby by instrumenting Ruby interpreter |\n\n## Resources\n\n### Key External Resources\n\n**[Introducing Ruzzy, a coverage-guided Ruby fuzzer](https:\u002F\u002Fblog.trailofbits.com\u002F2024\u002F03\u002F29\u002Fintroducing-ruzzy-a-coverage-guided-ruby-fuzzer\u002F)**\nOfficial Trail of Bits blog post announcing Ruzzy, covering motivation, architecture, and initial results.\n\n**[Ruzzy GitHub Repository](https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fruzzy)**\nSource code, additional examples, and development instructions.\n\n**[libFuzzer Documentation](https:\u002F\u002Fllvm.org\u002Fdocs\u002FLibFuzzer.html)**\nSince Ruzzy is built on libFuzzer, understanding libFuzzer options and behavior is valuable.\n\n**[Fuzzing Ruby C extensions](https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fruzzy#fuzzing-ruby-c-extensions)**\nDetailed guide on fuzzing C extensions with compilation flags and examples.\n\n**[Fuzzing pure Ruby code](https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fruzzy#fuzzing-pure-ruby-code)**\nDetailed guide on the tracer pattern required for pure Ruby fuzzing.\n","# Ruzzy\n\nRuzzy is a coverage-guided fuzzer for Ruby built on libFuzzer. It enables fuzzing both pure Ruby code and Ruby C extensions with sanitizer support for detecting memory corruption and undefined behavior.\n\n## When to Use\n\nRuzzy is currently the only production-ready coverage-guided fuzzer for Ruby.\n\n**Choose Ruzzy when:**\n- Fuzzing Ruby applications or libraries\n- Testing Ruby C extensions for memory safety issues\n- You need coverage-guided fuzzing for Ruby code\n- Working with Ruby gems that have native extensions\n\n## Quick Start\n\nSet up environment:\n```bash\nexport ASAN_OPTIONS=\"allocator_may_return_null=1:detect_leaks=0:use_sigaltstack=0\"\n```\n\nTest with the included toy example:\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby -e 'require \"ruzzy\"; Ruzzy.dummy'\n```\n\nThis should quickly find a crash demonstrating that Ruzzy is working correctly.\n\n## Installation\n\n### Platform Support\n\nRuzzy supports Linux x86-64 and AArch64\u002FARM64. For macOS or Windows, use the [Dockerfile](https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fruzzy\u002Fblob\u002Fmain\u002FDockerfile) or [development environment](https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fruzzy#developing).\n\n### Prerequisites\n\n- Linux x86-64 or AArch64\u002FARM64\n- Recent version of clang (tested back to 14.0.0, latest release recommended)\n- Ruby with gem installed\n\n### Installation Command\n\nInstall Ruzzy with clang compiler flags:\n\n```bash\nMAKE=\"make --environment-overrides V=1\" \\\nCC=\"\u002Fpath\u002Fto\u002Fclang\" \\\nCXX=\"\u002Fpath\u002Fto\u002Fclang++\" \\\nLDSHARED=\"\u002Fpath\u002Fto\u002Fclang -shared\" \\\nLDSHAREDXX=\"\u002Fpath\u002Fto\u002Fclang++ -shared\" \\\n    gem install ruzzy\n```\n\n**Environment variables explained:**\n- `MAKE`: Overrides make to respect subsequent environment variables\n- `CC`, `CXX`, `LDSHARED`, `LDSHAREDXX`: Ensure proper clang binaries are used for latest features\n\n### Troubleshooting Installation\n\nIf installation fails, enable debug output:\n\n```bash\nRUZZY_DEBUG=1 gem install --verbose ruzzy\n```\n\n### Verification\n\nVerify installation by running the toy example (see Quick Start section).\n\n## Writing a Harness\n\n### Fuzzing Pure Ruby Code\n\nPure Ruby fuzzing requires two scripts due to Ruby interpreter implementation details.\n\n**Tracer script (`test_tracer.rb`):**\n\n```ruby\n# frozen_string_literal: true\n\nrequire 'ruzzy'\n\nRuzzy.trace('test_harness.rb')\n```\n\n**Harness script (`test_harness.rb`):**\n\n```ruby\n# frozen_string_literal: true\n\nrequire 'ruzzy'\n\ndef fuzzing_target(input)\n  # Your code to fuzz here\n  if input.length == 4\n    if input[0] == 'F'\n      if input[1] == 'U'\n        if input[2] == 'Z'\n          if input[3] == 'Z'\n            raise\n          end\n        end\n      end\n    end\n  end\nend\n\ntest_one_input = lambda do |data|\n  fuzzing_target(data)\n  return 0\nend\n\nRuzzy.fuzz(test_one_input)\n```\n\nRun with:\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby test_tracer.rb\n```\n\n### Fuzzing Ruby C Extensions\n\nC extensions can be fuzzed with a single harness file, no tracer needed.\n\n**Example harness for msgpack (`fuzz_msgpack.rb`):**\n\n```ruby\n# frozen_string_literal: true\n\nrequire 'msgpack'\nrequire 'ruzzy'\n\ntest_one_input = lambda do |data|\n  begin\n    MessagePack.unpack(data)\n  rescue Exception\n    # We're looking for memory corruption, not Ruby exceptions\n  end\n  return 0\nend\n\nRuzzy.fuzz(test_one_input)\n```\n\nRun with:\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby fuzz_msgpack.rb\n```\n\n### Harness Rules\n\n| Do | Don't |\n|----|-------|\n| Catch Ruby exceptions if testing C extensions | Let Ruby exceptions crash the fuzzer |\n| Return 0 from test_one_input lambda | Return other values |\n| Keep harness deterministic | Use randomness or time-based logic |\n| Use tracer script for pure Ruby | Skip tracer for pure Ruby code |\n\n> **See Also:** For detailed harness writing techniques, patterns for handling complex inputs,\n> and advanced strategies, see the **fuzz-harness-writing** technique skill.\n\n## Compilation\n\n### Installing Gems with Sanitizers\n\nWhen installing Ruby gems with C extensions for fuzzing, compile with sanitizer flags:\n\n```bash\nMAKE=\"make --environment-overrides V=1\" \\\nCC=\"\u002Fpath\u002Fto\u002Fclang\" \\\nCXX=\"\u002Fpath\u002Fto\u002Fclang++\" \\\nLDSHARED=\"\u002Fpath\u002Fto\u002Fclang -shared\" \\\nLDSHAREDXX=\"\u002Fpath\u002Fto\u002Fclang++ -shared\" \\\nCFLAGS=\"-fsanitize=address,fuzzer-no-link -fno-omit-frame-pointer -fno-common -fPIC -g\" \\\nCXXFLAGS=\"-fsanitize=address,fuzzer-no-link -fno-omit-frame-pointer -fno-common -fPIC -g\" \\\n    gem install \u003Cgem-name>\n```\n\n### Build Flags\n\n| Flag | Purpose |\n|------|---------|\n| `-fsanitize=address,fuzzer-no-link` | Enable AddressSanitizer and fuzzer instrumentation |\n| `-fno-omit-frame-pointer` | Improve stack trace quality |\n| `-fno-common` | Better compatibility with sanitizers |\n| `-fPIC` | Position-independent code for shared libraries |\n| `-g` | Include debug symbols |\n\n## Running Campaigns\n\n### Environment Setup\n\nBefore running any fuzzing campaign, set ASAN_OPTIONS:\n\n```bash\nexport ASAN_OPTIONS=\"allocator_may_return_null=1:detect_leaks=0:use_sigaltstack=0\"\n```\n\n**Options explained:**\n1. `allocator_may_return_null=1`: Skip common low-impact allocation failures (DoS)\n2. `detect_leaks=0`: Ruby interpreter leaks data, ignore these for now\n3. `use_sigaltstack=0`: Ruby recommends disabling sigaltstack with ASan\n\n### Basic Run\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby harness.rb\n```\n\n**Note:** `LD_PRELOAD` is required for sanitizer injection. Unlike `ASAN_OPTIONS`, do not export it as it may interfere with other programs.\n\n### With Corpus\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby harness.rb \u002Fpath\u002Fto\u002Fcorpus\n```\n\n### Passing libFuzzer Options\n\nAll libFuzzer options can be passed as arguments:\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby harness.rb \u002Fpath\u002Fto\u002Fcorpus -max_len=1024 -timeout=10\n```\n\nSee [libFuzzer options](https:\u002F\u002Fllvm.org\u002Fdocs\u002FLibFuzzer.html#options) for full reference.\n\n### Reproducing Crashes\n\nRe-run a crash case by passing the crash file:\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby harness.rb .\u002Fcrash-253420c1158bc6382093d409ce2e9cff5806e980\n```\n\n### Interpreting Output\n\n| Output | Meaning |\n|--------|---------|\n| `INFO: Running with entropic power schedule` | Fuzzing campaign started |\n| `ERROR: AddressSanitizer: heap-use-after-free` | Memory corruption detected |\n| `SUMMARY: libFuzzer: fuzz target exited` | Ruby exception occurred |\n| `artifact_prefix='.\u002F'; Test unit written to .\u002Fcrash-*` | Crash input saved |\n| `Base64: ...` | Base64 encoding of crash input |\n\n## Sanitizer Integration\n\n### AddressSanitizer (ASan)\n\nRuzzy includes a pre-compiled AddressSanitizer library:\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby harness.rb\n```\n\nUse ASan for detecting:\n- Heap buffer overflows\n- Stack buffer overflows\n- Use-after-free\n- Double-free\n- Memory leaks (disabled by default in Ruzzy)\n\n### UndefinedBehaviorSanitizer (UBSan)\n\nRuzzy also includes UBSan:\n\n```bash\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::UBSAN_PATH') \\\n    ruby harness.rb\n```\n\nUse UBSan for detecting:\n- Signed integer overflow\n- Null pointer dereferences\n- Misaligned memory access\n- Division by zero\n\n### Common Sanitizer Issues\n\n| Issue | Solution |\n|-------|----------|\n| Ruby interpreter leak warnings | Use `ASAN_OPTIONS=detect_leaks=0` |\n| Sigaltstack conflicts | Use `ASAN_OPTIONS=use_sigaltstack=0` |\n| Allocation failure spam | Use `ASAN_OPTIONS=allocator_may_return_null=1` |\n| LD_PRELOAD interferes with tools | Don't export it; set inline with ruby command |\n\n> **See Also:** For detailed sanitizer configuration, common issues, and advanced flags,\n> see the **address-sanitizer** and **undefined-behavior-sanitizer** technique skills.\n\n## Real-World Examples\n\n### Example: msgpack-ruby\n\nFuzzing the msgpack MessagePack parser for memory corruption.\n\n**Install with sanitizers:**\n\n```bash\nMAKE=\"make --environment-overrides V=1\" \\\nCC=\"\u002Fpath\u002Fto\u002Fclang\" \\\nCXX=\"\u002Fpath\u002Fto\u002Fclang++\" \\\nLDSHARED=\"\u002Fpath\u002Fto\u002Fclang -shared\" \\\nLDSHAREDXX=\"\u002Fpath\u002Fto\u002Fclang++ -shared\" \\\nCFLAGS=\"-fsanitize=address,fuzzer-no-link -fno-omit-frame-pointer -fno-common -fPIC -g\" \\\nCXXFLAGS=\"-fsanitize=address,fuzzer-no-link -fno-omit-frame-pointer -fno-common -fPIC -g\" \\\n    gem install msgpack\n```\n\n**Harness (`fuzz_msgpack.rb`):**\n\n```ruby\n# frozen_string_literal: true\n\nrequire 'msgpack'\nrequire 'ruzzy'\n\ntest_one_input = lambda do |data|\n  begin\n    MessagePack.unpack(data)\n  rescue Exception\n    # We're looking for memory corruption, not Ruby exceptions\n  end\n  return 0\nend\n\nRuzzy.fuzz(test_one_input)\n```\n\n**Run:**\n\n```bash\nexport ASAN_OPTIONS=\"allocator_may_return_null=1:detect_leaks=0:use_sigaltstack=0\"\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby fuzz_msgpack.rb\n```\n\n### Example: Pure Ruby Target\n\nFuzzing pure Ruby code with a custom parser.\n\n**Tracer (`test_tracer.rb`):**\n\n```ruby\n# frozen_string_literal: true\n\nrequire 'ruzzy'\n\nRuzzy.trace('test_harness.rb')\n```\n\n**Harness (`test_harness.rb`):**\n\n```ruby\n# frozen_string_literal: true\n\nrequire 'ruzzy'\nrequire_relative 'my_parser'\n\ntest_one_input = lambda do |data|\n  begin\n    MyParser.parse(data)\n  rescue StandardError\n    # Expected exceptions from malformed input\n  end\n  return 0\nend\n\nRuzzy.fuzz(test_one_input)\n```\n\n**Run:**\n\n```bash\nexport ASAN_OPTIONS=\"allocator_may_return_null=1:detect_leaks=0:use_sigaltstack=0\"\nLD_PRELOAD=$(ruby -e 'require \"ruzzy\"; print Ruzzy::ASAN_PATH') \\\n    ruby test_tracer.rb\n```\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| Installation fails | Wrong clang version or path | Verify clang path, use clang 14.0.0+ |\n| `cannot open shared object file` | LD_PRELOAD not set | Set LD_PRELOAD inline with ruby command |\n| Fuzzer immediately exits | Missing corpus directory | Create corpus directory or pass as argument |\n| No coverage progress | Pure Ruby needs tracer | Use tracer script for pure Ruby code |\n| Leak detection spam | Ruby interpreter leaks | Set `ASAN_OPTIONS=detect_leaks=0` |\n| Installation debug needed | Compilation errors | Use `RUZZY_DEBUG=1 gem install --verbose ruzzy` |\n\n## Related Skills\n\n### Technique Skills\n\n| Skill | Use Case |\n|-------|----------|\n| **fuzz-harness-writing** | Detailed guidance on writing effective harnesses |\n| **address-sanitizer** | Memory error detection during fuzzing |\n| **undefined-behavior-sanitizer** | Detecting undefined behavior in C extensions |\n| **libfuzzer** | Understanding libFuzzer options (Ruzzy is built on libFuzzer) |\n\n### Related Fuzzers\n\n| Skill | When to Consider |\n|-------|------------------|\n| **libfuzzer** | When fuzzing Ruby C extension code directly in C\u002FC++ |\n| **aflpp** | Alternative approach for fuzzing Ruby by instrumenting Ruby interpreter |\n\n## Resources\n\n### Key External Resources\n\n**[Introducing Ruzzy, a coverage-guided Ruby fuzzer](https:\u002F\u002Fblog.trailofbits.com\u002F2024\u002F03\u002F29\u002Fintroducing-ruzzy-a-coverage-guided-ruby-fuzzer\u002F)**\nOfficial Trail of Bits blog post announcing Ruzzy, covering motivation, architecture, and initial results.\n\n**[Ruzzy GitHub Repository](https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fruzzy)**\nSource code, additional examples, and development instructions.\n\n**[libFuzzer Documentation](https:\u002F\u002Fllvm.org\u002Fdocs\u002FLibFuzzer.html)**\nSince Ruzzy is built on libFuzzer, understanding libFuzzer options and behavior is valuable.\n\n**[Fuzzing Ruby C extensions](https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fruzzy#fuzzing-ruby-c-extensions)**\nDetailed guide on fuzzing C extensions with compilation flags and examples.\n\n**[Fuzzing pure Ruby code](https:\u002F\u002Fgithub.com\u002Ftrailofbits\u002Fruzzy#fuzzing-pure-ruby-code)**\nDetailed guide on the tracer pattern required for pure Ruby fuzzing.\n",{"name":5,"type":23,"description":7},"fuzzer","main","f37de8f681f0c0ca0e0ebab6e5fddf764ca7553d","skills\u002Fruzzy",1,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one","https:\u002F\u002Fagisota.github.io\u002Fold-one\u002F","https:\u002F\u002Fgithub.com\u002Fagisota","pzd.world","2026-07-04 22:32:06",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add agisota\u002Fold-one --skill ruzzy",{"tool":39,"command":40},"bunx","bunx skills add agisota\u002Fold-one --skill ruzzy",{"tool":42,"command":43},"pnpm","pnpm dlx skills add agisota\u002Fold-one --skill ruzzy","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fruzzy\u002FSKILL.md",true,[],[48,55,62,71,78,85],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":18},"01M75KRGZWQWE9JDBS6RX42NWV","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M75KRCZHKE0ZYAQFFYHS0YNP","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":66,"licenseFileUrl":67,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M75KR94KYQ30DTE1P9WNDAE0","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M75KR3H13YJ9QHMD49818FA1","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M75KQMPY8A4Y8XTDD2DT0M9T","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M75KQHNZ0ANZNJGZY6M8MDAK","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-api\u002FSKILL.md",[],[]]