code-runner
Warn
Audited by Gen Agent Trust Hub on Sep 24, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONDYNAMIC_EXECUTIONPRIVILEGE_ESCALATIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The
run.jsandbenchmark.jsscripts are designed to execute arbitrary code snippets viachild_process.spawn. This includes support for/bin/bashandpython3, granting the skill the ability to perform any action the host user is authorized to do. - [DYNAMIC_EXECUTION]: The
eval.jsscript uses thenew Function()constructor to evaluate JavaScript expressions provided as command-line arguments. While it attempts to implement a restricted global context, this mechanism remains a vector for dynamic code execution. - [PRIVILEGE_ESCALATION]: The
run.jsscript provides an--envflag that accepts a JSON object to set environment variables for the child process. This capability can be used to inject dangerous variables such asLD_PRELOAD,NODE_OPTIONS, orPYTHONPATHto manipulate the behavior of the executed code or the runtime environment. - [INDIRECT_PROMPT_INJECTION]: The skill acts as a high-privilege sink for agent instructions. An attacker could potentially use indirect injection to cause the agent to execute malicious code through these tools.
- Ingestion points: Untrusted code input via the command-line argument or
--stdinflag inrun.jsandeval.js. - Boundary markers: None identified; the skill assumes all provided input is intended for execution.
- Capability inventory: Full file system access, shell execution, and environment variable manipulation.
- Sanitization: Minimal; the code is written directly to temporary files in the system's temp directory before execution.
Audit Metadata