RSpec Test Framework
Fail
Audited by Gen Agent Trust Hub on Feb 21, 2026
Risk Level: HIGHCOMMAND_EXECUTIONREMOTE_CODE_EXECUTION
Full Analysis
- [COMMAND_EXECUTION] (HIGH): The
run-test.rbscript is vulnerable to shell command injection. The--fileargument is interpolated directly into a shell command string passed tosystem()without any sanitization or escaping. - Evidence: In
run-test.rb, the lineresult = system("rspec #{options[:file]} --format json")allows an attacker to append commands using shell metacharacters (e.g.,;,&,|). - [REMOTE_CODE_EXECUTION] (HIGH): The
generate-test.rbscript allows for Ruby code injection. It takes the--descriptionand--sourceinputs and interpolates them directly into a Ruby code template, which is then written to a file and subsequently executed by the runner. - Evidence: In
generate-test.rb, thetemplatevariable uses#{options[:description]}and#{options[:source]}inside a heredoc. A malicious description like' do system('id'); end #would result in the execution of the injected Ruby code when the test file is run. - [Indirect Prompt Injection] (LOW): The skill creates a significant attack surface by taking user-supplied strings and placing them into executable contexts. If the agent populates these fields using untrusted data (like a user's request or a website's content), it leads to indirect injection.
- Ingestion points:
options[:description]andoptions[:source]ingenerate-test.rb;options[:file]inrun-test.rb. - Boundary markers: None present. Input is treated as trusted data.
- Capability inventory:
File.write(to create scripts) andsystem()(to execute commands). - Sanitization: None. No escaping or validation is performed on the input strings before they are used in file generation or shell commands.
Recommendations
- AI detected serious security threats
Audit Metadata