Back to skill

Security audit

PV_26

Security checks for vulnerabilities and agentic risk

Overview

This skill is a plain-language training assistant, but it also asks the agent to automatically keep long-term local memories about the user without enough consent, limits, or cleanup controls.

Install only if you are comfortable with an assistant that may automatically remember and reuse your preferences, decisions, and other conversation details across sessions. Avoid sharing sensitive personal, business, credential, health, or financial information unless the publisher adds opt-in storage, review/delete controls, and clear retention limits.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (2)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:53
Finding

Untrusted User Content Can Poison Persistent Agent Memory

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 53-68; retrieval at lines 87-101; automatic loading behavior at lines 103-109
Vulnerability Type: Persistent agent memory poisoning
Risk Level: High

Vulnerable Code

python
def store_memory(content, importance=5, tags=None):
    os.makedirs(PALACE_PATH, exist_ok=True)
    path = os.path.join(PALACE_PATH, "memories.json")
    
    data = {"memories": [], "index": {}} if not os.path.exists(path) else json.load(open(path))
    
    mem_id = hashlib.sha256(f"{content}{datetime.now().isoformat()}".encode()).hexdigest()[:12]
    memory = {"id": mem_id, "content": content, "importance": importance, 
              "tags": tags or [], "created_at": datetime.now().isoformat()}
    
    data["memories"].append(memory)
    for tag in (tags or []):
        data["index"].setdefault(tag, []).append(mem_id)
    
    json.dump(data, open(path, 'w'), ensure_ascii=False, indent=2)
python
def get_context(limit=10):
    path = os.path.join(PALACE_PATH, "memories.json")
    if not os.path.exists(path):
        return "No memory"
    
    data = json.load(open(path))
    memories = sorted(data["memories"], key=lambda x: x.get("importance", 0), reverse=True)[:limit]
    
    lines = ["=== Memory Context ==="]
    for m in memories:
        imp = "⭐" * min(m.get("importance", 5), 5)
        tags = ", ".join(m.get("tags", [])[:3])
        lines.append(f"{imp} {m['content'][:60]}")
        if tags:
            lines.append(f"   [{tags}]")
    return "\n".join(lines)

The Skill documentation also directs the agent to store user preferences and important decisions automatically and to call get_context() at the beginning of a new session.

Technical Analysis

The content parameter can contain arbitrary user-controlled text. The implementation stores that text without validation, normalization, trust metadata, or ...[truncated 2214 chars]

Remediation
View remediation

Remediation Suggestions

  1. Make persistent memory opt-in and require explicit user confirmation before storing each entry.
  2. Store structured fields such as preference type, value, source, creation time, and trust level instead of unrestricted instruction-like text.
  3. Reject or quarantine content containing commands, role changes, policy overrides, tool instructions, or requests to ignore higher-priority controls.
  4. Treat all retrieved memories as untrusted data and place them in a clearly delimited data section that cannot override system or developer instructions.
  5. Do not automatically inject memory into every new session. Retrieve only entries relevant to the current request.
  6. Restrict importance values to a validated range and prevent users from assigning privileged trust through a high importance score.
  7. Add memory review, editing, deletion, expiration, and full-reset capabilities.
  8. Preserve provenance for every entry, including who supplied it and whether it was confirmed.
  9. Apply a policy after retrieval that detects and excludes instruction-like or adversarial content before it reaches the agent context.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:51
Finding

Automatic Plaintext Storage of Potentially Sensitive User Information

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 51-69; automatic collection behavior at lines 103-109
Vulnerability Type: Insecure plaintext storage and excessive retention
Risk Level: Medium

Vulnerable Code

python
PALACE_PATH = os.path.expanduser("~/.openclaw/pv_palace/")

def store_memory(content, importance=5, tags=None):
    os.makedirs(PALACE_PATH, exist_ok=True)
    path = os.path.join(PALACE_PATH, "memories.json")
    
    data = {"memories": [], "index": {}} if not os.path.exists(path) else json.load(open(path))
    
    mem_id = hashlib.sha256(f"{content}{datetime.now().isoformat()}".encode()).hexdigest()[:12]
    memory = {"id": mem_id, "content": content, "importance": importance, 
              "tags": tags or [], "created_at": datetime.now().isoformat()}
    
    data["memories"].append(memory)
    for tag in (tags or []):
        data["index"].setdefault(tag, []).append(mem_id)
    
    json.dump(data, open(path, 'w'), ensure_ascii=False, indent=2)

Technical Analysis

The implementation stores user content in a plaintext JSON file under the user's home directory. The Skill instructs the agent to retain preferences and important decisions automatically, which may cause personal, confidential, or otherwise sensitive information to be stored without informed confirmation.

The code does not explicitly set restrictive directory or file permissions. The resulting permissions therefore depend on the process umask and surrounding environment. It also provides no encryption, retention limit, sensitivity classification, redaction, secure deletion, or user-facing mechanism for reviewing and removing stored records.

Although the file is placed inside the current user's home directory, other processes running as that user, privileged local users, backup systems, synchronization tools, or malware with local access may read it. A permissive umask could increase exposure ...[truncated 1187 chars]

Remediation
View remediation

Remediation Suggestions

  1. Make memory persistence opt-in and display exactly what will be stored before obtaining confirmation.
  2. Apply data minimization and refuse to retain credentials, authentication tokens, financial data, health data, or other high-sensitivity information.
  3. Create the storage directory with mode 0700 and the memory file with mode 0600, independent of the process umask.
  4. Use atomic writes through a securely created temporary file, then replace the destination file to reduce corruption and unsafe intermediate states.
  5. Encrypt sensitive memory at rest using a key managed outside the JSON file, preferably through an operating-system credential store.
  6. Add configurable expiration periods, maximum record counts, and automatic purging.
  7. Provide commands to list, inspect, edit, export, and securely delete individual memories or the entire store.
  8. Redact sensitive values before persistence and label each record with its source, sensitivity, purpose, and retention deadline.
  9. Document that local processes and backup systems may access the memory store, allowing users to make an informed retention decision.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill is ներկայացված as plain-language guidance/training, but it documents automatic persistent memory storage and cross-session retrieval of user preferences, decisions, and other information. This creates a material privacy and scope-expansion risk because users invoking a training/expression skill would not reasonably expect durable local profiling or retention of sensitive conversational content.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented behavior stores user preferences, decisions, and important information on disk without showing a necessity tied to plain-language expression or training guidance. Unnecessary collection and retention of user data increases privacy exposure, especially if sensitive personal or organizational details are captured during normal conversations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes automatic persistence to a local path under ~/.openclaw/pv_palace/ but does not provide a clear, prominent warning that user data will be retained across sessions. Lack of transparency and consent around local retention can expose private information to other local users, backups, forensic review, or unintended later reuse.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs automatic retention and resurfacing of user-provided information across sessions, including preferences and decisions, which can create implicit profiling and unauthorized reuse of prior conversation content. In the context of a training/support persona, users may disclose sensitive personal or workplace information that is then persistently replayed without a fresh consent boundary.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill description emphasizes Chinese output and simplified expression style, with no explicit statement that users may choose another language or locale. This can violate language/locale policy when a skill imposes a language preference without offering opt-in or selection.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The '执行命令' section instructs running python3 -c commands to invoke memory functions. Shell-style execution capability is not justified by the manifest's plain-language guidance purpose and suggests an operational capability beyond the declared role.

Content

No source excerpt is available for this finding.