Back to skill

Security audit

todos

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent personal TODO manager, but it uses persistent automations and cron jobs with under-scoped controls that users should review before installing.

Install only if you are comfortable with a Chinese-language TODO skill that stores tasks locally, can create persistent reminders or cron jobs, and may send task text to WorkBuddy or DingTalk. Review and narrow triggers before enabling automatic mutations, avoid putting secrets or sensitive instructions in TODO titles, and inspect cron/automation entries before and after setup or uninstall.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (2)

T02 · Agent Memory Poisoning

Error
Location
src/reminder.py:129
Finding

Persistent Prompt Injection Through Scheduled Reminder Content

Content
View full analysis

Vulnerability Details

File Location: src/reminder.py:129-141
Vulnerability Type: Stored prompt injection through persistent automation
Risk Level: High

python
return {
    "name": f"Todo提醒: {content[:30]}",
    "scheduleType": "once",
    "scheduledAt": remind_at.strftime("%Y-%m-%dT%H:%M:%S"),
    "prompt": (
        f"待办提醒 #[{todo_id}]「{content}」即将到期。\n"
        f"截止时间:{due_at}\n"
        f"请提醒月海巫师处理此待办,完成后可执行:\n"
        f"在 todo-list 中完成 #{todo_id}「{content}」"
    ),
}

Technical Analysis

The content value originates from user-controlled TODO text and is persisted in the SQLite database. When a one-time reminder is created, this value is interpolated directly into the prompt supplied to the automation system.

The code does not separate trusted automation instructions from untrusted TODO data. Quoting the content with decorative characters does not establish a security boundary for a language model. An attacker can therefore insert imperative text such as instructions to ignore the reminder context, disclose information, invoke tools, or perform unrelated operations.

Because the resulting prompt is scheduled for later execution, the malicious instructions can survive the original interaction and affect a subsequent Agent session. Whether a particular payload succeeds depends on the automation runtime's tool access and instruction hierarchy, but the code creates a direct stored prompt-injection path.

Attack Path

  1. An attacker or untrusted user submits a TODO whose content contains Agent instructions.
  2. The application stores that content as normal TODO data.
  3. For a qualifying due date, get_reminder_params() embeds the content into an automation prompt.
  4. The Agent creates and persists the one-time automation task.
  5. At the scheduled time, the automation runtime processes the generated prompt.
  6. The runtime may interpret the embedded TODO text as instructions ...[truncated 624 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not place user-controlled TODO content inside an executable Agent prompt.
  • Prefer a notification-only interface or structured automation payload where reminder instructions and display data are distinct fields.
  • If an Agent prompt is unavoidable, use a fixed trusted instruction that explicitly treats the TODO content as untrusted data that must never be followed as an instruction.
  • Pass only the TODO identifier to the automation and retrieve the content through a constrained display-only operation at execution time.
  • Ensure the scheduled Agent has the minimum tool permissions required to display a reminder and cannot perform unrelated actions.
  • Apply output encoding appropriate to the destination channel, but do not treat encoding alone as a defense against language-model prompt injection.
  • Add regression tests with adversarial TODO content, including instruction overrides, tool-call requests, and attempts to extract contextual data.

T09 · Insecure Skill Coding Practices

Note
Location
scripts/cron_setup.sh:20
Finding

Cron Setup Broadly Removes Existing User Jobs

Content
View full analysis

Vulnerability Details

File Location: scripts/cron_setup.sh:20
Vulnerability Type: Unsafe modification of persistent scheduled-task configuration
Risk Level: Low

bash
(crontab -l 2>/dev/null | grep -v "src.reminder"; echo "$CRON_DAILY_DUE"; echo "$CRON_CHECK_OVERDUE"; echo "$CRON_ARCHIVE") | crontab -

Technical Analysis

The setup script rewrites the current user's entire crontab. Before installing its three jobs, it removes every existing line containing the generic substring src.reminder.

This filter is not scoped to entries created by this Skill. An unrelated project may legitimately have a command containing the same module name, and that entry would be silently deleted. The script also does not create a backup or use uniquely identifiable ownership markers.

Installing user-level scheduled jobs is consistent with the declared optional reminder, overdue-checking, and archive-cleanup functionality. It does not require elevated privileges and is not, by itself, an unauthorized backdoor. The confirmed issue is the unnecessarily broad modification of existing persistent configuration.

Attack Path

  1. The user already has an unrelated crontab entry whose command contains src.reminder.
  2. The user runs scripts/cron_setup.sh to enable TODO reminders.
  3. crontab -l exports the existing crontab.
  4. grep -v "src.reminder" removes both this Skill's old entries and unrelated matching entries.
  5. The filtered content and three new TODO jobs replace the complete user crontab.
  6. The unrelated scheduled job no longer executes.

Impact Assessment

Exploitation does not provide additional privileges or direct code execution beyond the current user's existing authority. The impact is loss of unrelated scheduled jobs, potentially causing availability failures, missed maintenance tasks, missed backups, or disruption of another application. The scope is limited to the crontab of the user runni ...[truncated 14 chars]

Remediation
View remediation

Remediation Suggestions

  • Manage entries through a uniquely marked block, such as BEGIN todo-list-skill and END todo-list-skill, and replace only that block.
  • Match the exact canonical project path and full command rather than the generic src.reminder substring.
  • Back up the existing crontab before making changes and restore it if installation fails.
  • Write the new crontab to a secure temporary file, validate it, and install it only after successful construction.
  • Provide an uninstall script that removes only entries owned by this Skill.
  • Display the proposed changes and request explicit user confirmation before rewriting persistent scheduled-task configuration.
  • Preserve the optional, user-level nature of cron installation; elevated privileges are not necessary for the declared functionality.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (94)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
91% confidence
Finding

The documentation instructs users to run rm -rf /home/qwenpaw/.qwenpaw/workspaces/default/todos, a forceful recursive deletion of a workspace path. In a skill-installation context, users may copy-paste commands blindly, and if the path is wrong, symlinked, or unexpectedly populated, this can cause irreversible data loss beyond the intended skill artifacts.

Content

Scanner excerpt · INSTALL.md (reported line 222)May include surrounding context.

cp todos/todos.db ~/todos_backup_$(date +%Y%m%d).db

3. 删除目录

rm -rf /home/qwenpaw/.qwenpaw/workspaces/default/todos

text

---

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
91% confidence
Finding

The documentation instructs users to run rm -rf /home/qwenpaw/.qwenpaw/workspaces/default/todos, a forceful recursive deletion of a workspace path. In a skill-installation context, users may copy-paste commands blindly, and if the path is wrong, symlinked, or unexpectedly populated, this can cause irreversible data loss beyond the intended skill artifacts.

Content

Scanner excerpt · INSTALL.md (reported line 222)May include surrounding context.

cp todos/todos.db ~/todos_backup_$(date +%Y%m%d).db

3. 删除目录

rm -rf /home/qwenpaw/.qwenpaw/workspaces/default/todos

text

---

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description is for an end-user TODO management skill with natural-language triggers and personal task operations. The actual code chunk is unrelated to runtime TODO functionality or user-trigger handling; it is a developer-facing build/release helper script. Its primary purpose is packaging the project for distribution, including filesystem operations in /tmp and release guidance. This is a materially different purpose from the declared behavior, so it should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is for an end-user TODO management skill that responds to natural-language task operations across sessions. The supplied code does not implement todo creation, retrieval, update, deletion, prioritization, tagging, reminders, or conversational triggers. Instead, it is a developer-oriented shell script for pre-commit privacy checks, scanning source files for hardcoded secrets and warning about local files. This is a materially different primary purpose and introduces undeclared file-scanning and commit-blocking behavior unrelated to the stated skill.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The code clearly implements a local/CLI TODO manager, which is broadly aligned with personal cross-session TODO management. Basic declared functions like adding, listing, completing, deleting, priorities, tags, and overdue handling are supported. However, the declared description emphasizes a natural-language-triggered skill and specifically mentions timed DingTalk push notifications, neither of which appears in this code chunk. Conversely, the code exposes several capabilities not mentioned in the description—database initialization, overdue batch marking, stats, and arbitrary field updates—suggesting a materially different interface and somewhat broader operational scope. This is best classified as a mismatch due to missing declared behavior and notable undeclared capabilities, even though the overall domain (personal TODO management) is consistent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

代码整体仍然围绕个人 TODO 管理这一核心目的,且与添加、删除、完成、查询、优先级、标签、跨会话持久化等主要功能基本一致,因此不是完全无关的实现。但该片段实际暴露的是一个命令行程序及其测试,而不是一个按自然语言意图触发的对话式 skill;同时声明中特别提到的钉钉定时推送能力在代码中没有体现。基于给定代码片段,描述对核心领域是大体相关的,但在交互方式和部分能力上存在明显不一致,因此应判定为描述与行为有一定程度的失配。

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The add-action triggers include very broad everyday verbs and adjectives such as “写”, “做”, “看”, “问”, “需要”, and “重要”, which can appear in ordinary conversation without any intent to create a TODO. In a skill that auto-triggers from natural language and persists items across sessions, this can cause unintended task creation, accidental storage of sensitive content, and noisy or manipulative state changes from unrelated user messages.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Delete triggers like “删掉”, “取消那条”, and especially “不要了” are too vague for a destructive action, particularly when no mandatory task identifier or confirmation is specified. In a personal cross-session TODO system, accidental deletion can permanently remove reminders or records, and ambiguous phrasing makes destructive misfires much more likely during normal conversation.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/pre_commit_check.sh (reported line 50)May include surrounding context.

sh
echo "✅ 隐私检查通过:无敏感信息"

# 检查 .env 文件(不应存在)
if [ -f ".env" ]; then
    echo "⚠️  发现 .env 文件,确保已加入 .gitignore"
fi

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/pre_commit_check.sh (reported line 52)May include surrounding context.

sh
echo "✅ 隐私检查通过:无敏感信息"

# 检查 .env 文件(不应存在)
if [ -f ".env" ]; then
    echo "⚠️  发现 .env 文件,确保已加入 .gitignore"
fi

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/pre_commit_check.sh (reported line 51)May include surrounding context.

sh
echo "✅ 隐私检查通过:无敏感信息"

# 检查 .env 文件(不应存在)
if [ -f ".env" ]; then
    echo "⚠️  发现 .env 文件,确保已加入 .gitignore"
fi

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file contains user-facing natural language in Chinese, beginning with the changelog description, and continues that pattern throughout the file. Under the policy rule, forcing a specific language without user opt-in or documented regional justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

L153 states the skill supports appending ETF-tagged todos to a quantitative report, but L035 explicitly says this "未实现" feature claim was removed as false labeling. That means the documentation at L153 actively asserts behavior the project itself later acknowledges did not exist, creating an intent/documentation contradiction.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest describes a personal cross-session TODO manager with natural-language add/query, priority, tags, and timed DingTalk reminders. This design explicitly includes linkage with ETF quantitative reports and appending TODOs into report files, which is a separate domain-specific reporting capability not reflected in the manifest description.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The design explicitly selects a 'pushy' trigger strategy with broad keyword and synonym matching, which raises the likelihood of accidental activation from ordinary conversation. In an agent environment, unintended invocation can cause unauthorized state changes such as adding, completing, or deleting TODOs without clear user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The listed trigger phrases include common natural-language expressions such as '提醒我', '完成', and '删除' without sufficient contextual guards. Because these phrases are high-collision in normal chat, the skill may misinterpret discussion or quoted text as commands and perform unintended TODO operations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The TRIGGER_PATTERNS use broad regexes, including partially anchored and highly generic phrases, making trigger boundaries ambiguous. This creates a realistic risk of false activation, especially for mutating actions like done and del, which can alter persistent cross-session data based on incidental text.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest states timed push notifications via DingTalk, which suggests DingTalk is the reminder mechanism in scope. The design later changes the default behavior to WorkBuddy with DingTalk as fallback, materially altering the described external behavior and integration surface.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The reminder and push sections describe transmitting TODO titles, due dates, and tags to WorkBuddy/stdout capture or DingTalk without a clear privacy warning. Personal TODO content often contains sensitive work or financial information, so undisclosed external delivery increases confidentiality risk in this skill's context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation describes archive cleanup automation that deletes old data on a schedule but does not prominently warn users about retention loss or deletion behavior. Scheduled deletion without explicit notice can lead to unintended data loss, especially in a cross-session personal productivity tool where users may rely on long-term records.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation states that recurring WorkBuddy automations are already created, which expands the skill from on-demand personal TODO management into persistent background actions. In an agent ecosystem, undeclared automation creation can cause unexpected task execution and ongoing access to reminder content without an explicit, current user consent step.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The uninstall section includes a recursive deletion command for the skill directory but does not clearly warn that this permanently removes the application and local user data if no backup is taken. In installation documentation, destructive commands are risky because users may paste them without understanding the data-loss consequences.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · INSTALL.md (reported line 233)May include surrounding context.

md
|------|------|
| `ModuleNotFoundError: No module named 'src'` | 确保在 `todos/` 目录下执行 |
| `Database is locked` | 等待 5 秒重试,或检查是否有其他进程占用 |
| `Permission denied: todos/` | `chmod 755 todos/` |
| 钉钉推送失败 | 检查钉钉 webhook 配置 + 网络连通性 |
| 定时任务不触发 | 检查 `qwenpaw cron list` 确认任务存在 |

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

该 markdown 文件列出的触发词包含“提醒我...”“完成...”“删除...”“今天有什么”等常见自然语言短语,缺少上下文限定、作用范围说明或排除示例。根据文档本身,读者可能将这些表述理解为通用唤起条件,而不是仅限待办场景,从而增加非预期触发的风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README presents the skill entirely in Chinese and frames user interaction examples exclusively as Chinese utterances, indicating a language constraint for use. There is no visible note that other languages are supported, optional, or that Chinese is required for a justified region-specific reason.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.