T09 · Insecure Skill Coding Practices
- Location
scripts/pack-book.py:94- Finding
Arbitrary Local File Read and Base64 Disclosure Through Metadata Image Paths
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent picture-book workflow, but its packer can be abused through metadata to read local files, contact arbitrary URLs, or inject active content into generated books.
Install only if you trust the book metadata and image sources you will process. Avoid running the packer on untrusted metadata.json files, do not allow arbitrary remote image URLs, and treat generated book.html files as active web content until the script adds path containment, URL restrictions, strict image validation, and HTML escaping.
scripts/pack-book.py:94Arbitrary Local File Read and Base64 Disclosure Through Metadata Image Paths
scripts/pack-book.py:58Server-Side Request Forgery Through Unrestricted Remote Image URLs
scripts/pack-book.py:234Stored HTML and JavaScript Injection in Generated Books
The skill is presented as an end-to-end picture-book creation workflow, but the documented operational behavior materially differs: the only concrete implementation implied is packaging/rendering and optional remote image downloading. This mismatch can mislead users and calling systems about what the skill actually does, obscuring network access and file-processing behavior that carries security and privacy implications.
The skill clearly describes capabilities that read local reference files, write output files, and fetch remote images, yet it declares no explicit tool scope or permission boundaries. This weakens least-privilege controls and increases the chance the agent can perform unintended file or network actions when the skill is invoked.
The trigger conditions are broad enough to match many ordinary creative-writing or illustration requests, which raises the risk of unintended invocation. In context, unintended invocation matters because this skill can create local files and later trigger packaging or network retrieval steps that the user may not have intended.
The skill instructs the agent to save files and generate packaged output but does not clearly warn that it will create and modify local directories and files. Lack of transparency around filesystem side effects can lead to unauthorized or surprising local changes, especially if the skill is triggered automatically or by vague prompts.
The packaging flow allows downloading remote image URLs without clearly warning about network activity, privacy exposure, or the trust boundary introduced by external content. This can leak environment metadata to third-party hosts and exposes the system to risks from untrusted remote resources, especially when URL inputs come from metadata.
The format requirements state that 'text_cn' is required while 'text_en' is optional, effectively forcing Chinese as the primary content language. This is a language-policy constraint presented without user opt-in, alternatives, or justification that the skill is region-specific.
This markdown file is entirely presented in Chinese, starting with the title and continuing throughout the template, with no indication that language selection is optional. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly documented and justified.
The generated document hard-codes lang="zh-CN", which imposes a specific language/locale on all output. The file does not provide any user opt-in, configuration option, or documented region-specific justification for this constraint.
L021 写明“本技能使用智能体原生能力,无需安装额外依赖包”,但文件头部 L004-L006 明确列出了 requests>=2.28.0 作为 Python 依赖。这属于文档与实际技能定义直接矛盾,而不是简单的信息缺失。
This markdown file is entirely written in Chinese and presents the guidance as the default format, but it does not indicate that Chinese is optional or limited to a Chinese-language context. Under the policy rule for language or locale constraints, this can be considered a natural-language policy issue because it implicitly forces one language without user opt-in.