Back to skill

Security audit

个人GTD知识库体系搭建

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for building a GTD knowledge system, but its automation recipes need review because they can make recurring tasks read and persist chat, memory, TODO, and configuration data without enough privacy controls.

Install only if you are comfortable with a Chinese-language GTD/PKM workflow and will keep automation manual or tightly scoped. Before enabling HEARTBEAT, cron, log generation, memory cleanup, or configuration backups, decide exactly which conversations, memory files, TODOs, project notes, and config paths may be read, where outputs are written, who can access them, and how sensitive content will be redacted or deleted.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

other

Warning
Location
references/openclaw-automation-recipes.md:34
Finding

Recurring Collection and Persistence of Sensitive Conversation and Agent-Memory Data

Content
View full analysis

Vulnerability Details

File Location: references/openclaw-automation-recipes.md, lines 34–42 and 65–71
Vulnerability Type: Sensitive Agent State and Conversation Collection
Risk Level: Medium

Evidence

The following is an English translation of the complete relevant documentation segment at lines 34–42:

markdown
Recommended checklist:

1. Review today's recent conversations and context
2. Check whether today's TODO contains overdue items
3. Check whether `00-Inbox` needs to be cleared
4. Check whether `99-Resource-Library/Reading-Queue.md` requires a reminder
5. Check whether failed cron tasks should be retried
6. Determine whether the user should be proactively reminded
7. Periodically organize `MEMORY.md`

The log-generation instructions at lines 65–71 additionally specify:

markdown
### Log generation

Input source priority:

1. Actual chat records from the main session
2. `memory/YYYY-MM-DD.md`
3. The current day's TODO and project notes

Technical Analysis

The automation recipe recommends that recurring heartbeat and log-generation tasks inspect actual main-session chat records, recent conversation context, daily memory files, project notes, and long-term MEMORY.md content.

These sources can contain personal information, confidential project details, credentials pasted into conversations, access tokens, financial information, or material unrelated to the PKM task. The recipe does not establish:

  • Explicit user consent before conversation or memory access
  • A restriction to named sessions or task-relevant records
  • Secret detection and redaction
  • A preview or approval step before information is persisted
  • Retention and deletion limits
  • Restrictions against storing generated logs in synchronized or shared repositories

This is not confirmed Agent Memory Poisoning because the documentation does not inject attacker-controlled instructions into memory or override future safety rules. It is instead an unclassified ...[truncated 1734 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit, informed opt-in before any heartbeat or scheduled task reads conversations or Agent-memory files.
  2. Restrict collection to specifically named sessions, approved date ranges, and fields necessary for the current PKM task.
  3. Default to structured TODO and project metadata instead of raw conversation transcripts.
  4. Add mandatory filtering for passwords, API tokens, private keys, authentication cookies, financial data, health data, and other sensitive identifiers.
  5. Generate a proposed summary and require user confirmation before writing it to MEMORY.md or another durable location.
  6. Define retention limits and provide a documented process for deletion from active files, repository history, synchronization targets, and backups.
  7. Keep generated logs and memory files outside shared repositories by default, and apply restrictive filesystem permissions.
  8. Record the source, collection time, and approval status of persisted summaries to support later review.
  9. Document that cron and heartbeat automation must run with the minimum file-access permissions necessary.
  10. Disable conversation-derived logging by default and make structured, local-only reporting the safer default.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

描述覆盖了较广的咨询、审计、重构和自动化设计能力,但代码实际只完成一个较窄的任务:在本地文件系统中初始化 OpenClaw 风格的 GTD 知识库目录与 Markdown 模板。这与“从零搭建”部分有一定相关性,但没有任何代码用于分析现有仓库、审计结构、重构旧库、持续优化,或生成/维护 AGENTS.md、HEARTBEAT.md、TODO 等文件。主功能更准确地说是“脚手架搭建器/初始化器”。因此描述对能力范围有明显夸大,属于描述与行为不一致。

Content

No source excerpt is available for this finding.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · references/openclaw-automation-recipes.md (reported line 122)May include surrounding context.

md
��,把收集箱内容分类

### Organize

- 把可执行事项写入 `TODO`
- 把项目材料移入 `10-工作` 或 `20-项目`
- 把学习结果沉淀到 `40-学习`

### Reflect

- 每日写日志
- 每周回顾项目与行动
- 每月收敛标签与归档

### Engage

- 从 `40-学习` 和 `20-项目` 中抽取可输出内容到 `50-知识输出`

## 7. 避坑清单

- 不要同时用系统 crontab 和 OpenClaw cron 备份同一批文件
- 不要让知识库检查任务因为投递目标格式错误而长期失败
- 不要把运行脚本和知识正文混在一个 Git 仓库,除非用户明确接受
- 不要在 heartbeat 里塞太多重任务,避免 token 和噪音
- 不要让自动化只会“提醒”,要让它具备最小闭环能力,比如生成报告、更新 TODO、记录失败原因

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill description is written as if interaction will occur in Chinese, and the README does not mention any user language choice or opt-in. Under the policy rule, forcing a specific language without user choice is a natural-language policy concern unless the locale limitation is explicitly justified.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill references actions that inspect the workspace and run local scripts, which implies file read/write capability, but it does not declare any explicit tool scope or permission boundary. In an agent environment, missing scope declarations can cause over-broad file access or leave operators unable to constrain what parts of the filesystem the skill may read or modify.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instruction "统一使用中文标签,除非用户已经稳定使用英文体系" sets a default language policy for user content organization. This is a natural-language locale constraint that does not offer a neutral choice or explicit opt-in, so it can conflict with organizational language-choice policies.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The section recommends scheduled configuration backups and discusses implementation choices, but it does not warn users that automation will copy potentially sensitive configuration or workspace data on a recurring basis. For markdown files, safety-impacting behavior that affects user data should include a clear warning about what is backed up, where it is stored, and the privacy implications.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The scaffold hardcodes Chinese directory names throughout the repository structure, which imposes a specific language/locale on all generated content. Because the script does not offer an opt-in language choice or explain that it is intended only for a Chinese-language environment, this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The generated markdown explicitly states '优先用中文标签' and the surrounding templates use Chinese naming conventions by default. This prescribes a specific language for user content without presenting a choice or documenting a justified regional scope.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

L226 明确写明 bootstrap_knowledge.py 不会默认生成 AGENTS.md、HEARTBEAT.md 或 TODO/。但前文 L003、L025、L107 将这些文件的设计与落地作为该技能的重要能力范围,容易让使用者误解脚本本身会覆盖这部分实现。虽然更像文档层面的边界澄清不足,而非代码安全问题,但属于意图与实现说明之间的轻微不一致。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill guidance is written in Chinese and presents the workflow as the default interaction mode, with no indication that users may choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is justified, which is not stated here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
74% confidence
Finding

The skill content is presented as a prescriptive protocol entirely in Chinese, starting with a Chinese title and instructions, with no indication that language is optional or selected by user preference. Under the locale policy rule, forcing a specific language without opt-in can be a natural-language policy issue unless the regional constraint is clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script defines required top-level directories using Chinese names and later emits a Chinese-language report and CLI help strings, which imposes a specific locale by design. There is no visible option for users to select another language or locale, so this is a natural-language policy concern under the language-choice rule.

Content

No source excerpt is available for this finding.