T09 · Insecure Skill Coding Practices
- Location
scripts/parse.py:54- Finding
Path Traversal Through Unsanitized Keyword-Based Filename
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it advertises, but its local file-writing and scraped-content handling need review before installation.
Install only if you are comfortable with a headed browser scraping Xiaohongshu, storing posts/comments/images locally, and writing reports to disk. Use a dedicated output directory, avoid keywords containing path separators, do not run it with elevated privileges, and treat all scraped text and images as untrusted source material.
scripts/parse.py:54Path Traversal Through Unsanitized Keyword-Based Filename
scripts/run.sh:20Predictable Temporary File Allows Symlink-Based File Overwrite
scripts/parse.py:70Indirect Prompt Injection Through Untrusted Scraped Content
scripts/parse.py:93Unbounded and Unvalidated Image Downloads
This second mismatch finding is also substantively valid because the skill delegates key behavior to wrapper/parser scripts and local artifact handling that are not transparently represented in the declared purpose. Such under-disclosure can mask persistence, external execution, and broader data collection than a user expects from a simple summarization skill.
This second mismatch finding is also substantively valid because the skill delegates key behavior to wrapper/parser scripts and local artifact handling that are not transparently represented in the declared purpose. Such under-disclosure can mask persistence, external execution, and broader data collection than a user expects from a simple summarization skill.
The skill explicitly directs use of file reading, file writing, network access, and browser-driven extraction, but it does not declare any tool scope or permission boundaries. This increases the blast radius if the skill is invoked unexpectedly or modified later, because an agent may exercise broader capabilities than a reviewer or user would infer from the metadata.
The invocation text is broad enough to match generic research or summarization requests, which could cause this skill to run in situations where Xiaohongshu scraping, browser automation, and file creation are unnecessary. Overbroad triggering is dangerous because it can expand data collection and external interaction beyond user intent, even without overtly malicious code.
The skill instructs downloading images from remote sources into a local directory without clearly warning about persistent local file creation, storage volume, or retention. This can lead to unanticipated disk usage, storage of potentially sensitive or copyrighted content, and residual artifacts remaining after the task completes.
The skill tells the agent to save a synthesized markdown report into the output directory using file-writing capabilities, but it does not warn about file creation or overwriting behavior. Unannounced writes can alter local state, clobber existing files, or leave sensitive summaries on disk where users do not expect them.
The generated report title is hard-coded in Chinese, which imposes a specific language on all users regardless of their preferences. This is a natural-language policy issue because the file does not offer a language choice or explain that the skill is intentionally limited to a Chinese-only regional context.
The script saves scraped data to xhs_data.json and then invokes a parser that processes artifacts, while the collected payload includes titles, descriptions, image URLs, and comments. Although there is basic status logging, there is no user-facing warning that the operation collects and stores third-party content that may include personal data.