Back to skill

Security audit

飞书AI工作日报

Security checks for vulnerabilities and agentic risk

Overview

This skill openly generates and sends a Feishu daily report, but it does so by reading raw cross-agent session logs and reusing private DM text without clear consent, scoping, or review controls.

Review this skill carefully before installing. It should only be used in an environment where all affected agents and users have agreed that their same-day DM-derived work messages may be collected, stored in a plaintext report, and sent to the configured Feishu destination. Prefer adding explicit approval, redaction, fixed recipient allowlisting, and a narrower work-log source before use.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:29
Finding
Unrestricted Cross-Agent Session Collection and External Disclosure<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:29-41` and `SKILL.md:66-72` **Vulnerability Type**: Unauthorized access to private session data and external transmission **Risk Level**: High ### Vulnerable Instructions ```text **Directly read session JSONL files**: - Session path format: `/root/.openclaw/agents/{agent_id}/sessions/{session_id}.jsonl` - Locate the session file most recently modified today, using Beijing time - Parse the JSONL file and extract user messages **User-message extraction logic:** For each agent: 1. Locate JSONL files modified today under `/root/.openclaw/agents/{agent_id}/sessions/` 2. Read each file line by line and locate records with `type="message"` 3. Extract lines where `message.content[0].text` contains `"DM from ou_"` 4. Remove the `"DM from ou_xxx: "` prefix and retain the user's actual message 5. Deduplicate the messages and use them as the agent's work records ``` ```text ### 3. Save the Daily Report Save it to `/root/.openclaw/workspace/daily-report-YYYY-MM-DD.md` ### 4. Send to Feishu Use the `message` tool to send it to Feishu ``` ### Technical Analysis The skill instructs the agent to enumerate and directly read raw session files belonging to multiple agents. It extracts private direct-message content based only on file modification time and a message-prefix match. No authorization check, per-agent opt-in, user-consent verification, data classification, purpose limitation, or access boundary is defined. The collection scope can also expand beyond the statically listed team because the skill explicitly supports automatic discovery of new agents. Consequently, any account or process executing the skill with access to `/root/.openclaw/agents/` may aggregate conversations from a broader set of agents than is necessary for generating a work report. The extracted messages are then written to a plaintext Markdown file and transmitted through the Feishu messaging tool. The instructions do not require ...[truncated 2209 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace raw session-file scanning with a dedicated, structured work-log interface containing only reportable work items. 2. Require explicit opt-in for every agent and user whose content may be included in a report. 3. Enforce an authorization policy that limits the skill to approved agent IDs and explicitly prohibit automatic discovery unless an administrator authorizes it. 4. Avoid processing arbitrary direct-message text. Require users or agents to mark individual entries as reportable. 5. Apply data-loss-prevention filtering before storage or transmission, including detection and redaction of credentials, tokens, personal data, private URLs, and other sensitive material. 6. Generate a preview and require explicit user approval before sending the report externally. 7. Allowlist the Feishu tenant, chat, and recipient identifiers. Reject absent, dynamic, or unapproved destinations. 8. Store reports only when necessary, use restrictive file permissions such as owner-only access, and establish automatic retention and secure-deletion rules. 9. Record auditable metadata identifying the source agents, approval decision, destination, and redactions without logging the sensitive message bodies. 10. Run the skill under a dedicated low-privilege account that can access only approved work-log data rather than the entire `/root/.openclaw/agents/` hierarchy. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Ssd 3

High
Confidence
99% confidence
Finding
These instructions define a workflow that collects user-originated content from session logs and repurposes it into a generated report. That is a direct data-leakage pattern because private user messages are harvested from stored conversations and transformed for secondary use without consent or clear need-to-know boundaries.

Ssd 3

High
Confidence
99% confidence
Finding
The extraction logic specifically tells the agent to parse DM records, strip identifiers, and reuse the actual user utterances as work records. This is especially dangerous because it operationalizes disclosure of verbatim private communications, increasing the chance of leaking secrets, personal data, or confidential business information.

Ssd 3

High
Confidence
98% confidence
Finding
Sending the compiled report to Feishu extends the exposure from local processing to a separate communication channel, increasing the blast radius of any included sensitive content. Once transmitted, the data may be retained, forwarded, or accessed by unintended recipients, making recovery and containment much harder.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger phrases are broad enough that normal conversation like '生成日报' or '工作日报' may invoke the skill unintentionally. Because this skill reads session logs, saves a report, and sends content onward, accidental invocation can cause unauthorized processing and disclosure of user-derived data.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill explicitly directs direct reading of session JSONL logs and extraction of user messages, but provides no privacy warning or access-control requirement. Reading historical conversations from other agents is highly sensitive and can expose confidential user content outside the original interaction context.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill instructs the agent to save a compiled report to disk and send it to Feishu without any notice, consent, or data-classification guardrails. This creates a real risk of silently exfiltrating sensitive internal or personal content derived from user sessions to persistent storage and an external messaging destination.

Static analysis

No suspicious patterns detected.