Back to skill

Security audit

Family Soul

Security checks for vulnerabilities and agentic risk

Overview

This skill handles private chat data in ways users should review carefully before installing or running it.

Install only after removing the bundled chat export, removing and rotating the exposed Kimi key, fixing the --file handling so only the selected chat is processed, and adding explicit consent/privacy review before uploading chats or installing generated SOUL.md/persona files into an agent.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (5)

T09 · Insecure Skill Coding Practices

Error
Location
pipeline/01_parse.py:177
Finding

User-selected input is ignored, causing unintended private-chat transmission

Content
View full analysis
bool: script_name, label = STAGES[stage_num] script_path = PIPELINE_DIR / script_name emit(f"STAGE:{stage_num}:START", label) env = os.environ.copy() env["SOUL_FORGE_SOURCE"] = str(source_file) env["SOUL_FORGE_OUTPUT"] = str(OUTPUT_DIR) env["PYTHONPATH"] = str(PIPELINE_DIR) cmd = [sys.executable, str(script_path)] if extra_args: cmd.extend(extra_args) result = subprocess.run(cmd, env=env, text=True) ``` `pipeline/01_parse.py:177-190`: ```python raw_dir = DATA_DIR / "raw" if not raw_dir.exists() or not any(raw_dir.iterdir()): print(f"\n⚠ 请将微信导出文件放入:{raw_dir}") print(" 然后在 pipeline/config.py 中设置正确的 EXPORT_FORMAT 和 SPEAKERS") sys.exit(1) if EXPORT_FORMAT not in PARSERS: print(f"✗ 未知格式:{EXPORT_FORMAT}") sys.exit(1) parser_fn, exts = PARSERS[EXPORT_FORMAT] files = [f for f in raw_dir.rglob("*") if f.suffix.lower() in exts] if not files: print(f"✗ 在 {raw_dir} 中未找到 {exts} 文件") sys.exit(1) ``` `pipeline/03_extract.py:41-57`: ```python def build_request(chunk: dict, prompt_template: str) -> dict: text = chunk["text"] chunk_id = chunk["chunk_id"] time_range = f"{chunk['start_time']} ~ {chunk['end_time']}" prompt = ( prompt_template .replace("{{CHAT_TEXT}}", text) .replace("{{CHUNK_ID}}", str(chunk_id)) .replace("{{TIME_RANGE}}", time_range) ) return { "custom_id": f"chunk-{chunk_id}", "params": { "model": EXTRACT_MODEL, "max_tokens": 4096, "messages": [{"role": "us ...[truncated 2428 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
pipeline/03_extract_kimi_openclaw.py:20
Finding

Hard-coded Kimi API credential in executable pipeline scripts

Content
View full analysis
Remediation
View remediation

T01 · Skill Instruction Hijacking

Error
Location
prompts/extract_patterns.md:5
Finding

Untrusted chat content can poison generated Agent system prompts

Content
View full analysis
{{CHAT_TEXT}} ``` `pipeline/03_extract.py:41-57`: ```python def build_request(chunk: dict, prompt_template: str) -> dict: text = chunk["text"] chunk_id = chunk["chunk_id"] time_range = f"{chunk['start_time']} ~ {chunk['end_time']}" prompt = ( prompt_template .replace("{{CHAT_TEXT}}", text) .replace("{{CHUNK_ID}}", str(chunk_id)) .replace("{{TIME_RANGE}}", time_range) ) return { "custom_id": f"chunk-{chunk_id}", "params": { "model": EXTRACT_MODEL, "max_tokens": 4096, "messages": [{"role": "user", "content": prompt}], }, } ``` `prompts/synthesize_persona.md:5-19`: ```markdown 这份文档将成为一个 AI agent 的完整 system prompt。当孩子离家后感到孤独或困惑时,他/她可以向这个 agent 倾诉,agent 要能让他/她感觉像是真的在和{{ROLE_DISPLAY}}说话。 --- ## 家庭集体人格(soul.md) {{SOUL_CONTENT}} --- ## 来自聊天记录的观察数据(关于{{ROLE_DISPLAY}}的部分) {{ROLE_OBSERVATIONS}} ``` `pipeline/04_synthesize.py:393-410`: ```python persona_prompt = ( persona_prompt_template .replace("{{ROLE_DISPLAY}}", info["display"]) .replace("{{SOUL_CONTENT}}", soul_content_for_persona) .replace("{{ROLE_OBSERVATIONS}}", role_obs_text) .replace("{{FAMILY_CONTEXT}}", family_ctx) ) persona_content = stream_synthesis( client, persona_prompt, f"persona_{role_key}.md({info['display']})" ) save_text(persona_content, OUTPUTS_DIR / f"persona_{role_key}.md") ``` ### Technical Analysis Chat messages are untrusted content because any participant, imported record, or modified export can contain i ...[truncated 2114 chars]
Remediation
View remediation

other

Error
Location
data/raw/群聊_修身,齐家,尝小烹@深圳.json:19046
Finding

Distribution of a real-looking chat export and stable participant identifiers

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned and incomplete third-party dependency specification

Content
View full analysis
=0.40.0 httpx>=0.25.0 ``` Undeclared dependency in `pipeline/01_parse.py:18`: ```python import chardet ``` Undeclared dependency in `pipeline/03_extract_kimi_openclaw.py:12`: ```python from openai import OpenAI ``` The README instructs users to install the requirement file directly: ```bash pip install -r ~/.openclaw/workspace/skills/soul-forge/requirements.txt ``` ### Technical Analysis Lower-bound-only constraints permit pip to install any future compatible release. The effective code executed by users may therefore differ from the version that was audited. This weakens reproducibility and allows future regressions or compromised upstream releases to enter installations without an explicit project change. In addition, executable modules import `chardet` and `openai`, but those packages are absent from `requirements.txt`. Users may respond to failures by installing arbitrary package versions manually, further weakening supply-chain controls. No typosquatted or known-malicious package name was identified in the supplied requirement file. The finding concerns unsafe version policy and incomplete declaration, not a confirmed malicious upstream dependency. ### Attack Path 1. A user follows the documented installation command. 2. Pip resolves the newest releases satisfying the broad lower bounds. 3. A future vulnerable or compromised release is selected without repository changes. 4. The package executes with the user's Python-process permissions when the pipeline imports it. 5. Alternatively, a missing-import error leads the user or automation to install an unreviewed package/version manually. ## ...[truncated 451 chars]
Remediation
View remediation
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 (70)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Requiring an ANTHROPIC_API_KEY strongly implies that exported chat content will be sent to an external AI provider, yet the README does not clearly disclose this data flow. Users may unknowingly transmit private family conversations, including sensitive personal or third-party information, to a remote service, creating serious confidentiality and compliance risks.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the skill does not generate per-member persona files as advertised, instead emits only a report-like artifact, and omits disclosure of external LLM transfer and hardcoded API key use, users cannot make an informed risk decision. The possibility of installing generated content as an agent SOUL.md further raises the impact because misleading or low-integrity output could directly modify downstream agent behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the skill does not generate per-member persona files as advertised, instead emits only a report-like artifact, and omits disclosure of external LLM transfer and hardcoded API key use, users cannot make an informed risk decision. The possibility of installing generated content as an agent SOUL.md further raises the impact because misleading or low-integrity output could directly modify downstream agent behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the skill does not generate per-member persona files as advertised, instead emits only a report-like artifact, and omits disclosure of external LLM transfer and hardcoded API key use, users cannot make an informed risk decision. The possibility of installing generated content as an agent SOUL.md further raises the impact because misleading or low-integrity output could directly modify downstream agent behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the skill does not generate per-member persona files as advertised, instead emits only a report-like artifact, and omits disclosure of external LLM transfer and hardcoded API key use, users cannot make an informed risk decision. The possibility of installing generated content as an agent SOUL.md further raises the impact because misleading or low-integrity output could directly modify downstream agent behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the skill does not generate per-member persona files as advertised, instead emits only a report-like artifact, and omits disclosure of external LLM transfer and hardcoded API key use, users cannot make an informed risk decision. The possibility of installing generated content as an agent SOUL.md further raises the impact because misleading or low-integrity output could directly modify downstream agent behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description does not clearly warn that private family chat logs will be transmitted to an external API for analysis. This is especially dangerous in this context because family conversations may contain highly sensitive personal data, and users may reasonably assume analysis is local unless told otherwise.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This JSON file is a raw family/group-chat export containing direct identifiers, relationship details, behavioral data, location context, health information, and externally resolvable links/URLs. In the context of a skill whose purpose is to derive persistent digital personas from private conversations, this materially increases privacy and profiling risk because sensitive personal data can be indexed, reused, and redistributed beyond the original chat context.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This code sends family chat content to Anthropic's external API for processing, which is highly sensitive personal data. In the context of a skill that analyzes private family conversations into personas, undisclosed third-party transfer materially changes the privacy and trust model and can expose intimate data to an external processor, retention policies, or account compromise.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script embeds a hardcoded Kimi API key and is explicitly configured to send conversation chunks to an external service. Because this skill processes family chat logs to derive personas, the transmitted data is highly sensitive, and the combination of bundled credentials plus off-device transmission creates a real risk of unauthorized data exposure and misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Falling back to a built-in API credential means anyone running or inspecting the code can reuse the secret, leading to credential theft, unauthorized API consumption, and loss of control over the external account. In a repository handling private family conversations, this also normalizes sending data through an undisclosed shared credential.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

A hard-coded API key is embedded directly in source code, which risks credential leakage through source sharing, logs, backups, or repository exposure. Anyone obtaining the code can potentially abuse the credential, incur cost, access provider-linked resources, or impersonate the application.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The hard-coded API credential is used silently, without any user-facing notice that the skill depends on a third-party account and external service. This undermines informed consent and compounds the risk of hidden data export and unauthorized consumption of paid API resources.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code loads family chat chunks and sends them to a third-party LLM service, which is highly sensitive personal data transfer. The skill description emphasizes chat-to-persona extraction but does not disclose outbound transmission, so users could reasonably expect local-only processing and unknowingly expose private family conversations.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code transmits raw conversation chunk text to an external API without explicit warning or consent, exposing intimate family communications to a third party. Given the skill’s purpose of analyzing household chats into digital personas, the exported data is especially sensitive and could reveal identities, relationships, routines, and private beliefs.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

A hardcoded API key in source code is a direct secret exposure: anyone with repository or distribution access can reuse the credential, incur charges, access associated services, or pivot into related systems. Because this script processes sensitive family chat data, compromise of the credential also increases the chance of unauthorized data access and uncontrolled third-party use.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code sends family group chat content to a third-party API for processing, which is highly sensitive personal data and directly expands exposure beyond the local environment. In this skill context, the input is explicitly intimate family conversations used to derive digital personas, so undisclosed external transmission creates substantial privacy, consent, and data-governance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script transmits raw conversation text to an external model API without any visible user warning, consent flow, or disclosure of data sharing. Since the content is family chat history used for persona extraction, the privacy sensitivity is unusually high and the absence of transparency materially increases the risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

A hard-coded API credential is embedded directly in source code, making it trivial to leak via repository access, logs, screenshots, package distribution, or downstream reuse. Exposed credentials can be abused to access the third-party service, incur cost, retrieve account-linked data, or impersonate legitimate usage.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script loads family/group-chat-derived observations and behavior summaries, then transmits them to a third-party LLM service for synthesis. Because the skill’s purpose involves highly sensitive interpersonal data, sending it off-device without clear disclosure or consent creates a substantial privacy and data-governance risk, especially if users expect local-only analysis.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script submits aggregated observations and per-speaker behavior summaries to an external API without any runtime warning, consent prompt, or privacy notice. Since the underlying data comes from family/group chats, this can expose intimate personal information, relationship dynamics, and behavioral profiling to a third party without informed user awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prompt explicitly processes real family chat logs to build a persistent 'digital persona' profile without any visible privacy notice, consent check, minimization guidance, or warning about handling highly sensitive personal data. Because the data involves family relationships, emotions, values, and quotations, the skill encourages inference and retention of intimate information that users may not realize is being systematized into long-lived profiles.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The prompt directs the model to extract and persist highly sensitive relational and psychological inferences from family chats, including emotional patterns, values, relationship dynamics, collective identity, and notable quotes. This creates a structured dossier that can amplify privacy harm, enable profiling or manipulation, and preserve sensitive context far beyond the original chat's casual, contextual use.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/run_forge.py (reported line 69)May include surrounding context.

python
emit(f"STAGE:{stage_num}:START", label)

    env = os.environ.copy()
    env["SOUL_FORGE_SOURCE"] = str(source_file)
    env["SOUL_FORGE_OUTPUT"] = str(OUTPUT_DIR)
    env["PYTHONPATH"] = str(PIPELINE_DIR)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README encourages processing family group chat exports to derive persistent persona files, but it provides no privacy warning, consent guidance, or data minimization advice for highly sensitive interpersonal content. Because the subject matter involves family communications and inferred personality traits, users may expose intimate data or create lasting profiles without understanding the privacy and ethical risks.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.