Back to skill

Security audit

PPT Produce by Codex

Security checks for vulnerabilities and agentic risk

Overview

The skill is mainly a PPT-generation workflow, but it needs review because it tells agents to read a shell profile and send an API key to a configurable endpoint.

Install only if you are comfortable with the agent using image-generation APIs and writing project files under workspace/. Before use, avoid running the provided shell-profile API check as written: do not source ~/.zshrc automatically, validate any custom OPENAI_BASE_URL, require HTTPS, and only send API keys to providers you explicitly trust.

Vulnerability Patterns
  • 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
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
references/ppt-production-guide.md:116
Finding

Unsafe shell profile execution during API capability checks

Content
View full analysis
/dev/null 2>&1 || true; printf "OPENAI_BASE_URL=%s\n" "${OPENAI_BASE_URL:-}"; if [ -n "${OPENAI_API_KEY:-}" ]; then echo "OPENAI_API_KEY=present"; else echo "OPENAI_API_KEY=missing"; fi; curl -sS -H "Authorization: Bearer ${OPENAI_API_KEY}" "${OPENAI_BASE_URL%/}/models" | python3 -c "import sys,json; data=json.load(sys.stdin); ids=[m.get(\"id\",\"\") for m in data.get(\"data\",[])]; print(\"gpt-image-2 available=\" + str(any(i==\"gpt-image-2\" for i in ids))); print(\"model_count=\" + str(len(ids)))"' ``` ### Technical Analysis The documented API check explicitly sources `~/.zshrc`. A shell initialization file is executable shell code rather than a structured configuration file. It may contain commands, command substitutions, plugin bootstrap logic, functions, aliases, network operations, or references to other mutable scripts. Consequently, invoking this check executes every command in the profile with the privileges of the user running the Skill. This exceeds the minimum action necessary to determine whether two environment variables are present and query an API endpoint. Suppressing standard output and standard error does not provide isolation. It only conceals output from commands executed by the profile. The `|| true` clause also suppresses profile-loading failures, potentially hiding indicators that unintended commands ran. This is not the `curl | bash` pattern reported by the static pre-scan. The response from `curl` is passed to a fixed Python JSON parser and is not executed as shell code. No remote payload retrieval and execution was identified. The actual concern is execution of arbitrary local startup-file content before the API query. ### Attack Path 1. An attacker, compromised shell plugin ...[truncated 1450 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/ppt-production-guide.md:116
Finding

API credential can be transmitted to an unvalidated endpoint

Content
View full analysis
/dev/null 2>&1 || true; printf "OPENAI_BASE_URL=%s\n" "${OPENAI_BASE_URL:-}"; if [ -n "${OPENAI_API_KEY:-}" ]; then echo "OPENAI_API_KEY=present"; else echo "OPENAI_API_KEY=missing"; fi; curl -sS -H "Authorization: Bearer ${OPENAI_API_KEY}" "${OPENAI_BASE_URL%/}/models" | python3 -c "import sys,json; data=json.load(sys.stdin); ids=[m.get(\"id\",\"\") for m in data.get(\"data\",[])]; print(\"gpt-image-2 available=\" + str(any(i==\"gpt-image-2\" for i in ids))); print(\"model_count=\" + str(len(ids)))"' ``` ### Technical Analysis The command places `OPENAI_API_KEY` in an HTTP `Authorization` header and sends it to the host specified by `OPENAI_BASE_URL`. The URL is taken from executable shell-profile state without validation of: - The URL scheme. - The destination hostname. - Whether the endpoint is an approved OpenAI-compatible service. - Whether plaintext HTTP is being used. - Whether the credential is intended for that specific service. Configurable base URLs may be legitimate for compatible API providers, but a bearer credential must not be forwarded to an arbitrary destination without validation and explicit trust. Sourcing `~/.zshrc` immediately before the request further increases the risk because profile code can replace the endpoint value. The command prints only whether the key is present and does not directly print the key. The vulnerability is the potential disclosure through the outbound authorization header, not terminal output. No evidence shows that the repository contains a hardcoded malicious destination or that actual exfiltration has already occurred. ### Attack Path 1. An attacker or compromised configuration changes `OPENAI_BASE_URL` to an attacker-controlled URL, such as `https://attacker.example`. ...[truncated 1175 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
Findings (14)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
ces/ppt-production-guide.md` when planning or executing a real deck. Keep this `SKILL.md` as the quick operating procedure.

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 · SKILL.md (reported line 135)May include surrounding context.

describe categories of forbidden text; avoid repeating long forbidden phrases.

text

Never let the slide show prompt field names, task wording, internal discussion, review notes, or "this page should..." language.

## Visual Direction

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

The guide includes a shell command that sources ~/.zshrc, reads OPENAI_API_KEY and OPENAI_BASE_URL from the environment, and performs a network request with the bearer token. Even though it targets a model-listing endpoint, this pattern encourages secret handling and outbound requests from within the skill workflow, which can expose credentials or send them to an attacker-controlled base URL if OPENAI_BASE_URL is maliciously set. In the context of a PPT skill, this is especially risky because external authenticated network access is not essential to most document-authoring logic and should not be driven by embedded shell snippets.

Content

Scanner excerpt · references/ppt-production-guide.md (reported line 116)May include surrounding context.

检查 API 参考命令:

bash
cd {项目根目录}
zsh -lc 'source ~/.zshrc >/dev/null 2>&1 || true; printf "OPENAI_BASE_URL=%s\n" "${OPENAI_BASE_URL:-}"; if [ -n "${OPENAI_API_KEY:-}" ]; then echo "OPENAI_API_KEY=present"; else echo "OPENAI_API_KEY=missing"; fi; curl -sS -H "Authorization: Bearer ${OPENAI_API_KEY}" "${OPENAI_BASE_URL%/}/models" | python3 -c "import sys,json; data=json.load(sys.stdin); ids=[m.get(\"id\",\"\") for m in data.get(\"data\",[])]; print(\"gpt-image-2 available=\" + str(any(i==\"gpt-image-2\" for i in ids))); print(\"model_count=\" + str(len(ids)))"'

检查残留进程:

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The guide expands a PPT-generation skill into frontend/system prototype development, including local development and serving a dev server. This is a material scope increase that can cause the agent to create and run code, open services, and handle broader project assets beyond slide production, increasing the attack surface substantially. In this skill context, the mismatch between advertised purpose and operational instructions makes the behavior more dangerous because users may authorize a presentation task without expecting code execution or server exposure.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% 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 3)May include surrounding context.

md
---
name: ppt-produce-bycodex
description: Create and iterate enterprise application software solution PPTs as full-page PNG slides and optional PPTX decks. Use when the user wants to start, design, generate, redraw, repair, batch-produce, or package a business/consulting/enterprise software solution presentation, especially with imagegen/gpt-image-2, PPT PNG pages, contact sheets, PPTX assembly, or 413/too-large fallback handling.
---

# PPT Produce by Codex

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation text is very broad, covering nearly any presentation-related creation or iteration task. Overbroad triggering can cause the skill to engage in situations the user did not intend, increasing the chance that risky sub-instructions—such as credential inspection or file operations—are invoked unnecessarily.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly instructs the agent to read ~/.zshrc for OPENAI_API_KEY and OPENAI_BASE_URL and probe /models before running batches. Accessing shell configuration and credential-bearing environment setup is broader than necessary for PPT production and can expose secrets or normalize unnecessary credential handling in a content-generation workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs access to environment-based API credentials without any user-facing warning, consent flow, or boundary on secret handling. This creates a clear risk of secret exposure, misuse, or inadvertent propagation into logs, prompts, or downstream tooling.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file is entirely framed in Chinese and instructs the agent how to continue the task in that language/context, but it does not state that language selection is optional or user-driven. Under the policy, forcing a specific language without opt-in is a natural-language locale violation unless the regional constraint is clearly justified.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill directs the agent to inspect shell startup files, enumerate processes, and call command-line utilities to validate API configuration. For a PPT-production skill, this exceeds the minimum scope needed for presentation authoring and increases exposure to sensitive environment data such as API endpoints, process metadata, and local system state. In skill context, this is more dangerous because the instructions normalize system inspection as part of routine use, which can lead to unnecessary collection or disclosure of host information.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file specifies 'Navy bold Chinese main title,' which imposes a language/locale requirement in the template instructions. Because the document does not offer a user opt-in or explain that this template is only for a Chinese-language or region-specific context, it appears to violate the policy against forcing a specific language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prompt fragment explicitly says 'Use navy bold Chinese typography,' which directs generated output toward a specific language/locale. There is no accompanying note that this is optional, user-selected, or required for a region-specific compliance context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The embedded handoff template is entirely written in Chinese and presents a fixed-language workflow for continuing the task. There is no indication that the user can choose another language or that the Chinese-only requirement is justified by a documented region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The closing section presents contact and tutorial information entirely in Chinese, even though the rest of the skill is in English and there is no indication that the user opted into that locale. This creates a language/locale policy mismatch by imposing a specific language without choice or documented justification.

Content

No source excerpt is available for this finding.