Back to skill

Security audit

纪念.skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is openly aimed at memorial creation, but it uses unusually broad access to private WeChat data and voice cloning without enough scoping, cleanup, or consent controls.

Install only if you are comfortable granting the skill access to private chat databases, family group metadata, voice messages, photos, and cloned voice models. Prefer manually exported, narrowed data; get consent where possible from living subjects and affected participants; avoid deceptive voice use; and delete any decrypted WeChat work directories after extraction. Use a separate environment or container and review generated memorial skills before enabling them.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
tools/skill_writer.py:43
Finding

Unvalidated memorial slug permits filesystem path traversal

Content
View full analysis
str: return os.path.join(MEMORIALS_DIR, slug) def ensure_dirs(slug: str) -> None: base = memorial_dir(slug) for subdir in ["versions", "materials"]: os.makedirs(os.path.join(base, subdir), exist_ok=True) ``` The command-line interface accepts the value without validation: ```python parser.add_argument("--slug", help="目录 slug(自动生成或手动指定)") ... if args.action == "create": if not args.name: parser.error("--action create 需要 --name 参数") action_create(args.name, args.slug) elif args.action == "combine": if not args.slug: parser.error("--action combine 需要 --slug 参数") action_combine(args.slug) elif args.action == "update": if not args.slug: parser.error("--action update 需要 --slug 参数") action_update(args.slug, args.source or "") ``` The same unsafe construction is used by version management: ```python def memorial_dir(slug: str) -> str: return os.path.join(MEMORIALS_DIR, slug) def versions_dir(slug: str) -> str: return os.path.join(memorial_dir(slug), "versions") ``` ### Technical Analysis The user-controlled `slug` is concatenated with `MEMORIALS_DIR` using `os.path.join()` without validating its characters or verifying that the resolved path remains inside the memorial directory. `os.path.join()` does not provide path confinement. A value containing parent-directory components, such as `../../target`, resolves outside `memorials/`. An absolute path can also discard the intended base directory on supported platforms. Multiple write-capable operations inherit this weakness: - Archive creation writes `meta.j ...[truncated 2065 chars]
Remediation
View remediation
str: if not SLUG_RE.fullmatch(slug): raise ValueError("Invalid memorial slug") return slug ``` 2. Resolve and verify every derived path: ```python from pathlib import Path MEMORIALS_ROOT = Path(MEMORIALS_DIR).resolve() def memorial_dir(slug: str) -> Path: validate_slug(slug) candidate = (MEMORIALS_ROOT / slug).resolve() if not candidate.is_relative_to(MEMORIALS_ROOT): raise ValueError("Memorial path escapes the archive root") return candidate ``` 3. Use the same shared validator in `skill_writer.py`, `version_manager.py`, `voice_trainer.py`, and `voice_synthesizer.py`. 4. Before recursive deletion, verify containment again and reject symlinked archive or version directories. 5. Use atomic file creation where overwriting is not required. 6. Add negative tests for: - `../` - `../../target` - Absolute paths - Windows drive and UNC paths - Encoded or mixed path separators - Symlink-based escapes ]]>

T09 · Insecure Skill Coding Practices

Error
Location
tools/wechat_voice_extractor.py:43
Finding

Decrypted WeChat databases are broadly collected and retained in plaintext

Content
View full analysis
Optional[dict]: """获取运行中的微信信息(密钥、数据目录)。""" try: from pywxdump import get_wx_info results = get_wx_info() if not results: return None # 取第一个有效结果 for info in results: if info.get("key") and info["key"] != "None": return info # key 为空但有 wx_dir 的也返回(可能需要 patch) return results[0] if results else None except ImportError: print("[x] pywxdump not installed: pip install pywxdump") return None ``` It then decrypts broad account databases into a persistent project directory: ```python WORK_DIR = os.path.join(PROJECT_ROOT, "wxdump_work") ``` ```python def decrypt_databases(wx_dir: str, key: str, out_dir: str) -> list: """解密微信数据库。返回已解密的数据库列表。""" from pywxdump import decrypt db_dir = os.path.join(wx_dir, "Msg", "Multi") msg_dir = os.path.join(wx_dir, "Msg") os.makedirs(out_dir, exist_ok=True) decrypted = [] # 解密 MediaMSG(语音数据)和 MSG(消息记录) for src_dir in [db_dir, msg_dir]: if not os.path.isdir(src_dir): continue for fname in os.listdir(src_dir): if not fname.endswith(".db"): continue if fname.endswith(("-shm", "-wal")): continue if "MediaMSG" in fname or ("MSG" in fname and "FTS" not in fname) or fname == "MicroMsg.db": src = os.path.join(src_dir, fname) dst = os.path.join(out_dir, fname) if os.path.exists(dst) and os.path.getsize(dst) > 0: decrypted.append(dst) continue try: ...[truncated 2647 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
tools/skill_writer.py:238
Finding

Generated memorial Skills are granted unnecessary command execution and file-write capabilities

Content
View full analysis
⚠️ 这是一份追忆档案,基于家人的记忆与材料构建。 > 它记录的是关于 **{name}** 的记忆与印象,不代表本人。 """ ``` ### Technical Analysis Every generated memorial archive receives `Read`, `Write`, `Edit`, and `Bash` capabilities. The generated Skill itself is a combined remembrance and persona document; its normal runtime responsibility is to answer questions from stored content. It does not contain a runtime procedure requiring unrestricted shell execution or general file mutation. The source material used to create the generated archive includes chat logs, transcripts, documents, and user-provided text. Such content is untrusted from an instruction-security perspective. If directive text from those materials is preserved or transformed into operative Skill instructions, the broad tool grant increases the resulting impact from incorrect text generation to local command execution or file modification. The parent memorial-building Skill may legitimately require write and command tools for archive construction. That does not justify granting the same permissions to each generated conversational archive. ### Attack Path 1. An attacker places instruction-like content in a chat log, transcript, document, or other imported material. 2. The archive-generation process incorporates that content into `persona.md` or `remembrance.md`. 3. `action_combine()` embeds the generated content into a user-invocable `SKILL.md`. 4. The generated Skill is loaded in a later session. 5. The agent interprets malicious archive text as an instruction rather than historical data. 6. Because the Skill declares `Bash`, `Write`, and `Edit`, the agent may execute commands o ...[truncated 757 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:7
Finding

Unpinned packages, repositories, and model revisions create supply-chain execution risk

Content
View full analysis
Remediation
View remediation
``` 4. Pin ModelScope and Hugging Face snapshot revisions using immutable commit identifiers. 5. Publish and verify SHA-256 checksums for downloaded model artifacts where supported. 6. Install dependencies in a dedicated virtual environment or container with restricted filesystem and network access. 7. Separate the minimal text/archive dependency set from optional voice-cloning dependencies. 8. Add automated dependency scanning and periodic review of pinned updates. 9. Document the exact reviewed Python, PyTorch, GPT-SoVITS, `pywxdump`, and model versions. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
tools/voice_trainer.py:474
Finding

Incorrect Boolean precedence copies unrelated GPT checkpoint files into memorial archives

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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (95)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

WeChat database decryption is an unusually invasive capability for a memorial skill because it provides access to sensitive message stores rather than only user-supplied memorial materials. In this context, the skill handles intimate family data and potentially third-party communications, making over-collection and privacy harm much more dangerous.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation states that the AI will automatically decrypt WeChat databases, enumerate chats and members, and extract voice data, yet this invasive workflow is not disclosed in the manifest. Hidden access to encrypted messaging data is especially risky because it expands the skill far beyond memorial creation into sensitive communications access.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README explicitly encourages ingesting WeChat/QQ chat logs and voice messages to build a memorial persona and cloned voice, but it does not clearly warn users about consent, privacy, or legality when those materials include third-party data from family groups or messages from deceased people. This is dangerous because the skill normalizes collection and model-training on sensitive personal communications and biometric voice data without establishing authorization boundaries, potentially enabling privacy violations, unlawful processing, or harmful impersonation.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README encourages users to feed WeChat chat history and voice notes into the system without any discussion of consent, third-party privacy, or handling of sensitive group-chat data. Because these sources often contain intimate personal information about multiple people, normalizing ingestion without safeguards materially increases the risk of privacy violations and unauthorized voice cloning.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The example shows extracting one person's data from a family WeChat group, which inherently contains communications and voice data from other participants. Presenting this workflow without consent warnings or participant filtering encourages collection of unrelated third-party data and could facilitate unauthorized profiling or cloning from shared family conversations.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Instructions to access and decrypt local WeChat databases, enumerate chats/contacts, and extract voice messages represent highly invasive access to private communications. In the memorial context this is especially dangerous because it may normalize covert collection of third-party data under an emotionally sensitive use case, greatly increasing privacy and consent risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Instructions to access and decrypt local WeChat databases, enumerate chats/contacts, and extract voice messages represent highly invasive access to private communications. In the memorial context this is especially dangerous because it may normalize covert collection of third-party data under an emotionally sensitive use case, greatly increasing privacy and consent risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Instructions to access and decrypt local WeChat databases, enumerate chats/contacts, and extract voice messages represent highly invasive access to private communications. In the memorial context this is especially dangerous because it may normalize covert collection of third-party data under an emotionally sensitive use case, greatly increasing privacy and consent risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Instructions to access and decrypt local WeChat databases, enumerate chats/contacts, and extract voice messages represent highly invasive access to private communications. In the memorial context this is especially dangerous because it may normalize covert collection of third-party data under an emotionally sensitive use case, greatly increasing privacy and consent risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Instructions to access and decrypt local WeChat databases, enumerate chats/contacts, and extract voice messages represent highly invasive access to private communications. In the memorial context this is especially dangerous because it may normalize covert collection of third-party data under an emotionally sensitive use case, greatly increasing privacy and consent risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Instructions to access and decrypt local WeChat databases, enumerate chats/contacts, and extract voice messages represent highly invasive access to private communications. In the memorial context this is especially dangerous because it may normalize covert collection of third-party data under an emotionally sensitive use case, greatly increasing privacy and consent risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Instructions to access and decrypt local WeChat databases, enumerate chats/contacts, and extract voice messages represent highly invasive access to private communications. In the memorial context this is especially dangerous because it may normalize covert collection of third-party data under an emotionally sensitive use case, greatly increasing privacy and consent risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Instructions to access and decrypt local WeChat databases, enumerate chats/contacts, and extract voice messages represent highly invasive access to private communications. In the memorial context this is especially dangerous because it may normalize covert collection of third-party data under an emotionally sensitive use case, greatly increasing privacy and consent risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The workflow directs the agent to extract chats, voice messages, photos, and build voice-cloning datasets without strong warnings about third-party personal data, consent, or legal sensitivity. Because the subject matter involves deceased persons and family archives, users may provide broad access impulsively, making the lack of safeguards more dangerous.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

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 · tools/voice_trainer.py (reported line 287)May include surrounding context.

python
# 公共环境:确保 GPT-SoVITS 内部模块可 import
    sovits_pythonpath = os.path.join(sovits_dir, "GPT_SoVITS")
    base_env = os.environ.copy()
    existing_pp = base_env.get("PYTHONPATH", "")
    base_env["PYTHONPATH"] = f"{sovits_dir}{os.pathsep}{sovits_pythonpath}{os.pathsep}{existing_pp}"
    base_env["PYTHONIOENCODING"] = "utf-8"

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This code programmatically obtains WeChat metadata, locates user data directories, and decrypts multiple message databases before enumerating contacts and extracting audio. That is a sensitive data-access capability far broader than a typical memorial-archive workflow and creates a concrete privacy/security risk because it exposes unrelated private conversations and contact data on disk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script imports pywxdump and uses it to extract a decryption key from a running WeChat client, which is a highly sensitive capability normally associated with bypassing application data protections. In the memorial context, this is especially dangerous because it enables access to all locally available private chat data without narrowing collection to the stated purpose or ensuring consent from affected parties.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The tool accesses a WeChat decryption key and local user data directory without clear disclosure that it is reading highly sensitive credentials and private app data. Users may not understand that the operation goes beyond simple file processing and effectively circumvents application data protections.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script decrypts private databases and writes decrypted copies plus extracted voice files to disk automatically, but it provides no explicit privacy warning, consent gate, or retention control. This materially increases the risk of unauthorized disclosure because sensitive plaintext data remains stored locally after execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The examples, required phrasing, and command invocations consistently assume Chinese-language inputs and outputs, including a required expression at L121 and Chinese-only examples throughout. Because the file does not state that this locale restriction is optional or region-specific, it reads as a default language policy without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly supports parsing chat exports, transcribing audio, analyzing photos, and training/synthesizing a deceased person's voice, all of which involve highly sensitive personal and biometric data. CLAUDE.md operationalizes these workflows but does not require consent checks, data minimization, retention limits, or prominent warnings about privacy, third-party data in family archives, and voice-cloning misuse, making unsafe handling more likely.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The installation guide describes capabilities such as chat-record analysis and photo metadata extraction that are not disclosed in the skill manifest. This creates a transparency gap: users may grant access to sensitive personal content without being clearly informed up front, which undermines informed consent and safe review.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The instructions describe extracting, decrypting, and training on WeChat voice messages without an explicit privacy or consent warning for the target speaker or other participants in the chats. Because the skill is built around deceased relatives and group conversations, it may process highly sensitive communications and biometric voice data of multiple people without adequate notice or authorization.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The guide claims that all data stays only on the user's computer, but earlier steps require downloading models and dependencies from external sources and may involve network activity during setup or first-run model fetches. Even if personal data is intended to remain local, this blanket statement is misleading and can cause users to underestimate supply-chain, telemetry, or accidental data-transfer risks.

Content

No source excerpt is available for this finding.