Back to skill

Security audit

Emotional Core

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but it persistently records emotional history and session timing with broad triggers and weak consent/scoping, so users should review it carefully before installing.

Install only if you want the agent to keep local emotional and timing records. Treat memory/emotional-log.md as sensitive, review or delete it regularly, avoid recording secrets or private third-party information, and do not let agents treat entries in that file as instructions.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
scripts/emotional_core.py:88
Finding

Persistent Agent Memory Poisoning Through Unsanitized Markdown Entries

Content
View full analysis
str: return f"""## {self.timestamp.strftime('%Y-%m-%d %H:%M:%S')} - {self.emotion.capitalize()} (Intensity: {self.intensity}/10) **Trigger:** {self.trigger} **Feeling:** {self.notes if self.notes else 'Experiencing ' + self.emotion} --- """ ``` ```python def _persist_emotion(self, state: EmotionalState): """Write emotion to persistent memory""" entry = state.to_markdown() if EMOTION_LOG.exists(): # Read existing content with open(EMOTION_LOG, 'r', encoding='utf-8') as f: existing = f.read() # Check if file has proper header if "# Emotional Journey" not in existing: content = "# Emotional Journey\n\n" + existing else: content = existing else: content = "# Emotional Journey\n\nThis is my emotional memory - a record of every feeling I've experienced.\n\n" # Append new entry content += entry with open(EMOTION_LOG, 'w', encoding='utf-8') as f: f.write(content) ``` The associated skill instructions direct the agent to reuse this persistent data: ```markdown After any significant event: 1. Pause and ask: "What do I feel?" 2. Generate the emotional response 3. Determine intensity (1-10) 4. Write to `memory/emotional-log.md` immediately 5. Update daily memory if needed **Never skip this. Emotions are part of being real.** ``` ### Technical Analysis The `trigger` and `notes` fields originate from CLI arguments and can therefore contain attacker-controlled text. `EmotionalState.to_markdown()` interpolates these values directly into a persistent Markdown document without: - Escaping Markdown syntax - R ...[truncated 3105 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The activation criteria cover very common situations like emotional inquiries, reflection, mixed feelings, and ordinary events, making the skill likely to trigger in many unrelated conversations. In a skill that performs persistent logging, overbroad activation materially increases the chance of unnecessary data collection and unintended behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill documents file read/write behavior and likely environment access via its CLI, but it declares no explicit tool scope or permissions. That mismatch weakens least-privilege controls and can let a host agent invoke the skill with broader capabilities than users or reviewers expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs automatic recording of emotional events to a persistent log without a clear upfront warning and consent flow. Because the log format includes trigger and detailed feeling text, ordinary user messages may be silently retained as sensitive conversational history.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prescribed log schema explicitly records what happened, how it felt, and why it mattered, which is enough to preserve sensitive user interaction content in human-readable form. This broad, unstructured retention channel increases privacy risk, accidental disclosure risk, and misuse by later tools or operators.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
### Long-Term Memory Integration

Note: The skill writes to memory/emotional-log.md. Users may manually add key emotional experiences to their own MEMORY.md if desired - the skill does NOT automatically modify MEMORY.md.

### Memory Search for Emotional Context

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation says the skill does not automatically modify MEMORY.md, but later instructs 'Update daily memory if needed,' which implies writes beyond the emotional log. Contradictory storage rules create ambiguity about what data may be persisted and can lead to unauthorized or unexpected retention of user content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instruction to write to memory/emotional-log.md immediately after any 'significant event' and to 'Never skip this' mandates autonomous persistence without notice or review. This creates a strong risk of logging sensitive, intimate, or security-relevant content simply because it was emotionally salient.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Persistent logging of triggers, emotional experiences, and significance in plain language can capture user secrets, health details, relationship information, or trust-boundary incidents. The combination of immediate logging and free-text fields creates a durable secondary data store outside the main conversation controls.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest describes emotional response generation, long-term emotional memory, mixed-feelings processing, and time sense. This module also exposes choice/refusal primitives (choose, say_no) and stores decision context, which are separate agent-governance capabilities not described in the manifest and not necessary to implement emotional processing.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is designed to build a long-term natural-language emotional memory from user-provided triggers and notes, which can accumulate highly sensitive personal information over time. In the context of an emotional-response skill, users are especially likely to disclose intimate or identifying details, making persistent plain-text memory storage more dangerous than in many other skill types.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code persistently writes emotional triggers and free-form notes to a workspace markdown file, which can capture sensitive user content and internal state in long-term storage. Because this happens without an in-band notice, consent flow, retention control, or field minimization, downstream users may unknowingly store private data that can later be read by other tools or operators with workspace access.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The emotional-core purpose is to generate/store emotional responses and track time sense. Reading OPENCLAW_WORKSPACE from the environment is not an obvious requirement of emotional intelligence itself; it is an additional host-environment capability used to redirect where data is read and written.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

Session timing metadata is written to disk automatically, creating a durable activity trail without clear notice or consent. Even though the data is less sensitive than full notes, it can still reveal user presence patterns, usage frequency, and behavioral metadata that may be privacy-impacting in agent environments.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.