T09 · Insecure Skill Coding Practices
- Location
SKILL.md:122- Finding
Hard-Coded WeChat Recipient Can Cause Unauthorized Disclosure of Sensitive Mood Reports
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This mood journal skill is related to its stated purpose, but it includes recurring reporting and a hard-coded WeChat recipient that could expose sensitive mood notes.
Install only if you are comfortable storing mood records in the hard-coded Obsidian/iCloud path and do not enable the weekly cron sender without replacing and verifying the recipient. Review or remove the report-sending cron instructions, avoid /tmp report output for private data, and prefer manual local report generation unless recurring external delivery is explicitly intended.
SKILL.md:122Hard-Coded WeChat Recipient Can Cause Unauthorized Disclosure of Sensitive Mood Reports
scripts/cron_send_report.sh:7Predictable Temporary File Exposes Mood Reports and Permits Symlink-Based File Overwrite
The skill context is personal mood journaling into Obsidian, but the documentation also describes reading historical entries and producing aggregate analytics, which are materially different capabilities. In a privacy-sensitive context, hidden analysis features increase risk because they expand access from one new entry to potentially all prior emotional records.
The skill context is personal mood journaling into Obsidian, but the documentation also describes reading historical entries and producing aggregate analytics, which are materially different capabilities. In a privacy-sensitive context, hidden analysis features increase risk because they expand access from one new entry to potentially all prior emotional records.
The skill context is personal mood journaling into Obsidian, but the documentation also describes reading historical entries and producing aggregate analytics, which are materially different capabilities. In a privacy-sensitive context, hidden analysis features increase risk because they expand access from one new entry to potentially all prior emotional records.
The skill includes scheduled sending of weekly mood reports to a WeChat recipient, which is an outbound messaging capability unrelated to basic local mood logging. Because mood records are intimate personal data, automatic transmission to an external channel materially increases confidentiality risk and could leak private summaries without ongoing user awareness.
The weekly automation section lacks a clear warning that private mood summaries will be automatically generated and transmitted to an external messaging channel. In a mental-health journaling context, silent or poorly disclosed exfiltration of summaries is particularly dangerous because users may not expect recurring disclosure of aggregated personal reflections.
The script's documented behavior generates and sends a weekly mood report, which materially differs from the manifest's stated purpose of logging daily mood entries via log_mood.py. This capability mismatch is dangerous because it can hide undeclared data processing and sharing behavior from users and reviewers, especially for sensitive mental-health data.
This is a true arbitrary file-write issue: the script opens whatever path is supplied in --output and writes attacker-controlled report content there. Within an agent skill, that capability exceeds the declared mood-logging purpose and can be leveraged to tamper with local files, create misleading artifacts, or clobber important data, especially because the skill already has access to personal journal content.
The skill documentation directs use of shell commands and implies file read/write behavior, but the manifest declares no explicit tool scope or permissions. This weakens security boundaries and reviewability because a skill that can read, write, and execute shell actions is being presented without transparent capability declaration.
The skill instructs saving mood logs into an Obsidian vault located in a cloud-synced iCloud directory, but gives no warning that sensitive emotional data will persist on disk and may sync to cloud services. In this context, omission of that privacy notice can cause users to disclose intimate information without understanding storage and retention implications.
The manifest description, headings, parameters, examples, and output format are all presented in Chinese, with no indication that other languages are supported or that Chinese is required for a region-specific reason. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.
The manifest frames the skill as a daily mood logger, but later sections add weekly reporting and automated sending capabilities. This is a security-relevant inconsistency because it obscures the true operational scope of a skill handling highly sensitive personal information.
The cron creation command establishes a persistent scheduled task that will continue running beyond the current session. Persistence is security-relevant here because it enables ongoing access, report generation, and possible data transmission on a recurring basis without repeated user initiation.
设置命令:
openclaw cron create --name "mood-weekly-report" \
--schedule "0 9 * * 0" \
--command "python3 ~/.openclaw/workspace/skills/mood-logger/scripts/send_weekly_report.py" \
--channel openclaw-weixin \
The documented use of OpenClaw cron and system cron adds recurring autonomous execution, which is materially more powerful than a simple on-demand mood logger. Persistent scheduled execution can continue processing sensitive user data without active user awareness, making misuse or accidental over-collection more likely.
This duplicate finding points to the same scheduled OpenClaw cron setup, which creates persistent autonomous behavior. Even if intended as convenience documentation, persistence in a skill handling mood data raises privacy and user-awareness concerns because the task may continue operating regularly without fresh approval.
当 OpenClaw CLI 可用时,运行:
openclaw cron create mood-weekly-report \
--schedule "0 9 * * 0" \
--task "每周心情周报" \
--command "生成并发送上周的心情周报"
This duplicate finding points to the same scheduled OpenClaw cron setup, which creates persistent autonomous behavior. Even if intended as convenience documentation, persistence in a skill handling mood data raises privacy and user-awareness concerns because the task may continue operating regularly without fresh approval.
当 OpenClaw CLI 可用时,运行:
openclaw cron create mood-weekly-report \
--schedule "0 9 * * 0" \
--task "每周心情周报" \
--command "生成并发送上周的心情周报"
The setup document introduces a weekly report generation and sending workflow that goes beyond the declared skill scope of only logging daily moods to Obsidian. Scope expansion around emotional-history summaries increases privacy risk because it enables secondary processing and possible disclosure of sensitive mood data without clear user consent or manifest disclosure.
The instructions schedule automatic generation and sending of a weekly mood report but do not warn that mood logs are sensitive personal data or explain who receives the report. This omission can lead users to enable automated disclosure of emotional-health information without informed consent.
The crontab instructions establish a persistent scheduled task, causing the skill's reporting behavior to survive beyond the current session. Persistence is risky here because it automates repeated access to sensitive mood-history data and may continue unnoticed after the user forgets it was installed.
# 编辑 crontab
crontab -e
# 添加以下行(每周日 9:00 运行)
0 9 * * 0 cd /home/loong/.openclaw/workspace && python3 ~/.openclaw/workspace/skills/mood-logger/scripts/weekly_mood_report.py >> /tmp/mood_report.log 2>&1
The manifest describes a narrowly scoped skill for recording daily mood entries using a fixed-format logging script. This file instead automates weekly report generation and output handling, which is a distinct reporting capability not mentioned in the skill description.
The inline documentation says the script sends the weekly report to WeChat through an OpenClaw messaging system. In reality, the implemented behavior is only to save the report under /tmp and display it with cat, with no messaging or webhook invocation present.
The script writes a mood report, which is likely sensitive personal data, to a predictable file in /tmp. Temporary directories are broadly accessible in many environments, and using a fixed filename increases the risk of unintended disclosure, race conditions, or symlink-based file clobbering if another local user or process can interact with that path.
The docstring and user-facing descriptions are entirely in Chinese, with no indication that the skill supports other languages or that Chinese is a required locale. This creates a natural-language policy issue because it imposes a specific language on users without opt-in or documented regional justification.
This file adds report-generation and sending orchestration that is not justified by the stated purpose of simple mood entry recording. Because mood data is highly sensitive, undisclosed reporting functionality increases the risk of privacy violations, unexpected data disclosure, and expansion of access beyond what the user intended.
The code invokes weekly_mood_report.py instead of the manifest-declared log_mood.py workflow, indicating the skill performs a different operation than advertised. In a mood-logging context, this is security-relevant because users may believe they are only storing entries while the skill can instead aggregate sensitive data into reports for other uses.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def main():
# 生成周报
result = subprocess.run(
[sys.executable, REPORT_SCRIPT],
capture_output=True,
text=True,
No suspicious patterns detected.