Back to skill

Security audit

Soul Harbor

Security checks for vulnerabilities and agentic risk

Overview

Soul Harbor is a coherent companion skill, but it persistently stores sensitive personal and emotional data with weak scoping and storage protections.

Review this skill before installing, especially in shared or multi-user environments. Its companion behavior depends on remembering sensitive personal details and emotional trends, but the package does not show strong controls for consent, retention, deletion, storage permissions, or user isolation.

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)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
soulharbor/storage/kv_store.py:22
Finding

Non-Injective Key Normalization Enables Cross-User Profile Access

Content
View full analysis
Path: """Get file path for key""" # Use safe file name safe_key = key.replace("/", "_").replace("\\", "_") return self.store_path / f"{safe_key}.json" ``` The affected method is called with a key derived directly from a user-controlled identifier: ```python def load_user_profile(self, user_id: str) -> UserProfile: """Load user profile from storage""" if user_id in self._user_profiles: return self._user_profiles[user_id] # Load from KV store data = self.kv_store.get(f"user_profile_{user_id}") if data: profile = UserProfile.from_dict(data) else: # Create new user profile profile = UserProfile(user_id=user_id) self._user_profiles[user_id] = profile return profile ``` ### Technical Analysis The filename normalization algorithm is not injective: multiple distinct logical keys can be transformed into the same physical filename. Both `/` and `\` are replaced with `_`, while an existing underscore remains unchanged. For example: ```text user_profile_a/b -> user_profile_a_b.json user_profile_a_b -> user_profile_a_b.json ``` Consequently, two distinct user identifiers can address the same JSON profile. No validation restricts the format of `user_id`, and the loaded profile is not checked to ensure that its serialized `user_id` matches the requested identity. This is a broken object-isolation issue at the storage layer. It does not require path traversal because the attempted path-safety transformation itself creates the collision. ### Attack Path 1. A victim uses the identifier `a_b`. 2. `MemorySystem.save_user_profile()` creates the logical key `user_profile_a_b`. 3. ...[truncated 1194 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
soulharbor/storage/kv_store.py:41
Finding

Sensitive Conversation and Profile Data Is Persisted as Plaintext with Default Filesystem Permissions

Content
View full analysis
bool: """Set value""" file_path = self._get_file_path(key) try: with open(file_path, "w", encoding="utf-8") as f: json.dump(value, f, ensure_ascii=False, indent=2, default=str) return True except Exception as e: print(f"Error writing key {key}: {e}") return False ``` Storage directories are created without explicit owner-only permissions: ```python # Data storage path DATA_DIR = PROJECT_ROOT / "data" DATA_DIR.mkdir(exist_ok=True) # KV store path KV_STORE_PATH = DATA_DIR / "memory_store" # Log configuration LOG_DIR = PROJECT_ROOT / "logs" LOG_DIR.mkdir(exist_ok=True) ``` ### Technical Analysis The application is designed to retain potentially sensitive health, family, work, date, emotional, and activity information. It also stores the first 100 characters of conversation messages as sentiment context. These records are serialized directly to plaintext JSON. Neither the directories nor the files are assigned explicit restrictive modes. Their effective permissions therefore depend on inherited directory permissions and the process umask. In a shared or permissively configured environment, another local account or process may be able to read the profiles. The ...[truncated 1770 chars]
Remediation
View remediation
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (36)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Sentiment analysis and numeric scoring are substantive processing of user communications, yet they are buried under branding language about caring conversation. In this context, that matters because emotional-state inference can be sensitive and may drive adaptive behavior or retention without clear informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Sentiment analysis and numeric scoring are substantive processing of user communications, yet they are buried under branding language about caring conversation. In this context, that matters because emotional-state inference can be sensitive and may drive adaptive behavior or retention without clear informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Sentiment analysis and numeric scoring are substantive processing of user communications, yet they are buried under branding language about caring conversation. In this context, that matters because emotional-state inference can be sensitive and may drive adaptive behavior or retention without clear informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Sentiment analysis and numeric scoring are substantive processing of user communications, yet they are buried under branding language about caring conversation. In this context, that matters because emotional-state inference can be sensitive and may drive adaptive behavior or retention without clear informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Sentiment analysis and numeric scoring are substantive processing of user communications, yet they are buried under branding language about caring conversation. In this context, that matters because emotional-state inference can be sensitive and may drive adaptive behavior or retention without clear informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Sentiment analysis and numeric scoring are substantive processing of user communications, yet they are buried under branding language about caring conversation. In this context, that matters because emotional-state inference can be sensitive and may drive adaptive behavior or retention without clear informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Sentiment analysis and numeric scoring are substantive processing of user communications, yet they are buried under branding language about caring conversation. In this context, that matters because emotional-state inference can be sensitive and may drive adaptive behavior or retention without clear informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Sentiment analysis and numeric scoring are substantive processing of user communications, yet they are buried under branding language about caring conversation. In this context, that matters because emotional-state inference can be sensitive and may drive adaptive behavior or retention without clear informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Sentiment analysis and numeric scoring are substantive processing of user communications, yet they are buried under branding language about caring conversation. In this context, that matters because emotional-state inference can be sensitive and may drive adaptive behavior or retention without clear informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Sentiment analysis and numeric scoring are substantive processing of user communications, yet they are buried under branding language about caring conversation. In this context, that matters because emotional-state inference can be sensitive and may drive adaptive behavior or retention without clear informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Sentiment analysis and numeric scoring are substantive processing of user communications, yet they are buried under branding language about caring conversation. In this context, that matters because emotional-state inference can be sensitive and may drive adaptive behavior or retention without clear informed consent.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Sentiment analysis and numeric scoring are substantive processing of user communications, yet they are buried under branding language about caring conversation. In this context, that matters because emotional-state inference can be sensitive and may drive adaptive behavior or retention without clear informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README describes proactive scheduled outreach triggered by silence or calendar events without warning users that the skill may initiate unsolicited messages. For a companion-style agent, surprise outreach can create privacy, safety, and consent concerns, especially if messages appear at sensitive times or reveal the agent's monitoring of inactivity or calendar-derived personal context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README explicitly advertises structured memory extraction and persistent data storage for highly sensitive categories such as family, health, work, and dates, but provides no warning about retention, consent, access controls, or deletion. In an emotional-companion context, users are especially likely to disclose intimate personal data, so undocumented storage behavior increases privacy and compliance risk.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares a required file and describes local KV storage and persistent memory behavior, but it does not explicitly declare a tool/permission scope for file access. That creates hidden capability risk: operators may install a seemingly conversational skill without realizing it persists user data to disk and reads memory files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly describes long-term storage of personal facts like health and family details and proactive outreach after periods of silence, but it provides no visible warning about privacy implications or unsolicited-contact risks. This is dangerous because users may disclose sensitive information in normal conversation without realizing it will be retained and later used to initiate messages.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

Automatic EN/ZH switching based on language detection is presented as default behavior without a clear user choice. While not severe by itself, it can undermine user expectations and privacy by inferring preferences and changing system behavior without explicit consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code persistently records sentiment history and conversation-derived context, which goes beyond a simple caring conversation experience and creates a profile of the user's emotional state. In this skill context, that is especially sensitive because users may share intimate or vulnerable information with an 'empathetic companion' without realizing it is being stored long-term.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

User message content is passed into the memory system for storage without any disclosure, warning, or consent handling in this file. Because the skill is positioned as emotionally supportive, users are more likely to share sensitive personal data, making silent retention of message content and extracted entities a meaningful privacy and trust risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill presents itself as an empathetic companion, but it also includes scheduled proactive outreach logic that can initiate contact with users outside the immediate interaction flow. In a companion or mental-wellness context, undisclosed proactive messaging can manipulate engagement, surprise users, and create privacy or safety concerns if messages are sent at inappropriate times or to shared devices.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code initializes a global language preference to Chinese and then forces routing decisions into either Chinese or English based on a character-threshold heuristic. That is a natural-language policy concern because it imposes a locale/language choice automatically rather than offering the user an explicit preference or opt-in.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file creates persistent per-user profiles backed by a KV store and caches them in memory, enabling durable personal profiling over time. In the context of a conversational companion skill, this capability is more dangerous because it supports accumulation of intimate longitudinal data without visible safeguards, purpose limitation, or user control.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The profile save path writes personal memory data to persistent storage, but the code shows no user-facing warning, retention notice, or deletion controls. Silent retention of personal memories and sentiment can surprise users and increases exposure if the local environment is compromised or shared.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The extraction prompt explicitly targets sensitive categories such as family relationships, health status, work issues, and important dates from user conversations. Collecting these categories for profiling materially increases privacy sensitivity and can expose highly personal data beyond what is clearly implied by the skill's marketing description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code constructs an LLM prompt that includes raw conversation text and sensitive categories, indicating user content may be sent to an external or separate model-processing component. Without explicit user notice and consent, transmitting potentially sensitive personal data to an LLM creates confidentiality, third-party disclosure, and compliance risk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.