aibugs

Detect command injection vulnerabilities in radare2 C code workflows.

20|1|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/radareorg/radare2-skills --skill aibugs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aibugs
Source: https://github.com/radareorg/radare2-skills/tree/main/dev/aibugs
Command: npx skills add https://github.com/radareorg/radare2-skills --skill aibugs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you identify real bug and vulnerability patterns in radare2-oriented C code, especially cases where attacker-controlled data can lead to command injection through libc-like APIs and radare2 command execution paths.

Core Features & Use Cases

  • Command injection detection: Reviews usage of radare2 core command APIs and flags risky parsing behavior when special characters are attacker-influenced.
  • Safer API guidance: Prioritizes safer alternatives such as call-oriented functions and temporal control primitives instead of injecting untrusted strings into command interpreters.
  • Autogenerated script review: Guides you to inspect autogenerated “*” command outputs by tracing r_cons_printf usage to ensure generated scripts do not amplify injection risk.

Quick Start

Use aibugs to audit a C code change for command-injection and shell-injection risk, then recommend minimal, surgical fixes that use appropriate sanitization and safer radare2 APIs.

Frequently Asked Questions about aibugs

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

FAQPage Schema
How do I find command injection vulnerabilities in radare2 C code?

Find command injection vulnerabilities in radare2 C code by identifying risky parsing behavior where attacker-controlled data flows into r_core_cmd-style execution paths and unsafe console syntax handling.

How do I prevent shell injection in autogenerated radare2 command scripts?

Prevent shell injection in autogenerated radare2 scripts by tracing r_cons_printf usage to inspect generated “*” command outputs, ensuring special characters do not amplify injection risk.

What is the safest way to execute radare2 core commands with untrusted input?

The safest way to execute radare2 core commands with untrusted input is replacing risky parsing with safer r_core_call or call_at patterns instead of injecting untrusted strings into command interpreters.

How do I sanitize special characters in radare2 C APIs?

Sanitize special characters in radare2 C APIs by applying correct sanitization helpers like r_str_sanitize and related functions to untrusted input before passing it to command execution paths.

Can I use this to audit C code changes for radare2 workflow vulnerabilities?

Yes, you can audit C code changes for radare2 workflow vulnerabilities by verifying identified issues with r2 oneliners and applying minimal surgical fixes using safer APIs and proper sanitization.

Why does attacker-controlled input cause command injection in radare2?

Attacker-controlled input causes command injection in radare2 when unsafe parsing allows special characters to be interpreted by libc-like APIs and command execution paths instead of being properly sanitized.