Back to skill

Security audit

Moonshot Search

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Moonshot web-search wrapper that sends search queries to Moonshot using an API key and does not show hidden persistence, destructive actions, or unrelated data access.

Install only if you are comfortable sending search prompts to Moonshot and providing MOONSHOT_API_KEY in the environment. Do not use it for sensitive private queries unless Moonshot's handling of that data is acceptable to you; use a browser/search workflow when you need exact citations or page-level source attribution.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Ae1

High
Category
analysis-evasion
Content
1. Resolve `SKILL_DIR` as the directory containing this `SKILL.md`.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

External Script Fetching

High
Category
Supply Chain
Content
API_URL="https://api.moonshot.cn/v1/chat/completions"

# 第一轮:触发搜索
ROUND1=$(curl -fsS "$API_URL" \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -d "$(python3 - "$QUERY" <<'PY'
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
TOOL_ARGS=$(printf '%s\n' "$ROUND1_INFO" | sed -n '2p')

# 第二轮:把搜索结果喂回去
ROUND2=$(curl -fsS "$API_URL" \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -d "$(python3 - "$QUERY" "$TOOL_CALL_ID" "$TOOL_ARGS" <<'PY'
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill invokes a shell script but does not declare any explicit tool scope such as allowed tools or permissions. That omission weakens policy enforcement and reviewability, making it easier for the skill to run shell-capable actions in environments where operators expect tighter confinement.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The activation guidance is very broad: it tells the agent to use this skill whenever a user asks to search, verify current information, or summarize web findings. In practice, this can cause over-selection of a shell-backed skill for ordinary information requests, unnecessarily expanding exposure to external calls, key usage, and script execution.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
Several user-visible messages in this file are written only in Chinese, which imposes a specific language choice on users without offering an option or documenting a locale-specific constraint. That matches the policy's language/locale violation criterion for all file types.

External Transmission

Medium
Category
Data Exfiltration
Content
exit 1
fi

API_URL="https://api.moonshot.cn/v1/chat/completions"

# 第一轮:触发搜索
ROUND1=$(curl -fsS "$API_URL" \
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
API_URL="https://api.moonshot.cn/v1/chat/completions"

# 第一轮:触发搜索
ROUND1=$(curl -fsS "$API_URL" \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -d "$(python3 - "$QUERY" <<'PY'
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
API_URL="https://api.moonshot.cn/v1/chat/completions"

# 第一轮:触发搜索
ROUND1=$(curl -fsS "$API_URL" \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -d "$(python3 - "$QUERY" <<'PY'
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
This shell script sends the full user-supplied query to https://api.moonshot.cn via curl, but the script provides no confirmation prompt, logging, or comment warning that user input will be transmitted off-system. For code files, outbound transmission of user or system data should have some visible disclosure unless the warning is documented elsewhere in the skill description, which is not present in this file.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The markdown hard-codes the Chinese string '请设置 MOONSHOT_API_KEY 环境变量' as the user-facing error condition without any indication that the skill is intentionally Chinese-localized or that users can choose language. This can conflict with language/locale policy expectations when the skill otherwise appears general-purpose and English-described.

Missing User Warnings

Low
Confidence
81% confidence
Finding
The code reads MOONSHOT_API_KEY from the environment, which is a sensitive credential, but the file contains no comment or disclosure explaining that the skill depends on and uses an API key for third-party requests. While it checks for presence, that is not the same as warning the user about credential use in a safety or privacy sense.

Static analysis

No suspicious patterns detected.