T09 · Insecure Skill Coding Practices
- Location
scripts/html2pptx.js:70- Finding
Shell Command Injection Through User-Controlled Conversion Paths
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This PPT-generation skill is purpose-aligned, but its local conversion tooling has unsafe execution, file-reading, browser, and dependency-installation behaviors that deserve review before use.
Install only if you are comfortable running local Python/Node conversion scripts and browser automation. Use it in a dedicated workspace or container, avoid converting untrusted HTML or documents, review generated slide HTML before packaging, and do not follow the optional WPS sudo installation steps unless you can verify the package source and hash.
scripts/html2pptx.js:70Shell Command Injection Through User-Controlled Conversion Paths
scripts/html_packager.py:21Arbitrary Local File Disclosure Through Preview Asset Inlining
scripts/extract_slides.js:56Untrusted HTML Executes With JavaScript, Network Access, and Disabled Chromium Sandbox
scripts/html2png.py:128Runtime Installation of Unpinned Third-Party Dependencies
WPS_TESTING.md:23Privileged Installation Guidance for an Unverified Community-Hosted WPS Package
Editing local application configuration files, automating office software, or converting local documents are materially sensitive actions that must be plainly disclosed. If those behaviors exist behind an innocuous 'make me a PPT' skill description, the risk is higher because the skill could alter the user's environment or process private documents without informed consent.
Editing local application configuration files, automating office software, or converting local documents are materially sensitive actions that must be plainly disclosed. If those behaviors exist behind an innocuous 'make me a PPT' skill description, the risk is higher because the skill could alter the user's environment or process private documents without informed consent.
Editing local application configuration files, automating office software, or converting local documents are materially sensitive actions that must be plainly disclosed. If those behaviors exist behind an innocuous 'make me a PPT' skill description, the risk is higher because the skill could alter the user's environment or process private documents without informed consent.
Editing local application configuration files, automating office software, or converting local documents are materially sensitive actions that must be plainly disclosed. If those behaviors exist behind an innocuous 'make me a PPT' skill description, the risk is higher because the skill could alter the user's environment or process private documents without informed consent.
Editing local application configuration files, automating office software, or converting local documents are materially sensitive actions that must be plainly disclosed. If those behaviors exist behind an innocuous 'make me a PPT' skill description, the risk is higher because the skill could alter the user's environment or process private documents without informed consent.
Editing local application configuration files, automating office software, or converting local documents are materially sensitive actions that must be plainly disclosed. If those behaviors exist behind an innocuous 'make me a PPT' skill description, the risk is higher because the skill could alter the user's environment or process private documents without informed consent.
Editing local application configuration files, automating office software, or converting local documents are materially sensitive actions that must be plainly disclosed. If those behaviors exist behind an innocuous 'make me a PPT' skill description, the risk is higher because the skill could alter the user's environment or process private documents without informed consent.
Editing local application configuration files, automating office software, or converting local documents are materially sensitive actions that must be plainly disclosed. If those behaviors exist behind an innocuous 'make me a PPT' skill description, the risk is higher because the skill could alter the user's environment or process private documents without informed consent.
Editing local application configuration files, automating office software, or converting local documents are materially sensitive actions that must be plainly disclosed. If those behaviors exist behind an innocuous 'make me a PPT' skill description, the risk is higher because the skill could alter the user's environment or process private documents without informed consent.
Editing local application configuration files, automating office software, or converting local documents are materially sensitive actions that must be plainly disclosed. If those behaviors exist behind an innocuous 'make me a PPT' skill description, the risk is higher because the skill could alter the user's environment or process private documents without informed consent.
Editing local application configuration files, automating office software, or converting local documents are materially sensitive actions that must be plainly disclosed. If those behaviors exist behind an innocuous 'make me a PPT' skill description, the risk is higher because the skill could alter the user's environment or process private documents without informed consent.
Referenced artifact was not completely inspected
| `scripts/extract_slides.js` | Step 6 B | Phase 1 |
The code uses subprocess.call(f"kill -9 {pid}", shell=True), combining shell execution with string interpolation. If pid is ever influenced unexpectedly or returned in an unsafe form, this creates a command-injection primitive; additionally, SIGKILL prevents graceful cleanup and can terminate the wrong process if process identification is mishandled. In this skill context, the snippet is presented as reusable automation guidance, which makes unsafe process handling more dangerous because users may copy it into production scripts.
import subprocess subprocess.call(f"kill -9 {pid}", shell=True)
> **关键教训**: 之前的版本手动启动 `wpp` 进程再尝试 `createWppRpcInstance`,
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<div class="insight-bar">
<div class="insight-icon"><!-- 内联 SVG 图标 --></div>
<p class="insight-text"><strong>趋势判断:</strong>一句话核心洞察...</p>
</div>
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
<div class="insight-bar">
<div class="insight-icon"><!-- 内联 SVG 图标 --></div>
<p class="insight-text"><strong>趋势判断:</strong>一句话核心洞察...</p>
</div>
The lockfile pins basic-ftp 5.2.0, and the reported advisories indicate FTP command injection and denial-of-service weaknesses. Although this package is only transitive here via Puppeteer's proxy/PAC stack, shipping a known-vulnerable version is still a real supply-chain risk if any workflow enables attacker-influenced FTP/PAC URI handling.
extract-zip 2.0.1 is a real concern because archive extraction bugs involving symlinks can lead to arbitrary file write or path traversal during unzip operations. In this dependency graph it is pulled in by @puppeteer/browsers, which may extract downloaded browser archives during install/runtime, making the PPT-generation skill's browser automation context more exposed than a passive library-only use case.
ip-address 10.1.0 is present with reported parsing and HTML-emission issues. In this lockfile it is transitive through socks/socks-proxy-agent/proxy-agent, so exploitability depends on whether the skill processes attacker-controlled proxy configuration or renders Address6 HTML output, which is not evident from the lockfile alone.
js-yaml 4.1.1 has reported CPU-exhaustion issues from crafted YAML structures, so keeping this exact vulnerable version is a genuine denial-of-service risk. Here it is transitive via cosmiconfig used by Puppeteer, and becomes more dangerous if the skill or its environment loads YAML-based configuration from untrusted or user-influenced sources.
ws 8.20.0 is a real issue because the advisories describe memory disclosure and memory-exhaustion conditions in WebSocket handling. Since Puppeteer relies on ws for browser protocol communication, a PPT-generation skill that automates Chromium may expose this path in local or remote browser-control scenarios, increasing risk beyond a dormant dependency.
This is a tool/process-control abuse pattern because the skill gains the ability to issue a shell-based hard kill against a local process. In the context of a PPT-generation skill, that capability is broader than necessary and can be leveraged to disrupt the host system; the use of shell=True further weakens the safety boundary around the parameter.
except Exception:
pass
if wps_pid is not None: # E4: kill by PID for reliable cleanup
subprocess.call(f"kill -9 {wps_pid}", shell=True)
if __name__ == "__main__":
The skill declares extensive capabilities involving shell execution, file reads/writes, environment inspection, package installation, and script execution, but does not define any explicit tool scope or allowed-tools boundary. This increases the chance of over-privileged execution and makes it harder for the host platform or user to understand and constrain what the skill may do on the local system.
The trigger phrases are very broad and include common everyday requests like making slides, decks, courseware, or converting documents to PPT. Because this skill can run shell commands, create files, and install dependencies, over-broad activation increases the chance of accidental invocation in contexts where the user did not intend to authorize those operations.
The skill instructs the agent to create directories, write output files, run shell commands, and install Python/Node packages, but the description does not prominently warn users about these side effects. Lack of disclosure is dangerous because users may unknowingly allow local system modification and dependency installation while expecting only content-generation assistance.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# 1. 安装 WPS
sudo dpkg -i wps-office_11.1.0.11719_amd64.deb
sudo apt --fix-broken install -y # 修复可能的依赖
# 2. 安装 pywpsrpc + Qt5 依赖
Detected: suspicious.dangerous_exec