Back to skill

Security audit

Codex Skill

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill benign because the reported concerns relate to selecting a model and keeping a long-running task alive, while the available findings are considered consistent with its purpose; evidence is incomplete because Skillspector reported partial analysis.

Consider whether you are comfortable with model selection potentially using your account quota or billing, and with a task continuing after the interactive session ends. ClawScan's verdict is benign, not a guarantee of zero risk; Skillspector marked its analysis partial because several local references could not be resolved.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · SKILL.md (reported line 132)May include surrounding context.

Verified against codex-cli 0.172.0:

bash
codex exec \
  -C /absolute/path/to/repository \
  -m gpt-6.2-sol \
  -c 'model_reasoning_effort="medium"' \

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · SKILL.md (reported line 193)May include surrounding context.

To correct, resume the same session with concrete evidence. A cleanup request riding along with a fix ("simplify it if you can") widens the scope: name the behavior it must keep, or leave it out. One once dropped a deliberate case while tidying an effect. Options precede the subcommand:

bash
codex exec -C /absolute/path/to/repository -m <same model> -c 'model_reasoning_effort="<same>"' \
  --approve-for-me -o /unique/path/fix.md \
  resume <SESSION_ID> - < /unique/path/findings.md

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 153)May include surrounding context.

Run it and confirm it actually ran

Long runs exceed foreground tool timeouts. Prefer background execution, writing the exit status where nothing can overwrite it, and detach it from your session: a run started as your own background job dies with it, and a restart or context compaction killed five runs mid-edit. setsid nohup is not enough where the host kills its whole cgroup on restart, as one did mid-run; on Linux with systemd, run it as a transient user unit instead, and fall back to setsid nohup elsewhere:

bash
systemd-run --user --unit=codex-<task> --collect bash -c 'codex exec ... > out.log 2> err.log; echo $? > exit.code'

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 153)May include surrounding context.

Run it and confirm it actually ran

Long runs exceed foreground tool timeouts. Prefer background execution, writing the exit status where nothing can overwrite it, and detach it from your session: a run started as your own background job dies with it, and a restart or context compaction killed five runs mid-edit. setsid nohup is not enough where the host kills its whole cgroup on restart, as one did mid-run; on Linux with systemd, run it as a transient user unit instead, and fall back to setsid nohup elsewhere:

bash
systemd-run --user --unit=codex-<task> --collect bash -c 'codex exec ... > out.log 2> err.log; echo $? > exit.code'

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 158)May include surrounding context.

bash
systemd-run --user --unit=codex-<task> --collect bash -c 'codex exec ... > out.log 2> err.log; echo $? > exit.code'
# without systemd:
setsid nohup bash -c 'codex exec ... > out.log 2> err.log; echo $? > exit.code' < /dev/null > /dev/null 2>&1 &

Never append ; echo "EXIT=$?" or any trailing command to the invocation, and never read a pipeline's exit code. The trailing command's own success becomes the status, so a failed run reports 0, and pnpm test 2>&1 | tail -40 reports tail's status. Trust the runner's summary line.

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 158)May include surrounding context.

bash
systemd-run --user --unit=codex-<task> --collect bash -c 'codex exec ... > out.log 2> err.log; echo $? > exit.code'
# without systemd:
setsid nohup bash -c 'codex exec ... > out.log 2> err.log; echo $? > exit.code' < /dev/null > /dev/null 2>&1 &

Never append ; echo "EXIT=$?" or any trailing command to the invocation, and never read a pipeline's exit code. The trailing command's own success becomes the status, so a failed run reports 0, and pnpm test 2>&1 | tail -40 reports tail's status. Trust the runner's summary line.