Back to skill

Security audit

Agent Daily Retro

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent daily-retrospective purpose, but it asks for broad session-history access, persistent agent memory/config edits, scheduled execution, and ships an enabled real Feishu webhook.

Review before installing. Do not use the packaged Feishu webhook; revoke or replace it with your own secret and keep notifications disabled until you know exactly what will be sent. Run the skill manually or as an unprivileged user, not from root cron. Require a diff and explicit approval before any change to MEMORY.md, USER.md, SOUL.md, or AGENTS.md, and avoid storing raw conversation details, tool results, secrets, or sensitive profile inferences.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
Findings (4)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:51
Finding

Untrusted conversation content can poison persistent Agent policy and identity files

Content
View full analysis
Remediation
View remediation

T06 · System Persistence

Error
Location
INSTALL.md:88
Finding

Daily cron registration creates privileged cross-session persistence

Content
View full analysis
> /var/log/agent_retro.log 2>&1 ``` ### Technical Analysis The installation guide directs the operator to register a cron job that executes the Skill every day. This survives the original installation and every individual Skill run, making it a system persistence mechanism. The command uses a path under `/root` and writes to `/var/log`, while the installation guide separately states that root or sudo permission is required. Daily retrospective generation does not inherently require root privileges. It only needs narrowly scoped read access to selected session records and write access to a dedicated output directory. The cron entry also executes mutable Python source from the workspace without an integrity check. Any party that can replace or modify `agent_retro.py`, its imported modules, or potentially files resolved through its runtime environment can cause modified code to run automatically at the next scheduled time. Automatic scheduling is consistent with the advertised daily feature, but root-level scheduling exceeds minimum privilege and magnifies the consequences of any later code or configuration compromise. ### Attack Path 1. The operator follows the installation instructions while using the root account. 2. A persistent root crontab entry is created. 3. An attacker later gains write access to `agent_retro.py`, `session_analyzer_v2.py`, or the Skill directory through a compromised update, account, or incorrectly assigned permissions. 4. The attacker replaces or modifies executable Python code. 5. At 00:05, cron launches the modified code automatically with the cron owner's privileges. 6. The payload can access files and perfor ...[truncated 729 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
config.json:39
Finding

Enabled Feishu webhook credential is committed in plaintext

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
agent_retro.py:99
Finding

Retrospective workflow ingests complete session records without data minimization

Content
View full analysis
List[Dict]: """Collect session data for the specified date.""" sessions_dir = self.config.get_path("sessions_dir", agent_id=agent_id) if not sessions_dir.exists(): print(f"Session directory does not exist: {sessions_dir}") return [] sessions = [] date_str = target_date.strftime("%Y-%m-%d") for file_path in sessions_dir.glob("*.jsonl"): if date_str in file_path.name: sessions.extend(self._parse_session_file(file_path)) print(f"Collected {len(sessions)} session records for {date_str}") return sessions def _parse_session_file(self, file_path: Path) -> List[Dict]: """Parse a session file.""" sessions = [] try: with open(file_path, "r", encoding="utf-8") as f: for line in f: line = line.strip() if line: try: data = json.loads(line) sessions.append(data) except json.JSONDecodeError: continue except Exception as e: print(f"Failed to parse file {file_path}: {e}") return sessions ``` ### Technical Analysis The collector parses each matching JSONL record in full and retains the complete object. The Skill instructions additionally call for extracting user messages, assistant responses, tool calls, and tool results. Tool output and conversation content can contain credentials, personal information, file contents, authentication material, or unrelated confidential data. The six retrospective dimensions generally require summaries, not unrestricted retention of every field in every record. The code has no field allowlist, secret redacti ...[truncated 1888 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (32)

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

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

openclaw --version

检查工作区目录

ls -la ~/.openclaw/workspace/

text

## 🚀 安装步骤

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

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

openclaw --version

检查工作区目录

ls -la ~/.openclaw/workspace/

text

## 🚀 安装步骤

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · README.md (reported line 113)May include surrounding context.

openclaw --version

检查工作区目录

ls -la ~/.openclaw/workspace/

text

## 🚀 安装步骤

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 56)May include surrounding context.

步骤3:权限设置

bash
# 确保有写入权限
chmod 755 ~/.openclaw/workspace/memory
chmod 644 ~/.openclaw/workspace/skills/agent-retro/*.py

# 设置执行权限

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 210)May include surrounding context.

步骤3:权限设置

bash
# 确保有写入权限
chmod 755 ~/.openclaw/workspace/memory
chmod 644 ~/.openclaw/workspace/skills/agent-retro/*.py

# 设置执行权限

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 57)May include surrounding context.

bash
# 确保有写入权限
chmod 755 ~/.openclaw/workspace/memory
chmod 644 ~/.openclaw/workspace/skills/agent-retro/*.py

# 设置执行权限
chmod +x ~/.openclaw/workspace/skills/agent-retro/agent_retro.py

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

手动配置(备用)

bash
# 编辑crontab
crontab -e

# 添加以下行
5 0 * * * cd /root/.openclaw/workspace/skills/agent-retro && python3 agent_retro.py >> /var/log/agent_retro.log 2>&1

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

验证定时任务

bash
# 查看cron任务
crontab -l | grep agent_retro

# 查看cron日志
grep CRON /var/log/syslog | tail -10

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

验证定时任务

bash
# 查看cron任务
crontab -l | grep agent_retro

# 查看cron日志
grep CRON /var/log/syslog | tail -10

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

验证定时任务

bash
# 查看cron任务
crontab -l | grep agent_retro

# 查看cron日志
grep CRON /var/log/syslog | tail -10

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The maintenance section recommends automatic deletion of backup and lock files using find ... -delete without warning that the action is irreversible. If paths are misconfigured or users do not understand what matches the pattern, important recovery data or state files may be permanently removed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The upgrade instructions include a destructive command (rm -rf agent-retro) without an explicit warning, confirmation step, or safer alternative. In an installation guide, this can cause irreversible deletion of the existing skill directory or unintended data loss if the user is in the wrong path or the command is modified incorrectly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The document presents the skill entirely in Chinese and names the system in Chinese, with no indication that language is configurable or that the skill is intentionally limited to a Chinese-speaking context. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README describes an automated system that analyzes prior conversations, updates multiple persistent memory/configuration files, and sends summaries to Feishu, but it does not present any explicit privacy warning, consent requirement, or data-handling boundaries. Because the processed content appears to include conversation-derived user information and behavioral profiles, this creates a real risk of silent collection, retention, and third-party disclosure of sensitive data.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README instructs the skill to analyze conversation history, derive user and agent profiles, write that information into persistent files, and send reports through Feishu. This is a substantive data-handling vulnerability because it operationalizes extraction and redistribution of conversation-derived personal or sensitive information without visible minimization, access control, consent, or sanitization safeguards.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs the agent to read all session records for the target date and extract user commands, assistant replies, tool calls, and tool results without any privacy notice, minimization rule, or consent check. This creates unnecessary exposure of potentially sensitive history and can propagate private data into derived memory and profile files, increasing confidentiality risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs the agent to perform broad, persistent modifications across multiple workspace files, including core configuration files, and explicitly requires real physical writes before reporting to the user. This is dangerous because it can silently alter long-lived state, overwrite trusted context, and create hard-to-detect persistence or integrity issues without explicit user consent at execution time.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The module description and all user-facing strings are written exclusively in Chinese, indicating the skill is designed to operate in a fixed language without offering a user choice. This can violate language/locale policy when no opt-in or justified region-specific constraint is documented.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow analyzes session content and persists derived summaries such as user profile, agent profile, actions, and mistakes into long-term markdown files in plain language. In this context, the danger is elevated because the code fabricates or infers sensitive profile traits and stores them unencrypted, which can expose personal data, operational habits, and conversation-derived inferences to other local users, backups, or later tooling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill writes retrospective summaries, user profile data, and agent profile data to persistent files under the workspace without explicit consent, confirmation, or a prominent warning. Because the content is derived from conversations, this can silently store sensitive personal or operational information in long-term memory, increasing privacy and data-retention risk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The function name, comments, and caller-facing logs indicate that core configuration files are being updated, but the implementation only creates backups and returns a list of backup actions. This is an integrity and trust issue: operators may believe state was changed when it was not, which can cause security assumptions, audit errors, or skipped follow-up actions.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The generated report states that core configuration files were updated and that safety measures were applied, but the code path only backs up existing files. Misleading security/status reporting is dangerous because users may rely on false evidence of completed hardening or persistence actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This is a manifest file, so vague-trigger review applies. The description "Agent每日复盘系统 - 基于Tangc规范实现" describes the skill's purpose in broad terms but provides no specific trigger phrases, scope limits, or exclusion conditions, which can make invocation criteria unclear in systems that infer activation from manifest text.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The visible natural-language metadata is entirely in Chinese (for example, the description and author fields), and there is no indication that users can choose another language or opt in to a locale-specific experience. Under the policy, forcing a specific language without user choice is a natural-language policy concern unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The configuration embeds a live Feishu bot webhook and enables outbound messaging by default, creating an exfiltration and unsolicited notification channel. In an agent skill that processes session history, memory files, and agent profiles, this can transmit sensitive operational or user-derived data to an external service without clear scoping, consent, or justification beyond a generic output channel.

Content

No source excerpt is available for this finding.