T09 · Insecure Skill Coding Practices
- Location
scripts/generate_excel.py:91- Finding
Spreadsheet Formula Injection Through Unsanitized Extracted Values
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly aligned with making Excel files from images, but it needs Review because it automatically installs unpinned packages and leaves user images/data in predictable local paths without enough user control.
Install only if you are comfortable with the skill processing local images, creating an Excel file automatically, installing Python packages from pip if missing, and leaving uploaded images under /tmp/p-e-images. Prefer using non-sensitive images, choosing an explicit output path, cleaning /tmp/p-e-images after use, and reviewing generated spreadsheets before sharing them.
scripts/generate_excel.py:91Spreadsheet Formula Injection Through Unsanitized Extracted Values
scripts/setup.sh:7Automatic Installation of Unpinned Third-Party Dependencies
SKILL.md:57Predictable Shared Temporary Paths Permit Data Exposure and Cross-Run Interference
The declared description promises an end-to-end image extraction workflow: users send a template image and actual images, and the tool understands the format and produces Excel directly. The supplied code does not implement image ingestion, OCR, template matching, vision extraction, or any user-triggered picture-processing flow. Its sole function is to convert already structured JSON into an Excel file, with optional embedding of image files referenced by path in the JSON. While Excel generation is consistent with part of the description, the primary advertised capability—extracting data from images based on a template—is absent, making this a material description-behavior mismatch.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
rm -f /tmp/p-e-data.json
保留 /tmp/p-e-images/ 中的图片(Excel 生成后不再需要,但用户可能想保留)。
The skill instructs use of exec, write, and access to user-provided local file paths, but the manifest does not declare an explicit tool scope such as allowed-tools or permissions. This creates an authorization gap where the runtime may grant broader file/system access than users expect, increasing the chance of unintended file reads or writes during execution.
The skill description and operational instructions are primarily written to enforce Chinese-language triggers and output conventions, with no explicit user choice of language or locale. This can violate language/locale policy when users have not opted into Chinese output.
The skill saves uploaded images and extracted structured data to local temporary files but does not clearly warn the user that their content will be persisted on disk. This is dangerous because images may contain personal or proprietary information, and temporary files can remain accessible after the task, especially since the image directory is intentionally retained.
This duplicate finding points to the same persistence behavior: a shared /tmp/p-e-images directory is created and chat-uploaded images are written there without lifecycle controls. Because the directory is reused and not cleaned up, later runs or local users/processes may observe residual sensitive content.
# 用 exec 工具创建临时目录
mkdir -p /tmp/p-e-images
如果图片已经在本地文件系统上(用户给了路径),直接使用该路径。
This duplicate finding points to the same persistence behavior: a shared /tmp/p-e-images directory is created and chat-uploaded images are written there without lifecycle controls. Because the directory is reused and not cleaned up, later runs or local users/processes may observe residual sensitive content.
# 用 exec 工具创建临时目录
mkdir -p /tmp/p-e-images
如果图片已经在本地文件系统上(用户给了路径),直接使用该路径。
The skill directs automatic creation of an Excel file on the user's Desktop or a user-specified path without an explicit warning or confirmation step. Unprompted file creation can overwrite user expectations, leak extracted sensitive data into a prominent location, and normalize unsafe write behavior.
The example trigger "帮我把这些图片整理出表格" is a broad natural-language request that could overlap with ordinary conversation about images and spreadsheets. The document does not provide exclusion conditions or clear boundaries for when such phrasing should or should not invoke this skill.
The code hard-codes the worksheet title to the Chinese string "数据", which imposes a specific locale in the generated output. The file otherwise contains bilingual text but provides no user option or documented justification for forcing a Chinese worksheet name.
No suspicious patterns detected.