T09 · Insecure Skill Coding Practices
- Location
scripts/imggen.py:103- Finding
Arbitrary Local File Exfiltration Through Image Reference Upload
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
scripts/imggen.py:103Arbitrary Local File Exfiltration Through Image Reference Upload
scripts/memory.py:64Persistent Prompt Injection Through Unsanitized Conversation Memory
scripts/diary.py:61Directory Traversal in Secret Diary Date Parameter
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
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")
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.
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:
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.