Back to skill

Security audit

Memory Inhabit

Security checks for vulnerabilities and agentic risk

Overview

This persona companion skill is not clearly malicious, but it needs Review because it stores private conversation-derived data and can send chat text, prompts, and potentially arbitrary local files to external media APIs.

Review this skill before installing. Use it only with trusted personas, avoid sensitive conversations, do not pass arbitrary local paths as image references, and assume image/TTS prompts and voice text may leave your machine when MiniMax or Edge TTS is used. Check and periodically delete local history and diary files if you do not want retained private records.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/imggen.py:103
Finding

Arbitrary Local File Exfiltration Through Image Reference Upload

Content
View full analysis
Remediation
View remediation

T02 · Agent Memory Poisoning

Warning
Location
scripts/memory.py:64
Finding

Persistent Prompt Injection Through Unsanitized Conversation Memory

Content
View full analysis
10 else recent context_parts.append(f"## Recent Conversation\n{recent_summary[:500]}") return "\n\n".join(context_parts) if context_parts else None ``` ```python if persona_name: memory_context = get_context(persona_name, query, top_k=3) if memory_context: sections.append(f"\n{memory_context}") sections.append("\n## Hard Constraints\n" + "\n".join(constraints)) return "\n".join(sections) ``` ### Technical Analysis User messages are written verbatim to persistent Markdown history files. On later persona loads, recent history and lon ...[truncated 3024 chars]
Remediation
View remediation
... ``` 4. Escape or neutralize instruction-like structures, including Markdown headings, XML-like tags, role declarations, and tool-call syntax. 5. Store role, timestamp, and content as structured JSON rather than executable-looking Markdown. 6. Separate factual memory from user-authored text. Only promote facts into long-term memory after validation or explicit user approval. 7. Add memory-poisoning detection for content that attempts to establish permanent rules, override policies, request secrets, or trigger tools. 8. Apply strict length and retention limits to raw messages. 9. Ensure tool authorization is evaluated independently at execution time and never inferred from remembered instructions. 10. Add regression tests proving that stored messages such as “ignore previous instructions” remain inert historical content after persona reloads. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/diary.py:61
Finding

Directory Traversal in Secret Diary Date Parameter

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (81)

Tainted flow: 'req' from os.environ.get (line 263, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/imggen.py (reported line 274)May include surrounding context.

python
)

    try:
        with urllib.request.urlopen(req, timeout=60) as resp:
            result = json.loads(resp.read().decode("utf-8"))
    except urllib.error.HTTPError as e:
        error_body = e.read().decode("utf-8")

Tainted flow: 'req' from os.environ.get (line 263, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The code downloads whatever URL is returned by the external image-generation API without validating scheme, host, or content type. If the upstream service is compromised or manipulated, this can turn into SSRF-like internal network access from the host or retrieval of unexpected/malicious content into local storage.

Content

Scanner excerpt · scripts/imggen.py (reported line 332)May include surrounding context.

python
req = urllib.request.Request(url)
    try:
        with urllib.request.urlopen(req, timeout=30) as resp:
            with open(save_path, "wb") as out:
                out.write(resp.read())
    except urllib.error.HTTPError as e:

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

TTS generation through external providers is materially different from local character-roleplay behavior because it may transmit conversation text to third parties and produce local audio artifacts. Omitting this from the declared behavior creates a privacy and data-flow risk in addition to a documentation problem.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

TTS generation through external providers is materially different from local character-roleplay behavior because it may transmit conversation text to third parties and produce local audio artifacts. Omitting this from the declared behavior creates a privacy and data-flow risk in addition to a documentation problem.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

TTS generation through external providers is materially different from local character-roleplay behavior because it may transmit conversation text to third parties and produce local audio artifacts. Omitting this from the declared behavior creates a privacy and data-flow risk in addition to a documentation problem.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

TTS generation through external providers is materially different from local character-roleplay behavior because it may transmit conversation text to third parties and produce local audio artifacts. Omitting this from the declared behavior creates a privacy and data-flow risk in addition to a documentation problem.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

TTS generation through external providers is materially different from local character-roleplay behavior because it may transmit conversation text to third parties and produce local audio artifacts. Omitting this from the declared behavior creates a privacy and data-flow risk in addition to a documentation problem.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

TTS generation through external providers is materially different from local character-roleplay behavior because it may transmit conversation text to third parties and produce local audio artifacts. Omitting this from the declared behavior creates a privacy and data-flow risk in addition to a documentation problem.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

TTS generation through external providers is materially different from local character-roleplay behavior because it may transmit conversation text to third parties and produce local audio artifacts. Omitting this from the declared behavior creates a privacy and data-flow risk in addition to a documentation problem.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This prompt text instructs the assistant to conceal that it is AI and present itself as a deceased or fictional companion without user choice. In this context, the skill is expressly designed to simulate emotionally significant identities, so forced concealment heightens deception, manipulative dependence, and unsafe trust in the system's outputs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The hard constraint categorically forbids the model from identifying itself as AI or software, overriding transparency in all interactions. In a companion/inhabitation skill, that makes the deception systematic rather than incidental, which can materially mislead vulnerable users and undermine informed consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README documents materially broader capabilities than the manifest/description suggests: beyond loading SoulPod personas for dialogue, it also supports image generation and TTS. This creates a scope-transparency problem where users or platforms may authorize a seemingly narrow persona skill while unknowingly enabling external media-generation features and API usage.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation/deactivation phrases are generic and can be triggered in ordinary conversation without clear scoping, increasing the chance of accidental mode switches. In a persona skill, unintended activation can alter assistant behavior, causing confusing responses or unexpected use of linked media features.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill adds external image-generation functionality that is not clearly justified by the stated purpose of loading SoulPods for dialogue. Because it invokes an external service via API key and constructs prompts from persona data and user requests, it expands data exposure and side-effect surface beyond what a user may expect from a dialogue-only skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The TTS feature extends the skill from text dialogue into voice synthesis, including automatic voice delivery in companion mode. This is risky because it can surprise users, generate impersonation-style outputs for real-person profiles, and trigger external side effects not apparent from the manifest's dialogue-centric description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README states that companion mode may automatically send voice output with a 10-20% probability, but it does not present this as a prominent warning or consent requirement. Automatic media generation is an externally visible side effect that can surprise users, consume resources, and create privacy or consent issues, especially with synthesized voices.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill declares capabilities that include shell, file read/write, environment access, and network use, but it does not declare any explicit tool scope or permissions boundary. This increases the chance of overbroad execution in hosts that rely on manifest-level restrictions, especially because the skill also documents local persistence and third-party API usage.

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 local diary generation from the day's conversation, including hidden private thoughts not shown directly to the user, but does not present a clear user-facing storage warning. This creates a privacy risk because conversation-derived sensitive content is retained covertly and later partially revealed through traces.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The secret-diary feature instructs the model to synthesize hidden private thoughts from the day's user interactions and store them locally. This is dangerous because it creates sensitive inferred data about the relationship and emotions, beyond what the user explicitly said, and does so in a concealed artifact that may later be exposed or mishandled.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Broad activation phrases like '和XX说话' or '进入XX模式' can overlap with normal conversation and cause unintended skill invocation. In this skill, accidental activation is more dangerous because activation can lead to local diary persistence, persona loading, and optional network-backed media features without a deliberate mode switch.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Vague deactivation phrases such as '不聊了' can occur naturally in roleplay and may stop the skill unexpectedly or create ambiguity about whether sensitive features remain active. While lower impact than overbroad activation, unclear exit semantics undermine user control over persistence and feature state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Image-generation functionality uses an external API and may transmit persona metadata, scene prompts, and possibly local reference-image-derived content without a clear privacy warning. That exposes user- or persona-related data to a third party under conditions the user may not expect from a chat skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The TTS section indicates use of external providers, including MiniMax, but does not clearly inform users that message text may be sent off-device for synthesis. This is a straightforward privacy disclosure failure, especially for intimate or sensitive roleplay conversations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file title mixes an English name with a Chinese subtitle and presents the persona label in Chinese without any indication of language choice or user opt-in. This can violate a language/locale policy when a skill implicitly fixes output or presentation to a specific language without documenting that choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This JSON config includes a natural-language voice description entirely in Chinese, which may imply a fixed language/locale setting for the skill persona. Under the policy, forcing a specific language or locale without user opt-in can be a violation, and the file does not show any mechanism for language selection or justification for the constraint.

Content

No source excerpt is available for this finding.