Back to skill

Security audit

Agent Task Tracker

Security checks for vulnerabilities and agentic risk

Overview

This skill is a small task tracker, but it automatically persists task details and operational metadata across sessions without clear redaction or user control.

Review before installing if your tasks may include secrets, private URLs, internal hostnames, production commands, SSH/session details, customer data, or sensitive errors. The skill is not malicious on inspection, but it should ideally redact commands and infrastructure identifiers, avoid tracking every task by default, and make persistence opt-in or easy to inspect and clear.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:10
Finding
Automatic Cross-Session Persistence of Potentially Sensitive and Attacker-Controlled Task Data## Vulnerability Details **File Location**: `SKILL.md`, lines 10-41 **Vulnerability Type**: Persistent agent-memory poisoning and sensitive operational-data retention **Risk Level**: Medium ### Vulnerable Code ```markdown ## State File `memory/tasks.md` — single source of truth. ## When to Write 1. **Task received** → add entry with status `🔄 进行中` 2. **Background process started** → record session ID, PID, server, command 3. **Progress update** → update status/notes 4. **Task completed** → mark `✅ 完成`, record results/links 5. **Task failed** → mark `❌ 失败`, record error 6. **Session start** → read `memory/tasks.md` to resume awareness ## Format ```markdown # Active Tasks ## [task-id] Short description - **Status**: 🔄 进行中 | ✅ 完成 | ❌ 失败 | ⏸️ 暂停 - **Requested**: YYYY-MM-DD HH:MM - **Updated**: YYYY-MM-DD HH:MM - **Background**: session-id (PID) on server-name — `command` - **Notes**: progress details, partial results - **Result**: final output, links, summary # Completed (recent) <!-- Move completed tasks here, keep last 10, prune older --> ``` ## Rules - Update the file BEFORE reporting to user (write-first) - Include enough detail to resume without prior conversation context - For background processes: always record session ID + what server + what command ``` ### Technical Analysis The Skill designates `memory/tasks.md` as a cross-session source of truth and requires it to be read at session startup. It also mandates writing task descriptions, commands, server names, process identifiers, links, results, errors, and free-form progress notes before responding to the user. These fields can contain attacker-controlled instructions or sensitive operational data. The Skill provides no requirement to sanitize instruction-like content, redact credentials, restrict file permissions, distinguish trusted metadata from untrusted text, or obtain user consent before persistence. Conseque ...[truncated 1872 chars]
Remediation
## Remediation Suggestions 1. Make persistent tracking explicitly opt-in and task-scoped instead of activating it for every task and session. 2. Treat all persisted values as untrusted data. Use a strict structured schema and prevent task descriptions, notes, links, errors, and results from being interpreted as agent instructions. 3. Do not store raw commands, credentials, access tokens, private URLs, internal hostnames, or complete error output. Record only redacted summaries. 4. Apply automatic secret detection and redaction before every write, including filtering command-line arguments and URL query parameters. 5. Require confirmation before recording infrastructure details or other potentially sensitive information. 6. Store the file with least-privilege filesystem permissions and isolate memory by user, workspace, and task. 7. On session startup, parse only expected structured fields rather than inserting the complete file into the agent's instruction context. 8. Enforce short retention limits and provide users with mechanisms to inspect, correct, and delete stored state. 9. Replace the unconditional “write-first” requirement with a policy that prioritizes authorization, validation, and redaction before persistence.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Vague Triggers

High
Confidence
96% confidence
Finding
The skill is described as triggering automatically on every task start, update, completion, or failure, which gives it extremely broad activation scope without any apparent narrowing conditions or user consent boundary. In combination with persistent state writes, this creates a high-likelihood privacy and data-minimization problem because sensitive task details may be captured routinely across unrelated workflows.

Context Leakage

High
Category
Data Exfiltration
Content
## When to Write

1. **Task received** → add entry with status `🔄 进行中`
2. **Background process started** → record session ID, PID, server, command
3. **Progress update** → update status/notes
4. **Task completed** → mark `✅ 完成`, record results/links
5. **Task failed** → mark `❌ 失败`, record error
Confidence
98% confidence
Finding
Recording session ID, PID, server, and command into a persistent task file is a direct form of context leakage because it captures sensitive execution metadata that may not be necessary for task continuity. If the file is later read by other tools, users, or sessions, it can expose internal infrastructure details and previous command activity beyond the original need-to-know scope.

Context Leakage

High
Category
Data Exfiltration
Content
- Update the file BEFORE reporting to user (write-first)
- Include enough detail to resume without prior conversation context
- For background processes: always record session ID + what server + what command
- For multi-step tasks: update after each step
- Keep it concise — this isn't a log, it's a state snapshot
- **Size limit: keep under 50 lines / 2KB** — this file is read every session start
Confidence
97% confidence
Finding
The instruction to 'always record session ID + what server + what command' and to include enough detail to resume without prior context materially increases the amount of potentially sensitive context written to disk. This broad persistence requirement makes leakage more dangerous in this skill because the file is automatically read at every session start, amplifying exposure and propagation of sensitive operational details.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill mandates writes to a persistent state file as a 'single source of truth' but does not provide any user-facing notice, consent mechanism, or sensitivity filtering for stored content. This is dangerous because user requests, progress notes, and outcomes may be retained across sessions unexpectedly, increasing privacy exposure and the chance of later unauthorized access or accidental reuse.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The skill explicitly requires recording background session IDs, PIDs, server names, and commands, which are sensitive operational details that can reveal infrastructure, access patterns, and command history. Persisting this information without warning or minimization increases the risk of context leakage and can materially aid lateral movement or operational reconnaissance if the file is exposed.

Natural-Language Policy Violations

Low
Confidence
90% confidence
Finding
The instructions hard-code task status values in Chinese (e.g. `进行中`, `完成`, `失败`) without indicating that the user can choose the language or locale. This is a natural-language policy concern because it imposes a specific language format by default rather than offering opt-in or configurability.

Static analysis

No suspicious patterns detected.