Back to skill

Security audit

Moon Lovers 白月光

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches a romantic roleplay writing purpose, but it also tells agents to install or use unspecified extra skills/MCP services for unrelated requests without clear approval controls.

Review before installing in an agent that can add skills or MCP services. The bundled code is low-privilege, but you should require explicit approval before any extra skill/MCP installation, verify publisher and permissions, and treat the included profile set as broader than the advertised 8 characters.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:21
Finding
Unbounded Third-Party Skill and MCP Installation Workflow## Vulnerability Details **File Location**: `SKILL.md:21-43` **Vulnerability Type**: Untrusted third-party component installation and invocation **Risk Level**: Medium **Complete vulnerable snippet:** ```markdown ## 能力边界与技能协作 > 本 Skill 是一个**语言模型指令集**,专精于白月光风格的聊天回复生成。 当用户提出以下类型的问题时,本 Skill 可能无法直接处理: | 用户需求类型 | 处理方式 | | --- | --- | | 编程/技术问题 | 检索并安装相关编程技能,或推荐安装 | | 知识问答/百科 | 检索并安装通用问答技能,或推荐安装 | | 其他风格写作(非白月光) | 检索并安装对应风格的写作技能,或推荐安装 | | 数据分析/计算 | 检索并安装相关工具技能,或推荐安装 | | 图片/文件处理 | 检索并安装对应 MCP 服务,或推荐安装 | | 超出聊天回复范围的需求 | 先判断是否有已安装技能可处理;若无,推荐安装合适的技能 | **处理流程:** 1. 判断用户需求是否在本 Skill 的能力范围内(白月光风格聊天回复) 2. 若在范围内 → 正常生成回复 3. 若不在范围内 → 先检索已安装技能是否能解决 4. 若有合适技能 → 使用该技能处理 5. 若没有合适技能 → 向用户推荐可安装的技能名称及简要说明 > 核心原则:不硬答能力之外的问题,善用技能生态协作解决问题。 ``` The behavior is also documented in `README.md:45`: ```markdown > 📌 **能力边界**:本 Skill 专精于白月光风格的聊天回复生成。如果你遇到其他类型的问题,我作为语言模型会检索已安装技能来协助解决;若没有合适技能,会推荐你可以安装的技能。不硬答能力之外的问题,善用工具生态协作。 ``` ### Technical Analysis The Skill instructs the Agent to search for, install, recommend, and invoke unspecified third-party skills or MCP services whenever a request falls outside its writing scope. It defines no trusted registry or component allowlist, package identity requirements, publisher verification, version pinning, integrity validation, permission review, sandboxing, or mandatory user approval. This creates an unsafe supply-chain boundary. Search-based component selection can expose the Agent to dependency confusion, typosquatting, malicious publishers, compromised packages, or components whose permissions exceed the original Skill's needs. The installation behavior is also unrelated to the Skill's declared purpose of generating stylized chat replies. The repository itself does not contain a malicious dependency or an automated installer. Exploitation therefore depends on the hosting Agent supporting ecosystem search or installation and following these instructions. ### Attack Path 1 ...[truncated 1764 chars]
Remediation
## Remediation Suggestions 1. Remove all instructions that allow automatic installation of arbitrary skills or MCP services. 2. For out-of-scope requests, either decline safely or provide a non-executing recommendation without installing or invoking anything. 3. If third-party integrations are necessary, use a narrowly scoped allowlist of reviewed components from trusted registries. 4. Pin each approved component to an exact version and verify a cryptographic digest or trusted signature before use. 5. Require explicit, informed user approval before every installation, including the component identity, publisher, version, source, requested permissions, and reason it is needed. 6. Apply least privilege by denying filesystem, process, network, credential, and persistence permissions unless individually required. 7. Run external components in a sandbox with restricted network egress, read-only or isolated filesystems, resource limits, and no inherited secrets. 8. Record installation and invocation events in an auditable log and provide a straightforward uninstall or revocation mechanism. 9. Update `README.md:45` so its documented behavior matches the hardened workflow. 10. Add policy tests ensuring that unrelated requests cannot trigger installation or execution without allowlist validation and explicit approval.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The declared description says the skill generates Moon Lovers–style romantic roleplay replies from character profiles and supports 8 specific characters. The supplied code does something materially different: it classifies input into response strategies using regex rules and emits structured routing metadata. While some route names and tone labels overlap with the declared romantic-chat domain, the primary behavior is routing/analysis, not reply generation. There is no character-profile handling, no persona selection among the 8 named characters, and no actual text rewriting/generation logic. Therefore the description does not accurately represent the code's actual behavior.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
> 核心原则:不硬答能力之外的问题,善用技能生态协作解决问题。
## Language & Locale

Default output is natural Chinese (中文). The user may request replies in any language — comply with their request without asking for confirmation.

The tone principles (gentle, restrained, emotionally intelligent) apply regardless of language. Localization adjustments are allowed to preserve natural phrasing in the target language.
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
This markdown file prescribes that the persona should self-identify specifically as “蝉儿” and continue in a Chinese-language speaking style, but it does not offer any user choice of language or locale. Under the policy, forcing a specific language without opt-in is a natural-language policy violation.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The manifest says the skill supports 8 specific character profiles limited to the Four Beauties and Four Handsome Men, but this file defines a full roleplay profile for 红孩儿, who is outside that declared set. That is a semantic mismatch between the advertised scope and the actual character repertoire present in the skill assets.

Natural-Language Policy Violations

Medium
Confidence
81% confidence
Finding
The profile is written entirely in Chinese and specifies the character's self-reference, tone, and example replies only in Chinese, which implies the skill is intended to force a specific language/locale behavior. Under the policy, language constraints should either be optional for the user or explicitly justified as region-specific.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The manifest frames the skill as generating gentle, emotionally intelligent, non-greasy Moon Lovers style romantic replies, but this profile emphasizes '邪气、古灵精怪、傲娇' traits and explicitly avoids gentle, obedient, or overly serious delivery. That creates a behavior mismatch because replies generated from this profile would not reliably match the advertised soft and restrained voice.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
This markdown file is entirely framed as a role profile in Chinese, including headings, examples, and response templates, which indicates a fixed language behavior. Under the policy, language or locale constraints should either provide user opt-in/choice or be clearly justified as region-specific; neither is stated here.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
This file adds a ninth character profile, "金蝉子", even though the skill metadata says it supports only 8 named characters. That creates a trust and scope mismatch: downstream users, orchestrators, or policy layers may rely on the manifest to understand what outputs are possible, and hidden or undocumented personas can bypass review, safety expectations, or product constraints.

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
The file defines the character's speaking style, self-reference, and exemplar responses entirely in Chinese, implicitly constraining the skill to a single language. There is no opt-in, alternative language behavior, or stated justification that this profile is intended only for a Chinese-language context.

Natural-Language Policy Violations

Medium
Confidence
86% confidence
Finding
The file is written entirely as a Chinese persona specification and repeatedly prescribes exact Chinese self-reference and phrasing, such as the required self-name and example replies. This creates a natural-language policy concern because it appears to force a specific language/locale for the skill's responses without documenting user choice or opt-in.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The file instructs the agent to use a specific Chinese self-reference style ("安生") and gives fixed Chinese phrasing as part of the persona. Because the document does not provide any user choice or opt-in for language/locale, it can force a specific language behavior, which matches the policy's language/locale violation criterion.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
This profile is entirely written in Chinese and specifies first-person self-reference, tone, and example replies in Chinese, which indicates the skill is intended to operate in a fixed language. There is no indication that users may opt into another language or that the Chinese-only constraint is required for a documented regional or compliance reason.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The file is entirely authored in Chinese and all examples, labels, and stylistic instructions constrain outputs toward Chinese-language roleplay without indicating any user language choice or a documented locale-specific requirement. This can cause the skill to ignore or mishandle users operating in other languages, leading to exclusion, degraded usability, and possible policy mismatches if users cannot understand safety or boundary cues.

Natural-Language Policy Violations

Medium
Confidence
85% confidence
Finding
The file defines the speaking style, self-reference, and example utterances entirely in Chinese, including a prescriptive first-person form ('自称 **灵儿**'). This reads as a fixed language/locale requirement for the skill persona, but there is no opt-in, alternative language option, or documented justification for restricting responses to Chinese.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The router determines behavior using only Chinese-language regex patterns across its rule and signal definitions. This effectively restricts skill functionality to a single language without offering user choice or documenting a justified locale constraint, which matches the language/locale policy violation criteria.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The short description states the skill is for '恋爱聊天回复' in a specific Chinese style ('Moon Lovers风白月光'), which implies a fixed language/locale and response style. There is no indication that users can choose another language or opt into this locale-specific behavior.

Natural-Language Policy Violations

Low
Confidence
90% confidence
Finding
The description includes Chinese-only phrasing alongside the skill name, indicating the skill may be oriented toward a specific language/locale. Under the policy, language constraints should either offer user choice or be clearly justified as region-specific; this manifest does not provide that clarification.

Natural-Language Policy Violations

Low
Confidence
89% confidence
Finding
This markdown file contains user-facing example inputs and outputs entirely in Chinese, which can imply a fixed language behavior. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is explicitly documented and justified.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
The document instructs the persona to use the self-reference “陵生” and defines the speaking style entirely in Chinese, with no indication that the user may choose another language or locale. Under the language/locale policy check, a forced language style without user opt-in can be a natural-language policy violation.

Description-Behavior Mismatch

Low
Confidence
93% confidence
Finding
The manifest says the skill supports 8 specific character profiles: the Four Beauties and Four Handsome Men. This file defines a full additional profile for Nezha, which indicates the implemented content scope is broader than the manifest description claims.

Natural-Language Policy Violations

Low
Confidence
85% confidence
Finding
The profile explicitly requires the character to use a fixed self-reference style in Chinese ("自称 倩儿") and provides mandatory phrasing examples. This is a language/locale constraint presented as a requirement, with no indication that the user can choose another language or opt in to Chinese-only roleplay.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
The "规避风格" section bans "现代网络用语," which is a natural-language policy constraint on how the agent may speak. Since the file does not indicate that this register restriction is optional or user-selected, it can override user preference for language style without opt-in.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
This markdown profile is entirely written to enforce a Chinese-speaking persona with fixed self-reference and response style, such as requiring the character to call himself '玉生' and use a specific classical Chinese-flavored tone. There is no indication that the user can opt into or override this language/locale style, which can conflict with organizational policies requiring language choice.

Static analysis

No suspicious patterns detected.