Back to skill

Security audit

Task Planner

Security checks for vulnerabilities and agentic risk

Overview

This is a local task manager that mostly does what it says, though saved tasks may need tighter file permissions on shared machines.

Reasonable to install for local task tracking. On shared systems, treat task text as potentially visible to other local users unless you set TASK_PLANNER_DIR to a private directory or tighten permissions on ~/.task-planner and tasks.json.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:8
Finding
Task Data May Be Exposed to Other Local Users<![CDATA[ ## Vulnerability Details **File Location**: `scripts/script.sh`, lines 8–15 **Vulnerability Type**: Insecure filesystem permissions **Risk Level**: Medium ### Vulnerable Code ```bash DATA_DIR="${TASK_PLANNER_DIR:-$HOME/.task-planner}" TASKS_FILE="$DATA_DIR/tasks.json" mkdir -p "$DATA_DIR" # Initialize tasks file if missing if [[ ! -f "$TASKS_FILE" ]]; then echo '[]' > "$TASKS_FILE" fi ``` Task data is subsequently written without explicitly restricting its permissions: ```python with open(tasks_file, 'w') as f: json.dump([], f) with open(tasks_file, "w") as f: json.dump(tasks, f, indent=2) ``` ### Technical Analysis The script creates the task storage directory and JSON file without setting restrictive permission modes or establishing a secure `umask`. Their resulting permissions therefore depend on the invoking process's environment. With a common `umask` such as `022`, the directory may be created as `0755` and the task file as `0644`. If the user's home directory or configured `TASK_PLANNER_DIR` is traversable, other local users may be able to read the file. The stored data includes task descriptions, priorities, deadlines, statuses, and creation timestamps. This behavior conflicts with the documented privacy assurance that all task information remains private on the local machine. Local storage alone does not ensure confidentiality when filesystem permissions permit access by other accounts. ### Attack Path 1. A user invokes the task planner with a permissive `umask`, such as `022`. 2. The script creates `~/.task-planner` and `tasks.json` without explicit restrictive modes. 3. The directory and file inherit permissions that may allow access by other local users. 4. A local attacker identifies the victim's task storage path. 5. If the parent directories are traversable, the attacker reads `tasks.json`. 6. The attacker obtains the victim's task descriptions, deadlines, priorities, statuses, and timestamps. ### Impact Asses ...[truncated 553 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Establish a restrictive process-level `umask` before creating or writing task data: ```bash umask 077 ``` 2. Create the storage directory with owner-only permissions and correct permissions on an existing directory: ```bash mkdir -p -m 700 "$DATA_DIR" chmod 700 "$DATA_DIR" ``` 3. Create and maintain the task file with mode `0600`: ```bash if [[ ! -f "$TASKS_FILE" ]]; then printf '%s\n' '[]' > "$TASKS_FILE" fi chmod 600 "$TASKS_FILE" ``` 4. In the embedded Python code, use atomic replacement to prevent partially written files. Create the temporary file in the same protected directory with mode `0600`, flush and synchronize it, and then replace the destination with `os.replace()`. 5. Validate the permissions and ownership of existing storage before use. Refuse to process a task file owned by another account or located in an unexpectedly permissive directory. 6. Add automated tests that execute the script under permissive `umask` values and verify that the directory remains `0700` and the task file remains `0600`. ]]>
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (2)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
Most of the core behavior matches the description: the code manages tasks locally, supports priorities and due dates, tracks completion status, and stores data privately in a local file with no cloud sync or network activity. However, there are two notable description/behavior mismatches. First, the declared bilingual EN/CN support is not reflected in the actual code, which presents only English CLI/help text. Second, the script includes undeclared external promotional behavior by printing 'More skills: bytesagain.com' and branding references, which introduces an external-facing element not mentioned in the description. While this does not perform network access, it is still an undeclared capability unrelated to core task management. Therefore the description does not fully and accurately represent the code.

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Static analysis

No suspicious patterns detected.