Back to skill

Security audit

Speech Generation Skill

Security checks for vulnerabilities and agentic risk

Overview

This speech-generation skill is mostly aligned with its purpose, but it includes unsafe guidance to disable Codex approval controls and has a batch output path weakness.

Install only if you are comfortable using a local CLI that sends your text to the OpenAI Audio API and writes generated audio files. Do not follow the documented approval_policy = "never" or --ask-for-approval never guidance unless you fully understand the broader Codex security impact; prefer approving the specific speech command instead. Treat batch JSONL files as trusted input, avoid --force on untrusted batches, and review any per-job out paths before running.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/text_to_speech.py:406
Finding

Batch Output Path Traversal Allows Writes Outside the Designated Directory

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
references/codex-network.md:11
Finding

Network Troubleshooting Guidance Recommends Disabling Agent Approval Controls

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:41
Finding

OpenAI SDK Is Installed Without Version or Integrity Pinning

Content
View full analysis
Remediation
View remediation
\ --hash=sha256: ``` 8. Replace `uv run --with openai` with execution against the locked environment so routine Skill invocation does not dynamically resolve mutable dependencies. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (8)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/cli.md (reported line 98)May include surrounding context.

python "$TTS_GEN" speak-batch --input tmp/speech/jobs.jsonl --out-dir out --rpm 50

Cleanup (recommended)

rm -f tmp/speech/jobs.jsonl

text

Notes:

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
92% confidence
Finding

The document advises users to set approval_policy = "never" and enable network access in a persistent agent config, which materially weakens execution safeguards for future sessions. In the context of a skill that requires outbound API calls, this guidance can normalize disabling approvals and expanding trust boundaries, increasing the chance that untrusted code or prompts trigger networked actions without user review.

Content

Scanner excerpt · references/codex-network.md (reported line 13)May include surrounding context.

If you trust the repo and want fewer prompts, enable network access for the relevant sandbox mode and relax the approval policy.

Example ~/.codex/config.toml pattern:

text
approval_policy = "never"

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/text_to_speech.py (reported line 180)May include surrounding context.

python
if instructions and model in {"tts-1", "tts-1-hd"}:
        _warn("instructions are not supported for tts-1 / tts-1-hd; ignoring.")
        return None
    return instructions


def _print_payload(payload: Dict[str, Any]) -> None:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill instructs the agent to read files, access environment configuration, install dependencies, and make live network API calls, but it declares no explicit tool scope or permission boundaries. That mismatch can cause the agent to invoke higher-risk capabilities implicitly, increasing the chance of overreach, accidental secret exposure, or unauthorized network/file access during normal skill execution.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
2. Set `OPENAI_API_KEY` as an environment variable in their system.
3. Offer to guide them through setting the environment variable for their OS/shell if needed.

- Never ask the user to paste the full key in chat. Ask them to set it locally and confirm when ready.

If installation isn't possible in this environment, tell the user which dependency is missing and how to install it locally.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This is a markdown/manifest-context trigger description, so SQP-1 applies. Phrases like "accessibility reads" and "audio prompts" are relatively open-ended and the file does not provide negative examples or a bounded activation context, which could cause unintended invocation for general audio-related requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The markdown specifies "Voice: cedar" as a default, which can function as a language/locale or presentation constraint without any indication that the user may choose alternatives. Under the policy rule, fixed defaults that may impose a specific locale or voice characteristic without opt-in can be considered a natural-language policy concern.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/text_to_speech.py (reported line 145)May include surrounding context.

python
def _extract_retry_after_seconds(exc: Exception) -> Optional[float]:
    for attr in ("retry_after", "retry_after_seconds"):
        val = getattr(exc, attr, None)
        if isinstance(val, (int, float)) and val >= 0:
            return float(val)
    msg = str(exc)