T09 · Insecure Skill Coding Practices
- Location
scripts/codex_backend.py:105- Finding
Untrusted slide content is delegated to an autonomous full-access Codex agent
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a real PPT-generation tool, but it needs review because an optional backend delegates untrusted slide text to a full-auto Codex subprocess and a legacy script contradicts the stated credential scoping.
Install only if you are comfortable with the optional Codex backend's broad local authority, or avoid it entirely and use the default direct API/native image path. Prefer a scoped `.env`, review `OPENAI_BASE_URL` and `VISION_BASE_URL` before use, do not run the legacy root `generate_ppt.py`, and consider installing dependencies in a virtual environment.
scripts/codex_backend.py:105Untrusted slide content is delegated to an autonomous full-access Codex agent
generate_ppt.py:44Legacy entry point performs implicit parent-directory credential loading
install_as_skill.sh:122Installer copies API credentials through a predictable shared temporary path
requirements.txt:1Installer executes dependencies selected by unbounded version ranges
The code’s core purpose generally aligns with image-based PPT slide generation and HTML viewer creation, so it is not unrelated or malicious. However, the declared description overstates important capabilities that are absent from the supplied code chunk. Specifically, there is no generation of a PowerPoint .pptx file, no parsing or imitation of a user-supplied .pptx template, and no built-in implementation of the named 10 curated styles beyond loading a provided style text file. Because these are user-visible primary capabilities rather than minor implementation details, this is a material description-behavior mismatch.
The declared purpose focuses on end-user functionality: creating visually styled PPT slides and cloned-template presentations. The actual code shown does not generate slides, call gpt-image-2, create PPTX/HTML output, or implement presentation styles. Instead, it performs setup and deployment tasks for the skill itself. Those behaviors are materially different from the declared primary purpose and include filesystem modification and dependency installation that are not reflected in the description. While installation can support the overall project, this code chunk’s actual function is installer/configuration logic, not PPT generation.
The declared description presents a complete presentation-generation skill: style selection, template cloning from .pptx, and final outputs including an HTML viewer and a 16:9 PPTX. The actual code chunk is much narrower: it is a helper backend that shells out to codex exec to generate one slide image PNG based on an image prompt, with optional reference image guidance. While this could be a supporting component of a larger PPT-generation system, the supplied code itself does not perform the primary advertised functions. Therefore the description materially overstates what this code chunk actually does.
The declared description is for a full presentation-generation skill: styled PPT slide creation, template-clone mode for .pptx inputs, and exporting both HTML viewer and .pptx. The supplied code chunk does not do those things. It is narrowly focused on generating and saving one image from a prompt via OpenAI-compatible endpoints, optionally using a reference image for visual style guidance. While this could be a supporting component of a larger PPT generator, on its own it materially under-delivers relative to the declared primary purpose. There are no obvious unrelated malicious capabilities, but the implementation shown is only an image-generation module, not a PowerPoint generation pipeline.
The declared description promises a full presentation-generation capability centered on styled slide rendering, image generation, template mimicry, and production of final deliverables like HTML and .pptx files. The actual code shown does none of that. It only reads a markdown slide plan, parses frontmatter and slide headings, assigns page/layout metadata, and emits a JSON plan file. This is a supporting preprocessing utility at most, not the described end-user PPT generation system. Therefore the description does not accurately represent the behavior of this code chunk.
The declared description presents a full presentation-generation skill centered on gpt-image-2 image synthesis and stylized PPT creation. The supplied code chunk instead performs a narrow preprocessing/rendering task: taking an existing PPTX file, converting it to PDF, and rasterizing each page to PNG images. While this could support a template-clone pipeline, the chunk itself does not generate slides, mimic templates in output decks, invoke any OpenAI model, or create HTML/PPT deliverables described in the declaration. Therefore the actual behavior is materially different from the declared primary purpose.
The skill explicitly instructs users to place API keys in .env files and describes runtime loading of credentials from several skill-related filesystem locations. In a skill that also uses shell, file access, and network operations, handling secrets this way increases the risk of accidental disclosure, misuse by downstream scripts, or unintended transmission to external endpoints if execution is not tightly bounded.
bash install_as_skill.sh --target claude # Claude Code
bash install_as_skill.sh --target codex # Codex
## 必需的环境变量
The skill instructs that all text 'must' be in Simplified Chinese and explicitly forbids English except proper nouns. This is a language-policy constraint imposed by default, with no user choice or opt-in, which is a natural-language policy violation.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
default_prompt: "Make me a 5-slide deck about [topic] using gpt-image2-ppt; pick a fitting style from styles/."
# Trust surface (what the user agrees to when installing this skill):
# - Reads scoped .env files only (skill dir, ~/.claude/skills/.../, ~/skills/.../)
# and never walks parent project directories.
# - Hits exactly the OPENAI_BASE_URL endpoint you set, plus optional
# VISION_BASE_URL endpoint you set (template-clone mode only).