T09 · Insecure Skill Coding Practices
Note
- Location
- references/keyword-extraction-guide.md:45
- Finding
- Excluded-platform search templates violate the enforced data-source boundary## Vulnerability Details **File Location**: `references/keyword-extraction-guide.md:45-46` **Vulnerability Type**: Conflicting and insecure Skill configuration **Risk Level**: Low ### Vulnerable Code ```text - "快手 + [话题] + 热门" - "B站 + [话题] + 播放量" ``` ### Technical Analysis The keyword extraction guide instructs the Agent to generate search queries for Kuaishou and Bilibili. These instructions conflict with the mandatory platform allowlist in `SKILL.md` and `references/core_workflow.md`, which restrict searches, collection, and analysis to WeChat Official Accounts, Douyin, and Xiaohongshu. Because `SKILL.md` directs the Agent to consult this guide during keyword expansion, the conflicting templates may be treated as operational instructions. This weakens the reliability of the allowlist and can cause the Agent to search or collect information from expressly excluded platforms. No command execution, credential exposure, privilege escalation, or local system access results from this issue. The vulnerability affects the integrity and declared scope of the Skill's data collection. ### Attack Path 1. A user requests keyword expansion or cross-platform analysis for a topic. 2. The Agent loads `references/keyword-extraction-guide.md`. 3. The Agent applies the listed platform query templates. 4. Searches are generated for Kuaishou or Bilibili. 5. Out-of-scope results may be collected, analyzed, or presented despite the three-platform restriction. ### Impact Assessment An affected Agent may disclose or rely on results from platforms outside the advertised allowlist. This can produce misleading reports, violate the Skill's declared collection boundary, and undermine downstream assumptions about provenance and compliance. The issue does not grant an attacker additional operating-system privileges, access to secrets, persistent execution, or control over local tools.
- Remediation
- ## Remediation Suggestions 1. Remove the Kuaishou and Bilibili query templates. 2. Replace them with templates exclusively covering WeChat Official Accounts, Douyin, and Xiaohongshu. 3. Add an explicit statement that keyword expansion must never introduce a platform outside the central allowlist. 4. Define the allowlist once in the mandatory workflow and require every optional guide to reference that definition instead of maintaining independent platform lists. 5. Add a final validation step that rejects generated search queries containing excluded platform names or domains. 6. Add consistency tests that compare all platform references in auxiliary guides against the authoritative allowlist.
