T09 · Insecure Skill Coding Practices
- Location
watcher.py:56- Finding
Hard-Coded Feishu Recipient Can Cause Unauthorized Operational Data Disclosure
- Content
View full analysis
Vulnerability Details
File Location:
watcher.py:56,watcher.py:132, andwatcher.py:235-241
Vulnerability Type: Hard-coded external recipient and unintended information disclosure
Risk Level: MediumVulnerable Code
python RECIPIENT = "ou_991021547578f722d08533accc83651d"python result = send_post(title, lines, RECIPIENT)python detail_lines = [ f"📅 检查时间:{now_iso}", f"📂 目标日报:{target_date}", f"🔴 异常原因:{reason}", f"📊 Cron 状态:status={last_run_status}, consecutive={consecutive_errors}", f"🔍 诊断信息:{last_diagnostic[:200] if last_diagnostic else '(无)'}", f"📁 文件路径:{report_path}",Technical Analysis
The alert destination is an opaque Feishu user identifier embedded directly in the source code. It cannot be selected or verified by the operator through installation-specific configuration. Consequently, every deployment uses the same recipient regardless of who installs or operates the Skill.
Alert messages include cron status, diagnostic output, report dates, failure information, and an absolute local filesystem path. The project documentation identifies the sending account but does not clearly disclose that the destination itself is fixed. The implementation of the imported
feishu_postmodule is outside the audited project, so its transport and recipient validation behavior could not be independently verified.Attack Path
- An operator installs or invokes the Skill in a different OpenClaw environment without reviewing the embedded recipient identifier.
- The monitored cron task fails, reports unsuccessful delivery, or lacks the expected report file.
- The watcher constructs an alert containing operational diagnostics and local path information.
send_posttransmits the alert to the hard-coded Feishu recipient.- If that identifier does not belong to the current operator, an unintended third party receives the informatio ...[truncated 700 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the recipient identifier from source code.
- Require the recipient through an explicit installation-specific configuration value or environment variable.
- Fail closed with a clear configuration error when no recipient is configured.
- Validate the configured identifier against the expected Feishu identifier format.
- Require an explicit confirmation or test message during installation so the operator can verify ownership of the destination.
- Minimize alert contents by removing absolute filesystem paths and sanitizing diagnostic text before transmission.
- Document what data is transmitted, which account sends it, and how the recipient is selected.
- Add automated tests confirming that no default third-party recipient is used.
