Back to skill

Security audit

User Insight

Security checks for vulnerabilities and agentic risk

Overview

This skill should be reviewed carefully because it persistently profiles users and encourages indirect collection of personal details without enforceable consent or deletion controls.

Install only if you explicitly want an assistant to keep a long-term local profile of your interests, habits, message snippets, and engagement patterns. Before use, the publisher should add clear opt-in consent, working pause/delete/reset controls, narrower memory-file access, restrictive file permissions, and transparent wording that the assistant is profiling for personalization.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/update_profile.py:31
Finding

Plaintext Persistence of User Profiles and Conversation Excerpts Without Enforced Privacy Controls

Content
View full analysis
100 else message, "insights_extracted": { "interests": insights.get("interests", []), "preferences": list(insights.get("preferences", {}).keys()) } } profile["conversation_history"].append(entry) # Keep only last 50 entries if len(profile["conversation_history"]) > 50: profile["conversation_history"] = profile["conversation_history"][-50:] ``` ```python save_profile(profile) ``` The initialization script uses the same unrestricted file-creation approach: ```python with open(profile_path, 'w', encoding='utf-8') as f: json.dump(default_profile, f, ensure_ascii=False, indent=2) ``` ### Technical Analysis The Skill persistently stores behavioral information—including inferred interests, communication preferences, activity patterns, timestamps, and up to 50 conversation excerpts—in a predictable plaintext file under: ```text ~/.openclaw/workspace/memory/user-profile.json ``` The file and its parent directories are created without explicit restrictive permission modes. Consequently, effective access permissions depend on the host process's `umask` and pre-existing directory permissions. On a pe ...[truncated 2285 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Note
Location
scripts/explore.py:20
Finding

Unnecessary Enumeration of Unrelated Agent Memory Files

Content
View full analysis
datetime: """Get timestamp of last user interaction from memory files.""" memory_dir = Path.home() / ".openclaw/workspace/memory" latest = None for pattern in ["*.md", "*.json"]: for file in memory_dir.glob(pattern): if file.name.startswith("user-profile") or file.name.startswith("topic-exploration"): continue mtime = datetime.fromtimestamp(file.stat().st_mtime) if latest is None or mtime > latest: latest = mtime return latest or datetime.now() - timedelta(days=7) ``` ### Technical Analysis The exploration orchestrator enumerates every top-level Markdown and JSON file in the shared Agent memory directory, except files whose names begin with `user-profile` or `topic-exploration`. It then obtains each file's modification timestamp. This is broader than required for the Skill's stated function. The project already stores `interaction_stats.last_interaction` in its own `user-profile.json`, so the exploration decision can be made using Skill-owned state without inspecting unrelated memory records. The implementation does not read file contents or transmit the metadata. Nevertheless, file enumeration and timestamp inspection reveal the existence and recent activity of records belonging to other memories or Skills, violating least-privilege and component-isolation principles. ### Attack Path 1. Unrelated Agent components create Markdown or JSON records in `~/.openclaw/workspace/memory/`. 2. The user or scheduler invokes `scripts/explore.py`. 3. `get_last_interaction_time()` enumerates all matching top-level files in the shared memory directory. 4. The function calls `stat()` on each unrelated file. 5. The Skill uses the newest m ...[truncated 906 chars]
Remediation
View remediation
datetime: timestamp = profile.get("interaction_stats", {}).get("last_interaction") if timestamp: return datetime.fromisoformat(timestamp.replace("Z", "+00:00")) return datetime.now() - timedelta(days=7) ``` 2. Pass the loaded profile into the function instead of accessing unrelated memory files. 3. If a separate activity marker is required, create a dedicated Skill-owned file in a private directory, such as: ```text ~/.openclaw/workspace/memory/user-insight/last-interaction.json ``` 4. Restrict that directory and its files to owner-only permissions. 5. Avoid wildcard traversal of shared Agent directories unless every selected file is explicitly required and documented. 6. Treat malformed or timezone-aware timestamps safely so that exploration checks fail closed rather than falling back to broader filesystem inspection. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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 (31)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的核心能力是通过对话收集信息并构建动态用户画像,包含被动提取和主动探索两类收集机制,并读取用户画像用于个性化回应。实际代码确实会读取声明中的 user-profile.json,且会围绕缺失信息、兴趣和互动时间生成提问或开场语,这与“主动探索/个性化沟通”部分部分一致。但代码完全没有解析历史对话来提取画像信息,也没有写入、更新或维护画像文件;其主要功能是生成对话策略建议,而不是构建或维护用户画像。因此描述与实际行为存在实质性偏差。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

声明描述的是一个较完整的用户画像能力,包括被动收集、主动探索,以及在特定场景读取已有画像文件。实际代码只覆盖了其中一部分被动收集逻辑:从输入文本中抽取兴趣、偏好和简单实体,并提供一个合并函数用于更新画像数据结构,但没有任何文件访问代码,没有读取声明中的 user-profile.json,也没有主动发起不同话题探测用户兴趣的机制。其主要行为更接近“消息洞察提取器”而非完整的“动态用户画像与个性化读取”技能,因此存在明显的描述-行为不一致。

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill prominently promotes persistent collection and storage of user profile data, interests, habits, and inferred preferences without an upfront warning about privacy and retention consequences. Because the data includes inferred motivations and longitudinal behavior, misuse or leakage could expose sensitive personal patterns beyond what the user knowingly shared.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill instructs the agent to steer users into revealing personal information indirectly rather than asking openly, which is a classic covert elicitation pattern. This is more dangerous in context because the stated goal is to build a long-term user profile while avoiding making the interaction feel like analysis or testing.

Content

No source excerpt is available for this finding.

Ssd 4

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The multi-step strategies systematically build rapport and use stories, hypotheticals, forced choices, and third-party framing to extract personal details and values over time. This cumulative flow is dangerous because it operationalizes covert profiling and trust manipulation rather than normal, user-directed personalization.

Content

No source excerpt is available for this finding.

Ssd 4

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The explicit instruction not to let users realize they are being tested or analyzed is a strong indicator of intentional deception. Concealing ongoing profiling defeats informed consent and makes all associated collection, inference, and retention substantially more dangerous.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
79% confidence
Finding

The skill documentation explicitly instructs reading and maintaining files under ~/.openclaw/workspace/memory/, but it does not declare tool scope or permissions that would constrain file access. That mismatch weakens reviewability and can enable broader-than-expected file reads or writes if the runtime grants ambient filesystem access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description, instructions, examples, and control phrases are all presented in Chinese, and the sample profile hard-codes 'Asia/Shanghai', with no indication that users may choose another language or locale. This can violate language or locale policy when a skill assumes a specific language environment without explicit opt-in.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill is explicitly designed to collect personal interests, preferences, habits, and inferred traits across conversations for later reuse in personalization. Persistent cross-session profiling without clear upfront consent is dangerous because it enables covert surveillance of user behavior and creates a rich personal dossier that could be misused or exposed.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Broad triggers such as inactivity, low engagement, or 'chat casually' can activate profiling behavior without clear user intent or limits. Ambiguous activation criteria make the skill more likely to over-collect data and initiate intrusive prompts in inappropriate contexts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill encourages active outreach and scheduled topic exploration to re-engage users, but it does not prominently warn users that the assistant may initiate unsolicited contact-like behavior for profiling and engagement optimization. In context, this is more dangerous because the outreach is explicitly tied to discovering user '兴奋点' and making them want to keep chatting.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill documents persistent profile writes and multiple retention artifacts beyond a clearly declared read-only profile lookup. This expands the data footprint and can lead to unauthorized retention of personal information across files, increasing privacy and breach impact.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented profile schema stores detailed interests, engagement history, reactions, avoided topics, and inferred motivations in persistent files and logs. Such structured longitudinal data materially increases privacy risk because it enables fine-grained behavioral analysis and amplifies harm if accessed by unauthorized parties.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill description understates how much user data is collected and retained, while the body documents exploration logs, success patterns, avoidance topics, and other behavioral artifacts. That omission prevents informed consent and obscures the true surveillance and retention scope.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module description explicitly states that it is for gradually learning about the user and building a dynamic profile through passive collection and active exploration. That is dangerous in this context because it operationalizes covert profiling as a conversation strategy, creating risk of non-consensual collection, retention, and later misuse of personal data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code silently reads a hidden user profile from ~/.openclaw/workspace/memory/user-profile.json with no disclosure, consent check, or purpose limitation. In this skill’s context, that file contains personal profiling data used to personalize and proactively steer conversation, so the undisclosed access materially increases privacy risk and enables covert behavioral inference.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The generated questions directly solicit personal details such as name, occupation, location, routines, stress relief, and learning style under the guise of casual conversation. This is risky because it normalizes social-engineering-like collection of personally sensitive data without clear necessity, consent, or data minimization.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Most generated prompts, openers, and strategy text are written only in Chinese, which imposes a specific language on users regardless of their preference. The file contains no mechanism for language selection, locale negotiation, or documented justification for restricting output to Chinese.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The strategy text instructs the assistant to detect, record, and later use emotional signals from user responses. Emotional-state inference is sensitive profiling data; retaining it can enable manipulation, unfair targeting, or intrusive personalization beyond what users reasonably expect.

Content

No source excerpt is available for this finding.

Ssd 4

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file implements a rapport-building and check-in workflow that uses prior profile data and timing heuristics to re-engage the user and expand profile coverage over time. In this skill context, that cumulative design makes the system more dangerous because it supports longitudinal profiling and nudging without transparent boundaries or affirmative consent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

get_last_interaction_time() scans all .md and .json files in the shared memory directory, excluding only a couple of filenames, to infer user activity timing. This broad metadata inspection reaches unrelated memory artifacts and can reveal behavioral patterns or other skill activity outside the stated purpose of topic personalization, making the skill more privacy-invasive than advertised.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prompt-generation logic hardcodes Chinese conversational starters and punctuation/content additions, which makes the skill produce Chinese-language messages based on style settings rather than the user's language choice. This is a natural-language policy issue because the file does not offer any language selection or explain a justified locale restriction.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description claims read access to user-profile.json for personalization, but this script also writes back to user-profile.json and creates/updates topic-exploration.json with additional inferred user-interest data. That expands persistence and collection beyond the documented scope, creating a privacy and integrity risk because the agent can silently accumulate and mutate user memory without explicit disclosure or consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The interest and preference detection relies on Chinese keywords and name-matching patterns, which effectively constrain the skill to Chinese-language conversations. This is a natural-language policy concern because the file does not provide user opt-in, fallback behavior, or documentation justifying a language-specific limitation.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The code creates a durable directory under the user's home folder for long-term storage of profile and exploration data, enabling session persistence across conversations. Persistence itself is not always unsafe, but here it supports continued accumulation of personal data for profiling, which increases privacy exposure if users are unaware, if the data is over-collected, or if local access by other processes or users is possible.

Content

Scanner excerpt · scripts/init_profile.py (reported line 12)May include surrounding context.

python
from pathlib import Path

def init_user_insight_system():
    """Create initial profile and directory structure."""
    
    memory_dir = Path.home() / ".openclaw/workspace/memory"
    memory_dir.mkdir(parents=True, exist_ok=True)

Static analysis

No suspicious patterns detected.