codex-agent
Fail
Audited by Gen Agent Trust Hub on Feb 17, 2026
Risk Level: HIGHCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSREMOTE_CODE_EXECUTION
Full Analysis
- [COMMAND_EXECUTION] (HIGH): The script
scripts/codex-wrapper.shis vulnerable to shell command injection. It constructs a command string by interpolating the$TASKvariable and then executes it usingeval. Since the task description is provided by the AI agent based on user prompts, a malicious prompt can inject arbitrary shell commands (e.g., using;,&, or backticks) that will be executed on the host system. - Evidence:
scripts/codex-wrapper.shlines 105-108:CMD="$CMD \"$TASK\""followed byeval $CMD. - [EXTERNAL_DOWNLOADS] (HIGH): The skill mandates the installation of
@openai/codexvianpm install -g. This package is not an official OpenAI release and appears to be an unverified third-party tool. Requiring users to install global npm packages from unverified sources poses a significant supply chain risk, as the package could contain malicious code or be a victim of typosquatting. - Evidence:
README.mdandSKILL.mdPrerequisites sections. - [REMOTE_CODE_EXECUTION] (MEDIUM): The skill's documentation in
advanced.mdencourages adding remote Model Context Protocol (MCP) servers via arbitrary URLs. This allows the agent to dynamically integrate and execute tool definitions from untrusted network locations, potentially leading to remote code execution if the remote server is compromised or malicious. - Evidence:
advanced.mdsection 'Add MCP Server (HTTP)'. - [PROMPT_INJECTION] (LOW): The
SKILL.mduses authoritative language ('MANDATORY', 'MUST') to override default agent behavior. While intended for workflow enforcement, this pattern can be used to bypass an agent's standard operational constraints. - [DATA_EXFILTRATION] (LOW): The skill documentation highlights the use of
CODEX_API_KEYandcodex login, which involves handling sensitive credentials. While common for CLI tools, the lack of explicit credential safety guidance increases the risk of accidental exposure. - [INDIRECT_PROMPT_INJECTION] (LOW): The skill is inherently vulnerable to indirect prompt injection because it processes output from an external tool (
codex) and uses it to perform file edits via theEdittool without sanitization. - Evidence Chain:
- Ingestion points:
/tmp/codex-review.md(read inSKILL.mdStep 2). - Boundary markers: None; the agent is instructed to read the raw file content.
- Capability inventory:
Bash,Write,Edit(listed inSKILL.mdYAML). - Sanitization: None; instructions mandate: 'Apply the fix using Edit tool' based directly on the parsed external feedback.
- Ingestion points:
Recommendations
- AI detected serious security threats
Audit Metadata