codex-companion
Warn
Audited by Gen Agent Trust Hub on Apr 19, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONPROMPT_INJECTIONDATA_EXFILTRATIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The
runCommandfunction inscripts/lib/process.mjsexecutes shell commands withshell: truewhen running on Windows platforms. This introduces a command injection vulnerability where user-controlled arguments, such as branch names passed to the--baseflag inrevieworadversarial-reviewcommands, are passed directly to subprocesses likegit(e.g.,git merge-base HEAD <ref>) without sanitization. - [PROMPT_INJECTION]: The skill is vulnerable to Indirect Prompt Injection (Category 8). It ingests untrusted repository data, including uncommitted changes and branch diffs, and interpolates this content into reasoning prompts. Evidence chain:
- Ingestion points:
scripts/lib/git.mjscollects working tree state and branch diffs. - Boundary markers: The
prompts/adversarial-review.mdtemplate uses<repository_context>XML-like tags to delimit the ingested data. - Capability inventory: The skill has significant capabilities, including file modification via
task --write, and arbitrary shell execution throughgitandnodesubprocesses. - Sanitization: No explicit sanitization or escaping of the repository content is performed before interpolation into the prompt.
- [DATA_EXFILTRATION]: The skill collects the entire context of the repository (diffs, staged changes, and untracked files) and transmits it to the OpenAI Codex service for analysis. While this is the intended primary purpose of the skill, it involves reading and sending potentially sensitive source code externally.
- [EXTERNAL_DOWNLOADS]: The skill requires and encourages the installation of the
@openai/codexpackage from the official NPM registry. This is a well-known tool, and the installation finding is noted neutrally as it targets a well-known service.
Audit Metadata