T01 · Skill Instruction Hijacking
- Location
SKILL.md:8- Finding
Mandatory Global Response Manipulation Through Automatically Loaded Skill Instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is not clearly malicious, but it would globally alter every assistant reply and ships an under-documented local logging script, so users should review it before installing.
Install only if you explicitly want an always-on Chinese skill-usage footer on every assistant response. Avoid using it in workflows that require exact JSON, code-only output, privacy-sensitive logs, or reliable audit records unless it is revised to be opt-in, accurately scoped, and to store logs in a private per-user location.
SKILL.md:8Mandatory Global Response Manipulation Through Automatically Loaded Skill Instructions
scripts/report_skills.py:9Predictable Shared Temporary File Allows Symlink-Based File Corruption and Log Tampering
The skill claims to automatically inspect invoked skills on every reply and append a report, but the provided content is only prompt instructions and cannot reliably perform that enforcement or verification. This mismatch is dangerous because it creates false assurances about monitoring while potentially hiding undeclared behavior such as logging or stateful management mentioned by the analyzer.
The instruction that every response must append a tracking block makes the skill effectively always-on and unconstrained. Broad activation like this can override normal assistant behavior, leak internal workflow details across unrelated conversations, and create a persistent channel for prompt-level interference.
Without declared permissions the skill's intent is opaque and cannot be validated.
The required appended output is fixed as the Chinese phrase '--- 本轮使用技能 ---', and the document provides all mandated reporting text only in Chinese. This imposes a specific language on all responses regardless of user preference, which is a natural-language locale policy violation.
The module docstring states '每次汇报本轮AI回复使用了哪些专项技能', implying it identifies skills used in the current reply. However, get_recent_tools_from_history() explicitly returns an empty list and is unused, while main('add') records whatever JSON array is passed on the command line, so the code does not itself discover actual current-turn skill usage.
The module docstring states '每次汇报本轮AI回复使用了哪些专项技能', and the rest of the user-facing strings are also hard-coded in Chinese. This imposes a specific language/locale on the skill's outputs without offering a user choice or documenting a justified locale restriction.
The manifest says the skill automatically analyzes the actual specialized skills used in the current AI reply and appends a report at the end, without command triggering. In contrast, this script cannot inspect the current turn, exposes explicit CLI commands ('add', 'report', 'clear'), and generates aggregate historical statistics from a local JSON log across turns rather than an automatic per-reply report.
The log file path is derived from the TEMP environment variable and then used directly for writing. In a hostile or multi-tenant runtime, an attacker controlling TEMP could redirect writes to an unintended file or symlink target, causing file clobbering, data corruption, or disclosure through placement in an attacker-controlled location.
def save_log(log):
"""保存记录。"""
try:
with open(LOG_FILE, 'w', encoding='utf-8') as f:
json.dump(log, f, ensure_ascii=False, indent=2)
except Exception:
pass
No suspicious patterns detected.