T06 · System Persistence
- Location
SKILL.md:293- Finding
Recurring Cron Task Creates Cross-Session Persistence
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This knowledge-base checker is mostly purpose-aligned, but its repair and scheduling features can delete or rewrite files and include unsafe generated scripts that require careful review.
Install only after reviewing the repair and scheduling behavior. Back up the knowledge base first, avoid running generated auto-fix scripts without manual inspection, do not enable cron/email/Feishu delivery unless you explicitly want persistent scheduled runs, and treat generated HTML reports as potentially containing local path information.
SKILL.md:293Recurring Cron Task Creates Cross-Session Persistence
scripts/auto_fix.py:78Shell Command Injection in Generated Bash Repair Script
scripts/auto_fix.py:174Python Source Injection Through Unsafely Embedded Knowledge-Base Path
scripts/report_generator.py:272HTML Injection Through Unescaped Scan Path
The core purpose is mostly aligned: the script is indeed a knowledge-base health checker that scans Markdown notes, detects empty/low-quality files, broken wiki links, content density issues, and graph/network properties. However, the declared description materially overstates several capabilities not present in the code. There is no implementation for Notion-specific or Logseq-specific parsing/import; the scan is limited to local .md files. There is also no visual report/card generation—results are returned as JSON. Finally, the description promises automatic repair suggestions, but the code only reports findings and scores without producing fixes or recommendations. No obvious unrelated or dangerous undeclared behavior is present; the mismatch is due to overstated features in the description.
The skill includes generated shell commands using rm to delete files classified as 'empty shell' notes. This is dangerous because heuristic classification can be wrong, paths may be broader than intended, and users may execute the script with little scrutiny, causing irreversible data loss in a personal knowledge base.
# 知识库自动修复脚本(需人工审查后执行)
# 1. 删除空壳文件
rm "memory/drafts/待研究.md"
rm "memory/temp/quick-note.md"
# 2. 修复断链(搜索相似文件名)
This second rm example reinforces a pattern of destructive, parameterized shell output driven by analysis results. In the skill context, file paths originate from repository contents and heuristics, so mistakes or path-handling issues can translate directly into user-triggered deletion of legitimate notes.
# 1. 删除空壳文件
rm "memory/drafts/待研究.md"
rm "memory/temp/quick-note.md"
# 2. 修复断链(搜索相似文件名)
sed -i '' 's/\[\[wave-function\]\]/[[wave-function-theory]]/g' "memory/physics/quantum-mechanics.md"
The skill describes capabilities that require filesystem reads, file writes, and shell/script generation, but it declares no explicit tool scope or permission boundaries. In an agent environment, missing least-privilege constraints increases the chance that the skill can be invoked with broader access than intended, especially because later sections discuss report generation, browser opening, cron setup, and fix-script creation.
The manifest description and the entire user-facing documentation are written in Chinese, with no indication that the skill can operate in other languages or adapt to user preference. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.
The skill prominently promotes automatic repair and later provides destructive deletion examples, but it lacks a strong upfront warning about data-loss risk. Users may treat generated fixes as routine maintenance and execute removal commands on notes that are merely short, placeholder, or misclassified.
Optional HTTP checking of external links introduces network access to third-party servers, which goes beyond strictly local document analysis. This can leak browsing patterns, internal document references, or sensitive URLs embedded in the knowledge base, and may contact attacker-controlled endpoints during analysis.
The skill expands from local knowledge-base analysis into cron persistence and outbound delivery to Feishu/email, which materially broadens its operational scope. That introduces risks of unauthorized persistence, data exfiltration of scan results, and execution beyond the user's immediate session, none of which are necessary for a basic health checker.
This markdown file contains user-facing natural-language content entirely in Chinese, including headings and evaluation notes, with no indication that users may choose another language. The policy for this category requires flagging language or locale constraints unless the skill explicitly offers opt-in or documents a justified regional limitation.
The file presents all user-facing natural-language content in Chinese, including headings, descriptions, and release instructions. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified.
This code file contains natural-language docstrings and runtime messages entirely in Chinese, starting with the module description and continuing through generated script comments and CLI output. Under the policy rule for language/locale, this is a violation because the skill imposes a specific language without any opt-in, fallback, or documented region-specific justification.
The script generates executable shell code that can delete files and rewrite content based entirely on scan results. Even though it warns the user to review first and uses shell escaping for file paths, this still turns analyzer output into actionable destructive operations, which is risky if the input data is wrong, manipulated, or over-broad.
The document declares lang="zh-CN", and the visible UI text throughout the page is exclusively in Chinese. Under the policy rule, forcing a specific language or locale without user opt-in or a documented justification is a natural-language policy violation.
The report embeds a specific local filesystem path (/Users/mac/.openclaw/workspace/memory) directly in page content, which leaks host-specific environmental information to anyone who can view or receive the report. This is unnecessary for a health summary and can aid reconnaissance by revealing usernames, directory structure, workspace naming, and probable operating system details.
The plain-text disclosure of a user-specific local path exposes sensitive contextual metadata in a generated artifact that may be shared externally. In this skill context, reports are intended for diagnostics and export, so leaking workstation paths is more dangerous because the artifact is likely to leave the local environment and provide useful reconnaissance data to third parties.
This Python file contains user-facing natural-language documentation and status messages exclusively in Chinese, starting with the module docstring and continuing throughout the script. Under the language/locale policy, forcing a specific language without user opt-in is a violation unless the locale restriction is explicitly justified or a choice is offered.
The file defines an HTML escaping helper and uses it in generate_issues_html, but the main HTML template still interpolates unescaped data such as results['scan_path'] and multiple score/stat fields directly into the document. If any of these values can be influenced by untrusted input, an attacker could inject HTML or script into the generated report, which would execute when the report is opened in a browser.
The trigger phrase asks to 'check my knowledge base health' without any scope, path, repository, or confirmation constraints, and the expected behavior says to scan a default path and generate a report. In an agent skill, this can cause unintended activation during normal conversation and may lead to broad local content enumeration or analysis of files the user did not explicitly select.
The 'deep analysis' trigger is broad and the expected workflow includes network-structure analysis, connected components, and weak-link reporting, which implies extensive traversal and metadata extraction across the knowledge base. Without explicit constraints, exclusions, or consent for depth and scope, this increases the risk of over-collection, accidental activation, and costly or privacy-invasive analysis.
The documentation mentions external HTTP link validation but does not clearly warn that this may contact third-party servers and reveal metadata. While lower severity than direct destructive actions, the omission can cause users to unknowingly expose internal link targets or analysis timing to external services.
The markdown file is entirely written in Chinese, including the title and section headings, with no indication that the skill supports other languages or that Chinese is required for a specific regional purpose. This can violate a language/locale policy when a skill implicitly mandates one language without user opt-in.
The docstring and function name describe a stronger Python auto-fix script, but the emitted script only backs up, prints candidate deletions, and explicitly leaves broken-link repair as TODO. This creates a mismatch between the claimed automatic repair behavior and what the generated script actually does.
The inline documentation claims this Python variant is '更强大', yet its emitted logic comments out deletion and leaves broken-link repair unimplemented, while the shell script performs actual rm and sed operations. This is an active contradiction between documentation and behavior rather than a mere omission.
The module docstring and all user-facing strings are written exclusively in Chinese, and the generated HTML explicitly sets lang="zh-CN". This indicates a fixed language/locale choice without any opt-in or explanation that the skill is intended only for a Chinese-language context.
The prompt about having many 'empty shell files' is conversational and can overlap with ordinary discussion of note quality, making accidental routing to the skill more likely. While narrower than a full health scan, it still authorizes file inspection behavior without clear boundaries on which knowledge base or directory is in scope.