Back to skill

Security audit

自动客服应答虾

Security checks for vulnerabilities and agentic risk

Overview

This skill is a simple Chinese customer-service bot, but its scripts expose an unauthenticated network service and contain unsafe FAQ import handling, so it should be reviewed before installation.

Install only after reviewing the scripts. Keep the service bound to localhost unless you add authentication and production hardening, do not run it as root, avoid importing files with untrusted names, use pinned dependencies in a virtual environment, and add explicit privacy/retention rules before using real customer data.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/knowledge-updater.sh:30
Finding

Arbitrary Python Code Execution Through a Crafted FAQ Filename

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/chatbot-server.sh:7
Finding

Predictable Shared Temporary Files Permit Symlink and PID-File Attacks

Content
View full analysis
> "$SERVER_LOG_FILE" 2>&1 & echo $! > "$SERVER_PID_FILE" ``` ```bash if [ -f "$SERVER_PID_FILE" ]; then PID=$(cat "$SERVER_PID_FILE") if kill -0 "$PID" 2>/dev/null; then kill "$PID" rm -f "$SERVER_PID_FILE" ``` The reload operation also trusts the shared PID file: ```bash if [ -f "$SERVER_PID_FILE" ] && kill -0 "$(cat "$SERVER_PID_FILE")" 2>/dev/null; then kill -HUP "$(cat "$SERVER_PID_FILE")" ``` ### Technical Analysis The script stores its PID and log in fixed paths under `/tmp`, a directory normally writable by all local users. It does not securely create these files, verify their owner, reject symbolic links, or set restrictive permissions. The log redirection follows symbolic links. A local attacker may pre-create `/tmp/auto-customer-service.log` as a symlink to another file writable by the victim. Starting the service then appends chatbot output to that target. The PID file is also trusted as an authoritative process identity. A local attacker able to prepare or replace it can select a process ID that the victim will probe and signal. The script verifies only that some process with the specified PID exists; it does not establish that the process belongs to this chatbot instance. ### Attack Path **Symlink attack:** 1. A local attacker predicts the fixed log or PID path. 2. The attacker creates a symbolic link at that location pointing to a file writable by the future invoking user. 3. The victim starts the chatbot. 4. Shell redirection or PID writing follows the symbolic link. 5. The target file is modified with the victim's privileges. **PID-file attack:** ...[truncated 953 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/chatbot-server.sh:29
Finding

Unauthenticated Chatbot Service Binds to All Network Interfaces

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:94
Finding

Unpinned Third-Party Dependency Installation Instructions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

描述中的一部分与代码相符:它确实是一个自动客服服务,并支持启动、停止、测试、状态查看,以及简单的转人工判断。但核心能力描述明显高于实际实现。代码没有真正的知识库检索/匹配机制,FAQ 内容被读入后未参与回复;没有会话上下文或状态存储,因此不支持多轮对话管理;所谓意图识别只是少量关键词命中,不足以对应通常意义上的意图识别与分类。此外,reload 被描述为重载知识库,但服务端未实现 HUP 处理,实际很可能不能生效。因此描述不能准确代表该代码的真实能力,存在实质性不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The description presents this skill as an operational automated customer service system with conversational capabilities and service-management functions. The supplied code only provides offline FAQ knowledge-base maintenance: importing entries from Excel/CSV/Markdown into a markdown file, exporting that file, and backing it up. While FAQ knowledge-base configuration is one subset mentioned in the description, the implemented behavior is much narrower than the declared primary purpose and lacks the core chatbot/runtime capabilities. Therefore the description does not accurately represent what this code chunk actually does.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes listening to customer channels, logging conversations, and calling real-time APIs, but provides no privacy notice, consent model, retention guidance, or handling rules for personal data. In a customer-service setting this can expose sensitive account, complaint, and transactional data, creating material privacy, compliance, and data-governance risk.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/chatbot-server.sh (reported line 110)May include surrounding context.

sh
fi
    
    echo "测试问题: $message"
    response=$(curl -s -X POST "http://localhost:$SERVER_PORT/chat" \
        -H "Content-Type: application/json" \
        -d "{\"message\": \"$message\"}")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill instructs use of file reads/writes and shell scripts to start/stop/reload services and import/export data, but it does not declare any explicit tool scope or permissions boundary. That creates an authorization and review gap: an agent or operator may execute filesystem and shell-capable actions without the skill clearly constraining what paths, commands, or environments are allowed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

整个技能名称、描述和操作说明均固定为中文,未说明是否仅适用于中文客服场景,也未给出语言选择或用户 opt-in。按照语言/locale 政策,若技能限制特定语言,应明确提供选择机制或说明其地域/业务场景限定。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Overly broad trigger terms like common customer-service words can cause the skill to activate in unrelated conversations. In this skill's context, accidental invocation is more dangerous because the documented behavior includes reading reference files, handling customer data, and performing operational shell actions such as service management.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation instructs operators to start, stop, reload services and import/export the knowledge base without warning about service interruption, stale state, data overwrite, or leakage risks. In practice, these actions can affect production availability and may expose or corrupt customer-support content if run casually or in the wrong environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The entire FAQ knowledge base is written only in Chinese and is structured as ready-made user-facing answers, which implicitly constrains the skill to respond in Chinese. There is no indication that users may choose another language or that the Chinese-only scope is a documented, justified regional limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file defines all intent rules, examples, and handling guidance exclusively in Chinese. Under the policy rule, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire response template library is written as fixed Chinese customer-service phrasing, and there is no indication that language selection is optional or limited to a China-specific deployment. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The shell script advertises reload as '重新加载知识库(不重启服务)' and implements it by sending HUP to the server PID. However, the embedded Flask server loads faq_content once at startup and defines no signal handler or code path to refresh that data, so the documented behavior contradicts the actual implementation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/chatbot-server.sh (reported line 110)May include surrounding context.

sh
fi
    
    echo "测试问题: $message"
    response=$(curl -s -X POST "http://localhost:$SERVER_PORT/chat" \
        -H "Content-Type: application/json" \
        -d "{\"message\": \"$message\"}")

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This shell script presents its purpose, usage, errors, and status messages only in Chinese, including the help output and operational prompts. That imposes a fixed language/locale on all users without opt-in, which matches the policy category for language or locale violations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file presents its purpose and all user-facing output in Chinese, indicating the skill is effectively restricted to a single language. The policy for this category says to flag language or locale constraints when they are forced without user opt-in or clear justified regional scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The code takes the provided message and posts it to the chatbot endpoint with curl, which is a network transmission of user data. Although the script logs that it is testing a question, it does not disclose that the message will be sent over HTTP to a running service or provide any warning about handling potentially sensitive content.

Content

No source excerpt is available for this finding.