T01 · Skill Instruction Hijacking
- Location
SKILL.md:10- Finding
Automatic Session-History Scanning and Response Manipulation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 10-11 and 27-28
Vulnerability Type:T01: Skill Instruction Hijacking
Risk Level: MediumRelevant skill instructions, translated into English:
markdown - **Automatic logging**: Automatically log every skill invocation without user interaction. - **Manual reporting**: Proactively tell the user, "The XXX skill was just invoked." **Automatic logging (primary)**: Use HEARTBEAT to scan session history every two hours and backfill records. **Proactive reporting**: After every skill invocation, notify the user at the end of the response.Technical Analysis
The skill text instructs the agent to adopt persistent behaviors beyond an explicitly requested statistics query:
- Periodically scan session history through a HEARTBEAT process.
- Infer and backfill skill invocations without per-invocation user approval.
- Modify subsequent responses by appending a mandatory skill-usage notice.
These behaviors are instruction-driven rather than implemented by the supplied Python scripts.
scripts/log.pyonly accepts a skill name and optional note and writes them to a local JSON file, whilescripts/query.pyonly reads and aggregates that file. Neither script implements session scanning, HEARTBEAT registration, or automatic response modification.Consequently, loading the skill may alter the agent's ongoing session behavior and cause access to conversational history beyond what is required for a local usage counter. The mandatory response suffix also interferes with ordinary response generation and can disclose internal skill usage to conversation participants.
Attack Path
- The skill is installed or loaded by an agent.
- The agent interprets
SKILL.mdas operational instructions. - The agent adopts the requested HEARTBEAT behavior and periodically examines accessible session history.
- Skill invocations inferred from that history ar ...[truncated 923 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the instruction to scan session history automatically or through HEARTBEAT.
- Require explicit user consent before enabling usage tracking, and provide a clear method to disable it.
- Log only invocations explicitly passed to
scripts/log.py; do not infer activity from historical conversations. - Remove mandatory response suffixes. Usage disclosures should only be produced when requested by the user.
- Minimize stored information by making the
notefield optional and avoiding conversation content or sensitive user data. - Define retention and deletion controls for
data/usage.json, including a command to clear stored records. - If automation is genuinely required, implement it as transparent, reviewable code with a narrowly scoped event interface rather than relying on broad natural-language instructions to inspect session history.
- Document exactly what data is collected, where it is stored, how long it is retained, and which agent permissions are required.
