T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/generate_report.py:17- Finding
The workspace restriction is ignored, causing access to a hard-coded workspace
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This weekly-report skill is not clearly malicious, but it needs review because it reads local agent history and memory, can copy raw memory into reports, and ignores the documented workspace option.
Install only if you are comfortable with the skill reading local OpenClaw session history and memory files from the hard-coded paths. Review generated reports before sharing or saving them, and treat any --output file as potentially containing private conversation notes, tool data, or secrets.
scripts/generate_report.py:17The workspace restriction is ignored, causing access to a hard-coded workspace
scripts/generate_report.py:99Raw memory content is embedded in reports without redaction or explicit consent
The skill's stated behavior does not match its actual capabilities: it uses hard-coded paths, exposes file-writing via --output, and omits some promised reporting features. This mismatch is dangerous because users and orchestrators may grant trust based on the description while the implementation accesses different data or performs undeclared write actions.
The skill documentation advertises automatic reading of session logs and memory files and an optional output file, but it declares no tool scope or permissions boundaries. In an agent-skill context, undeclared read/write capability weakens least-privilege controls and can lead to unexpected access to sensitive local data or writing reports to unintended locations.
The manifest description says to use this skill when the user says phrases such as "周报", "生成周报", "工作周报", and "帮我写周报". Several of these are generic everyday requests rather than narrowly scoped invocations for this specific OpenClaw usage-report skill, which could cause unintended activation outside the intended reporting context.
The skill automatically reads session logs and memory files but does not warn users that potentially sensitive historical conversations and notes will be accessed. In this context, the absence of a privacy notice makes unintended data exposure more likely, especially since the data sources include agent sessions and memory records that may contain secrets or personal information.
The skill is explicitly designed to automatically read session logs and memory files, which are likely to contain sensitive prompts, tool outputs, notes, and usage metadata, yet the code provides no consent flow, disclosure, or minimization controls. In the context of an agent skill, this increases the risk of silently aggregating private user data into a report the user may not realize includes historical content.
The module docstring and all user-facing report text indicate the skill is designed to generate a weekly report in Chinese, with no option for the user to select another language or locale. This is a natural-language policy concern because the file hardcodes a specific language rather than offering choice or documenting a justified region-specific constraint.
The script hard-codes both AGENT_ID/session paths and the workspace path, while also exposing a --workspace argument that is never actually used by the memory-reading logic. This can cause the report to read and summarize data from the wrong user's or wrong workspace's files, creating an unintended privacy boundary violation and misleading output.
When --output is used, the script writes a report containing summarized session statistics and up to 2000 characters of memory content directly to disk without warning. This creates an additional persistence point for potentially sensitive information, increasing exposure if the file is stored in a shared directory, committed, backed up, or accessed by other local users/processes.
The skill's natural-language description and usage guidance are entirely in Chinese and describe outputting a weekly report in that context, but there is no indication that users can choose another language. Under the stated policy, forcing a specific language without opt-in is a locale-policy issue unless the constraint is explicitly documented and justified.