Back to skill

Security audit

高德SKILL 美食雷达

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to provide Amap-based restaurant recommendations as advertised, but its setup runs an unpinned npm MCP server with the user's Amap API key.

Review the MCP setup before installing. Prefer pinning `@amap/mcp-server` to a specific reviewed version, use a dedicated quota-limited Amap API key, avoid exposing unrelated environment secrets, and understand that restaurant searches may send your location or landmark queries to Amap services.

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:49
Finding

Unpinned Third-Party Package Is Automatically Downloaded and Executed

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 49-63
Vulnerability Type: Unpinned dependency execution through npx
Risk Level: Medium

The documented MCP configuration automatically downloads and executes @amap/mcp-server without pinning an exact package version:

json
{
  "mcpServers": {
    "amap": {
      "command": "npx",
      "args": ["-y", "@amap/mcp-server"],
      "env": {
        "AMAP_API_KEY": "Your API key goes here"
      }
    }
  }
}

Technical Analysis

The command npx -y @amap/mcp-server resolves the package from the configured npm registry at execution time. No exact version, lockfile, or integrity hash constrains the downloaded artifact. The -y option also suppresses the installation confirmation prompt.

Consequently, the code that users execute can differ from the code available when the skill was audited. If the package publisher account, package release process, registry, or dependency chain is compromised, a malicious package version could be installed and executed automatically. The MCP process also receives AMAP_API_KEY through its environment, making that credential directly accessible to package code.

This is classified as T08: Insecure Dependencies because the primary weakness is unsafe supply-chain consumption of an unpinned third-party package. The audit found no evidence that the currently referenced package is malicious; the risk arises from automatic execution of mutable, externally supplied code.

Attack Path

  1. An attacker compromises the npm package publisher, release pipeline, registry resolution path, or a transitive dependency used by @amap/mcp-server.
  2. The attacker publishes or causes resolution to a malicious package version.
  3. A user copies the documented MCP configuration and starts or restarts the AI assistant.
  4. npx -y resolves and downloads the package without requiring interactive approval.
  5. The down ...[truncated 1183 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin @amap/mcp-server to an exact version that has been reviewed, rather than allowing npm to resolve the latest release:
    json
    {
      "mcpServers": {
        "amap": {
          "command": "npx",
          "args": ["-y", "@amap/mcp-server@<reviewed-exact-version>"],
          "env": {
            "AMAP_API_KEY": "Your API key goes here"
          }
        }
      }
    }
    
  2. Prefer a controlled installation process backed by a committed lockfile and npm integrity metadata instead of downloading the package dynamically whenever the MCP server starts.
  3. Verify the package publisher, provenance, signatures or attestations, and dependency tree before approving upgrades.
  4. Remove -y where operationally feasible so unexpected installation changes require explicit confirmation.
  5. Run the MCP server in a sandbox or dedicated low-privilege account with narrowly scoped filesystem and network access.
  6. Provide only the required environment variable to the MCP process; do not inherit unrelated secrets from the parent environment.
  7. Use a dedicated Amap API key with appropriate quota restrictions, monitoring, and rotation procedures.
  8. Establish a controlled update process in which new versions are reviewed and tested before the pinned version is changed.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill clearly relies on an external Amap service and asks users to provide current location or landmarks, but it does not explicitly warn that those location queries will be transmitted to a third-party map provider. This creates a privacy transparency issue because users may disclose precise or sensitive location data without understanding where it is sent or how it is processed.

Content

No source excerpt is available for this finding.