Back to skill

Security audit

pptx-craft

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent PPT conversion tool, but it needs review because it has concrete local-file safety issues around temporary template handling and failed-output publication.

Install only if you are comfortable running a local PPT conversion tool that reads your provided templates and source files and writes output artifacts. Avoid using sensitive templates with non-ASCII paths until the temporary-file handling is fixed, check process exit codes and QA reports before trusting generated PPTX files, and prefer pinned dependency installation in an isolated environment.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/pptx_flex_engine.py:97
Finding

Predictable Shared Temporary File Enables Symlink and Concurrency Attacks

Content
View full analysis
127 for c in path): tmp = os.path.join(tempfile.gettempdir(), "pptx_tpl_tmp.pptx") if os.path.exists(tmp): os.remove(tmp) shutil.copyfile(path, tmp) return Presentation(tmp) return Presentation(path) ``` ### Technical Analysis Every template whose path contains a non-ASCII character is copied to the same predictable file, `pptx_tpl_tmp.pptx`, in the system-wide temporary directory. The existence check, deletion, copy, and subsequent read are separate filesystem operations. This creates two related weaknesses: 1. **Symlink race:** A local attacker can create or replace the predictable path with a symbolic link between the deletion and copy operations. Because `shutil.copyfile()` follows symbolic links, the template data can be written to another file accessible to the victim process. 2. **Cross-request collision:** Concurrent conversions use the same temporary path. One request can overwrite the temporary template while another request is parsing it, causing template substitution, data exposure, corruption, or denial of service. The temporary file is also not removed after the presentation is loaded, potentially leaving a copy of a confidential user template in a shared location. ### Attack Path 1. A victim invokes the converter with a template whose path contains non-ASCII characters. 2. The code selects the fixed path `/tmp/pptx_tpl_tmp.pptx` or the platform-equivalent shared temporary path. 3. A local attacker monitors or repeatedly manipulates that predictable filename. 4. After the victim removes the previous file, the attacker create ...[truncated 1037 chars]
Remediation
View remediation
127 for c in path): return Presentation(path) fd, tmp = tempfile.mkstemp(prefix="pptx_tpl_", suffix=".pptx") try: os.close(fd) shutil.copyfile(path, tmp) return Presentation(tmp) finally: try: os.unlink(tmp) except FileNotFoundError: pass ``` If `python-pptx` retains lazy references to the source after construction, keep the unique temporary file for the necessary lifetime and expose an explicit cleanup mechanism rather than deleting it prematurely. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ardot2ppt.py:168
Finding

Failed QA Validation Does Not Prevent Invalid PPTX Output

Content
View full analysis
2} [canvas] {p['title'][:24]:<24} 填充 {p['fill_rate']:.0%}") passed, msg = qa_gate(qa) print(msg) if not passed: sys.exit(2) ``` From `scripts/html2ppt.py`: ```python prs.save(out_pptx) qa["_mode"] = mode qa["_template_used"] = bool(use_tpl) with open(qa_path, "w", encoding="utf-8") as f: json.dump(qa, f, ensure_ascii=False, indent=2) return qa def main(): ap = argparse.ArgumentParser() ap.add_argument("html") ap.add_argument("--out", default="out.pptx") ap.add_argument("--preview-dir", default="previews") ap.add_argument("--qa", default="qa.json") ap.add_argument("--workers", type=int, default=None, help="并行渲染预览的进程数(默认按 CPU)") ap.add_argument("--template", default=None, help="PPT 模板路径 → 走模板克隆模式(内容铺满可用区)") ap.add_argument("--pages", default=None, help="只渲染指定页(逗号分隔, 1-based, 对准
顺序)") ap.add_argument("--tpl-slide", type=int, default=3, help="克隆的模板页索引(默认 3=标题和内容 版式)") ap.add_argument("--margin", type=float, default=0.8, help="模板可用区边距(cm)") args = ap.parse_args() pages = [p.strip() for p in args. ...[truncated 2595 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:226
Finding

Unpinned Runtime Dependencies Lack Integrity Controls

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (14)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill clearly describes capabilities that read user-supplied files and write output files (template_path, HTML input, PPTX output, previews, QA reports), but it does not declare any explicit tool scope or allowed-tools policy. In an agent environment, missing scope boundaries can let the skill operate with broader filesystem access than intended, increasing the chance of unauthorized reads, overwrites, or data exfiltration through generated artifacts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description is written as an instruction-facing capability description entirely in Chinese, including the trigger phrases, with no indication that other languages are supported or that the user may choose a preferred language. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Unbounded Output

Medium
Category
Output Handling
Confidence
60% confidence
Finding

Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.

Content

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

  1. 初稿→QA→二稿→QA→终稿 Pass4-5 QA 迭代(留白不足全局缩字号重排,最多3轮)
text

Key guarantee: **no overlap, no truncation, and measured breathing room (气口)** — the
validator refuses to write the file unless every element is in-bounds, non-overlapping
across groups, and cross-group gaps meet a `MIN_BREATH` floor.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file’s primary natural-language instructions, usage text, and operational descriptions are written exclusively in Chinese, and the CLI description at runtime is also Chinese-only. This can violate a language/locale policy when users are not given a language choice and no region-specific justification is stated in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The module docstring and command/help text are written entirely in Chinese, which imposes a specific language on users without offering any language choice or documenting a justified locale restriction. This matches the policy category for language/locale constraints expressed in natural language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This JSON file contains user-visible text entirely in Chinese, including titles and section content, but provides no indication that the language is optional or region-specific. Under the policy for natural-language issues, forcing a specific language without opt-in can be a locale-policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document declares lang="zh-CN", which hard-codes a specific language/locale. Under the policy, forcing a locale without opt-in or documented justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module docstring, usage instructions, and operational notes are written entirely in Chinese, which imposes a specific language on users. The file does not indicate that Chinese is optional, configurable, or required for a region-specific purpose, so this appears to violate the language/locale choice policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The printed success message is emitted only in Chinese, which forces a language choice at runtime. There is no indication of user preference handling or a justified regional constraint for this output.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

This code opens and parses a user-supplied file path, which is a file-access operation covered by the warning rule for code files. Although the CLI arguments imply an input file, there is no explicit user-facing disclosure in code comments, prompts, or runtime output that the tool will read local file contents for conversion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code creates directories and writes PPTX, SVG, PNG, and JSON files to user-specified or default paths. While these writes are core to the tool's purpose, the implementation lacks an explicit runtime disclosure describing which files will be created or overwritten.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The function silently deletes an existing temporary PPTX file and copies the input template to a temp location when the path contains non-ASCII characters. Although this is part of internal processing, there is no confirmation, log message, or explicit disclosure in the file that local filesystem changes will occur.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The function writes generated SVG content to the provided path, which can overwrite or create files, but there is no confirmation prompt or explicit warning near the operation. File output is safety-relevant because it modifies user storage.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The PNG renderer saves output directly to the supplied path, affecting the local filesystem, but the code provides no user-facing disclosure or warning about this write operation. This is especially relevant if the destination path already exists.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.