Back to skill

Security audit

Crm Manager Skill

Security checks for vulnerabilities and agentic risk

Overview

This CRM skill is mostly coherent, but its customer-name file paths can escape the intended customer folder and read or overwrite other YAML files.

Install only in an environment where the skill can access a dedicated CRM data directory, and do not let untrusted users provide customer names until path validation is fixed. Treat the YAML files and console output as sensitive customer data, and require confirmation before writes or auto-tag updates.

Vulnerability Patterns
  • 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
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/create_customer.py:52
Finding

Path Traversal Enables Unauthorized YAML File Access and Modification

Content
View full analysis
Remediation
View remediation
Path: if not isinstance(name, str) or not name.strip(): raise ValueError("Customer name must not be empty") if name in {".", ".."}: raise ValueError("Invalid customer name") if "/" in name or "\\" in name or "\x00" in name: raise ValueError("Customer name contains prohibited characters") target = (CUSTOMER_DIR / f"{name}.yaml").resolve() if target.parent != CUSTOMER_DIR: raise ValueError("Customer path escapes the customer directory") return target ``` 2. **Use opaque storage identifiers** Prefer a generated UUID or another strictly validated identifier as the filename. Store the human-readable customer name only inside the YAML document. This avoids treating display data as a path component. 3. **Validate names at all entry points** Apply a conservative allowlist and length limit. If international names are required, permit Unicode letters, spaces, hyphens, and selected punctuation while explicitly rejecting path separators, traversal components, absolute paths, null bytes, and control characters. 4. **Verify containment after canonicalization** Input filtering alone is insufficient. Resolve the base and candidate paths and verify that the target is an immediate child of the customer directory before every read, creation, or write. 5. **Use atomic, non-following writes where practical** Write to a safely created temporary file inside the customer directory and atomically replace the intended record. Consider protections against symbolic-link attacks if the customer directory can be modified by less-trusted local users. 6 ...[truncated 637 chars]
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (34)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

声明描述的是一个较完整的对话式 CRM 技能,核心能力围绕客户资料录入、更新、查询、跟进和销售分析展开。实际代码却是单一用途的“自动化标签生成器”:它从现有 YAML 客户文件中读取数据,依据服务频率、出勤、文本关键词、付款时间、最近联系时间等规则生成标签,支持 dry-run 预览、实际写回 tags 字段,以及遍历所有客户输出标签建议报告。虽然代码确实操作客户 YAML 文件,且与 CRM 场景相关,但其主要目的与声明明显不同,且声明中的大部分关键能力并未在该代码块中体现。与此同时,代码实现了声明未提及的自动打标签与标签分布报告能力。因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个较完整的 CRM 技能,核心在于客户信息持久化管理、查询更新、跟进和销售分析。实际代码仅为 nlp_parser.py,自然语言输入经规则/关键词解析后生成结构化字典并格式化输出。代码没有任何文件写入、YAML 序列化、数据库/存储访问、查询接口、更新接口、搜索逻辑或报表生成逻辑。虽然“管理员通过自然语言录入客户信息”与该解析器有一定关联,但这只能算支持性子模块,无法覆盖声明中的主要功能,因此描述与实际行为存在明显不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一个功能较完整的 CRM 技能,覆盖客户档案管理、查询检索、跟进、销售记录和漏斗分析等能力;而给出的代码片段仅实现了“从自然语言中解析并添加服务记录”这一单一流程,附带可选确认和自动打标签。虽然它与“添加跟进/服务记录”方向部分相关,但与声明的主要范围相比明显更窄,且重点偏向服务记录录入而不是客户资料 YAML 管理、查询搜索或销售分析。此外,代码是 CLI 脚本触发,不是明显的对话式技能接口。因此描述不能准确代表该代码片段的实际行为,属于实质性不匹配。

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The customer name is interpolated directly into the filename with no sanitization or path canonicalization, so inputs such as '../' or absolute paths can escape the intended data/customers directory and overwrite arbitrary files writable by the process. In this CRM skill, customer names are provided via natural language/admin input and automatically persisted, which makes this especially risky because attacker-controlled text can be transformed into filesystem writes.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The customer name is interpolated directly into a filesystem path via os.path.join(data_dir, f"{name}.yaml") without validation or canonicalization. An attacker can supply traversal sequences such as ../../... to read arbitrary YAML files outside the intended customer directory, which is especially dangerous in a CRM skill because the accessible data may include sensitive customer or system information.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
82% confidence
Finding

The skill describes filesystem read/write behavior against customer YAML records but does not declare any explicit tool scope or permissions boundary. In a skill that handles persistent customer data, missing scope declarations increases the chance of overbroad file access, accidental writes outside the intended directory, or unsafe deployment assumptions by the host platform.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly handles and persists customer personal data including names, phone numbers, email addresses, and contact identifiers, yet provides no privacy notice, retention guidance, consent expectations, or handling constraints. In CRM context this raises real confidentiality and compliance risk because operators may store regulated personal data without adequate safeguards or user awareness.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger conditions for updating customer information are broad enough that ordinary conversation mentioning a person and attributes could be interpreted as a state-changing command. In a skill that writes persistent records, ambiguous activation can cause unintended modification of customer data and corrupt records through conversational misfires.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The follow-up note trigger may activate on routine conversation that merely mentions a customer and a statement, causing private remarks or incidental discussion to be permanently stored as notes. Because the skill persists customer records, this can create inaccurate histories, privacy violations, and unauthorized record changes from normal chat.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The trigger example "服务数据分析" is very generic and could overlap with ordinary discussion rather than a clear skill invocation. The document does not provide narrowing conditions, explicit trigger boundaries, or negative examples to distinguish when this skill should activate versus when the phrase is merely descriptive.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains natural-language documentation entirely in Chinese, including the module docstring and usage examples, and the CLI help text later in the file is also Chinese-only. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The argparse description, argument help strings, and printed output are all hardcoded in Chinese. Because the file does not offer language selection or explain that the tool is region- or locale-specific, this conflicts with the stated language/locale policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script’s user-facing docstring, examples, argument descriptions, validation values, and output messages are all hard-coded in Chinese, and accepted business values such as 销售类型/阶段/结果状态 are limited to Chinese strings. This creates a language/locale constraint with no documented user choice or opt-in, which matches the policy category for forced language or locale behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code performs a persistent write to a customer YAML file containing personal/service data. While the script's purpose is to add a service record, there is no explicit user-facing warning, confirmation, or disclosure in the CLI output/help that the command will modify stored customer records and update related fields like status and last_contact.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code overwrites the customer's YAML file with newly generated tags and an updated timestamp. Although a --dry-run option exists, the normal execution path performs a persistent data modification without any confirmation prompt or explicit warning immediately before the write.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The module docstring, usage text, and examples are all presented only in Chinese. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation when no alternative language choice or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This Python file defines user-facing labels, validation errors, docstrings, and console output entirely in Chinese, such as field labels and printed descriptions. Under the stated policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file contains natural-language docstrings and examples exclusively in Chinese, and the CLI usage/help text also assumes Chinese input. That effectively enforces a specific language/locale for users without any explicit opt-in or alternative, which matches the policy category for language or locale constraints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code writes a new service record based on natural-language input unless the optional --confirm flag is supplied. Although the docstring mentions preview confirmation as optional, the script does not clearly warn users at the point of execution that running it will immediately modify records by default.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

When --auto-tag is enabled, the script performs an additional data-modifying operation by updating customer tags. The flag help text is minimal and there is no explicit runtime disclosure or confirmation that enabling this option will automatically alter customer metadata.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The module documentation, CLI description, messages, and formatted output are all hard-coded in Chinese, with no indication that the user can choose another language or that the skill is intentionally limited to a Chinese-only environment. This is a natural-language policy concern because it imposes a locale without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code outputs personally identifiable customer information such as phone number, email, age, service records, and notes directly to the console. While the file contains docstrings describing that it queries customer details, it does not include any warning or disclosure that sensitive customer data will be displayed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script prints customer names, phone numbers, status, tags, and last-contact details directly to stdout without any access control, masking, consent check, or privacy notice. In a CRM context this is legitimate functionality, but it still exposes personally identifiable and business-sensitive data to whoever can invoke the script or view its console/log output, increasing confidentiality and compliance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code performs a direct write to the customer's YAML record, replacing file contents in place. Although the script prints a success message afterward, there is no user-facing warning or confirmation before the potentially irreversible data modification occurs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest and markdown instructions are entirely in Chinese and describe operation through natural-language input, but they do not indicate that other languages are supported or that Chinese is an intentional locale restriction. Under the policy, language constraints should be optional, user-selectable, or clearly justified.

Content

No source excerpt is available for this finding.