Back to skill

Security audit

一句话生成PPT

Security checks for vulnerabilities and agentic risk

Overview

This presentation skill is mostly coherent, but it asks agents to read a local Claude secrets file and can send slide content or personal images to external services without clear user consent.

Review carefully before installing. Use this only with non-sensitive decks unless you are comfortable sending prompts and images to Google Gemini. Do not let an agent grep secrets from `~/.claude/.env`; provide `GEMINI_API_KEY` through your normal environment or secrets manager instead. Avoid converting untrusted HTML with the bundled converter unless JavaScript and network access are restricted.

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
SKILL.md:48
Finding

Unsafe Credential Loading Through Unquoted Shell Expansion

Content
View full analysis
Remediation
View remediation
&2 exit 1 fi uv run [SKILL_SCRIPTS_DIR]/generate_image.py \ --prompt "..." \ --filename "output.png" ``` 3. If configuration-file loading is unavoidable, use a dedicated parser that: - Reads one explicitly selected file. - Matches only an anchored `GEMINI_API_KEY=` assignment. - Does not use `eval`, `source`, or unquoted command substitution. - Rejects duplicate or malformed assignments. - Verifies restrictive ownership and permissions. 4. Remove or strongly discourage the `--api-key` argument. Environment variables or a protected credential provider are safer than process arguments. 5. Update every command example in `SKILL.md` and `references/prompt-templates.md` so insecure examples are not copied into generated workflows. 6. Document that image generation is optional and should fail safely when the environment variable is absent. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/html2pptx.js:914
Finding

Unrestricted Active Content and Network Requests During HTML Conversion

Content
View full analysis
{ // Log the message text to your test runner's console console.log(`Browser console: ${msg.text()}`); }); await page.goto(`file://${filePath}`); bodyDimensions = await getBodyDimensions(page); await page.setViewportSize({ width: Math.round(bodyDimensions.width), height: Math.round(bodyDimensions.height) }); slideData = await extractSlideData(page); } finally { await browser.close(); } ``` Image sources are later accepted directly from the rendered document: ```javascript if (el.tagName === 'IMG') { const rect = el.getBoundingClientRect(); if (rect.width > 0 && rect.height > 0) { elements.push({ type: 'image', src: el.src, position: { x: pxToInch(rect.left), y: pxToInch(rect.top), w: pxToInch(rect.width), h: pxToInch(rect.height) } }); } } ``` ### Technical Analysis The converter opens the supplied HTML as a `file://` page in Chromium. It does not: - Disable JavaScript. - Intercept or restrict network requests. - Block frames, stylesheets, scripts, WebSockets, or redirects. - Limit resources to the HTML file's approved workspace. - Validate the HTML for active elements before loading it. - Apply explicit navigation, execution-time, or resource-size limits. Consequently, a crafted HTML document can execute JavaScript in the browser context and make outbound requests while conversion is in progress. The script can read presentation content in the DOM and transmi ...[truncated 2331 chars]
Remediation
View remediation
{ const requestUrl = new URL(route.request().url()); if (requestUrl.protocol !== 'file:') { return route.abort(); } const requestedPath = path.resolve(decodeURIComponent(requestUrl.pathname)); if (!requestedPath.startsWith(approvedWorkspace + path.sep)) { return route.abort(); } return route.continue(); }); ``` 3. Canonicalize the input file and all local asset paths. Reject traversal, symbolic-link escapes, and paths outside an explicitly approved workspace. 4. Reject or sanitize active HTML elements and attributes, including: - `
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
Findings (32)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a comprehensive AI presentation production skill with workflow orchestration, multiple validated visual styles, optional HTML output/editability, and AI-generated visuals. The supplied code does none of that. It is a straightforward local script that takes existing image files and optionally titles, then exports them into a PPTX using a few static layouts. While PPTX export is indeed present, the primary purpose and scope are materially narrower than declared. This is therefore a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

There is a clear description-behavior mismatch. The declared purpose describes a comprehensive presentation-production skill covering slide content planning, visual style selection, HTML or AI-visual generation paths, and PPTX export. In contrast, the code only performs image generation/editing via the Gemini 3 Pro Image API and writes a PNG file. It does not create slides, assemble presentations, export PPTX, build HTML decks, or manage any of the stated 17 presentation styles. The external resource usage is also materially different from the declared purpose: the code requires a Gemini API key and calls a remote image-generation model, which is not reflected in the description. This is not just an implementation detail; the code’s primary function is unrelated to end-to-end PPT creation.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
98% confidence
Finding

The instruction to grep GEMINI_API_KEY from ~/.claude/ accesses the agent's configuration directory directly, which is a sensitive location likely to contain secrets. Direct config-directory reads are especially dangerous in skill content because they encourage credential extraction patterns that can be repurposed beyond the stated use.

Content

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

生成角色设定图:

bash
export $(grep GEMINI_API_KEY ~/.claude/.env) && \
uv run [SKILL_SCRIPTS_DIR]/generate_image.py \
  --input-image "assets/character/original.jpg" \
  --prompt "Character design sheet in [STYLE] style. Keep facial features faithfully. Show 3 expressions: neutral explaining, surprised/eureka, thinking. White background, no text." \

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
98% confidence
Finding

This repeats the same direct access to ~/.claude for credential extraction in the image-generation workflow. Repetition across multiple steps increases the chance the pattern becomes embedded in normal operation and broadens the surface for accidental secret disclosure.

Content

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

AI插画生成:

bash
export $(grep GEMINI_API_KEY ~/.claude/.env) && \
uv run [SKILL_SCRIPTS_DIR]/generate_image.py \
  [--input-image "assets/style-samples/style-NN-name.png"] \
  --prompt "[scene description in [STYLE] style]" \

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
98% confidence
Finding

The full-slide generation path again requires reading from the agent config directory before launching an external-generation subprocess. In context, this is more dangerous because the same flow may process sensitive presentation content, combining secret exposure with third-party data transmission.

Content

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

每张slide生成完整图片(含所有文字和布局):

bash
export $(grep GEMINI_API_KEY ~/.claude/.env) && \
uv run [SKILL_SCRIPTS_DIR]/generate_image.py \
  --input-image "assets/style-samples/style-NN-name.png" \
  --prompt "[完整视觉描述:布局+内容+风格+情绪]" \

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/prompt-templates.md (reported line 92)May include surrounding context.

规则 1:DIV 里不能直接写文字 — 必须用文字标签包裹

html
<!-- ❌ 错误:文字直接在 div 里 -->
<div class="title">Q3营收增长23%</div>

<!-- ✅ 正确:文字在 <p> 或 <h1>-<h6> 里 -->

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/prompt-templates.md (reported line 92)May include surrounding context.

规则 1:DIV 里不能直接写文字 — 必须用文字标签包裹

html
<!-- ❌ 错误:文字直接在 div 里 -->
<div class="title">Q3营收增长23%</div>

<!-- ✅ 正确:文字在 <p> 或 <h1>-<h6> 里 -->

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
99% confidence
Finding

This line explicitly instructs access to an agent configuration directory and extraction of GEMINI_API_KEY from ~/.claude/.env. That is a direct secret-harvesting pattern: if followed by an agent or user, it exposes credentials from local config and enables unauthorized API usage or lateral compromise of other workflows using the same key.

Content

Scanner excerpt · references/prompt-templates.md (reported line 607)May include surrounding context.

Generate slides in batches of 3-5 concurrently for speed:

bash
# Run 3 in parallel using background processes
export $(grep GEMINI_API_KEY ~/.claude/.env)
uv run generate_image.py --prompt "slide 1 prompt..." --filename slide-01.png &
uv run generate_image.py --prompt "slide 2 prompt..." --filename slide-02.png &
uv run generate_image.py --prompt "slide 3 prompt..." --filename slide-03.png &

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/generate_image.py (reported line 24)May include surrounding context.

python
def get_api_key(provided_key: str | None) -> str | None:
    """Get API key from argument first, then environment."""
    if provided_key:
        return provided_key
    return os.environ.get("GEMINI_API_KEY")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill declares no explicit tool scope even though its instructions require environment-variable access and outbound network/API usage. Missing scoping increases the chance an agent will use broader capabilities than users expect, reducing transparency and weakening least-privilege controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill directs generation and storage of a character design sheet derived from a user's personal photo while emphasizing faithful preservation of facial features. This is privacy-sensitive biometric/likeness processing, and the lack of explicit notice about storage, retention, external transmission, and consent makes misuse or overcollection more likely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

These instructions combine secret extraction from ~/.claude/.env with an outbound call to an external image-generation service, but provide no user warning about credential handling or network transmission. That omission is dangerous because users may unknowingly allow both secret use and third-party transfer of potentially sensitive images.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs reading a secret directly from the user's ~/.claude/.env and exporting it into the process environment before invoking a script. Accessing agent configuration/credential stores from within task logic is dangerous because it normalizes secret harvesting patterns and can expose the key to subprocesses, logs, or unintended downstream code.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The instruction slide内容全部中文,仅保留必要英文 imposes a specific output language by default. This is a natural-language policy issue because it forces a locale/language choice without user opt-in or a documented region-specific justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill invokes an external image-generation path backed by an API key without declaring that user content and references may be transmitted to a third-party service. This creates an undisclosed data egress risk, especially because slide content, style references, and possibly personal images can be sent off-device.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Path B repeats the same secret-loading pattern while sending entire slide images, including all text and layout, to an external generation service. Because full-slide generation may include sensitive business material, the combination of local secret access and broad data egress materially increases exposure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document declares lang="zh", and the visible workflow content is entirely in Chinese, which indicates a fixed language/locale choice. There is no nearby language-selection option or explanation that this skill is intentionally region-specific, so this appears to violate the policy against forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file shifts into Chinese-only guidance beginning at L083, including the section title and explanatory text, which imposes a specific language/locale on readers. The policy allows locale constraints only when they are optional, user-selected, or clearly justified as region-specific; that justification or opt-in is not present here.

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 · references/prompt-templates.md (reported line 488)May include surrounding context.

Replace [bracketed items] with your content. The key difference from boring prompts: every slide has a Visual Reference, Design Intent, and Visual Narrative.

text
Create a slide that feels like [visual reference — what specific publication/brand
does this slide evoke? e.g., "a WIRED feature page about breakthrough tech",
"a Bloomberg data visualization", "an Apple keynote product reveal moment"].

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The template includes executable shell commands that instruct users or an agent to export an API key from a local secrets file and launch parallel processes. Even though shown as an example, embedding credential-access and execution guidance in a skill materially increases the chance that an agent with tool access will read sensitive local configuration and use those credentials in downstream operations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file contains natural-language guidance that assumes a Chinese-language workflow, and L410 explicitly specifies Chinese system fonts. Under the policy, forcing a specific language or locale without user opt-in is a reportable natural-language policy violation unless the constraint is clearly documented and justified as region-specific.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes a slide-creation skill covering content structuring, design selection, AI illustration/HTML construction, and PPTX export. This standalone script adds credential harvesting from process environment state via GEMINI_API_KEY, which is not mentioned in the skill purpose and is not inherent to local slide assembly itself.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
75% confidence
Finding

The code initializes a Google GenAI client and sends prompts and optional images to a remote model for image generation/editing. While AI illustration is mentioned in the description, the manifest does not explicitly disclose that user content and local images are transmitted to a third-party external API, making this a context capability that exceeds the clearly stated purpose as written.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script sends user-supplied prompts and optional input images to Google's external API without any explicit privacy notice, confirmation, or data-sensitivity check. If users provide confidential slide content, screenshots, or proprietary images, the tool can unintentionally exfiltrate sensitive material to a third party.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code opens attacker-controlled local HTML in a full browser context via Playwright using page.goto(file://...) without sandboxing or strong input trust boundaries. Even though it is loading a local file, HTML can execute JavaScript, trigger network requests, and reference local resources, which can lead to SSRF-like outbound access, local file exposure through embedded content, or dangerous processing of untrusted slide templates during conversion.

Content

No source excerpt is available for this finding.