Back to skill

Security audit

商品页转化率优化

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent IMIVA commerce-content helper, but it needs Review because it runs a changing npm package with the user's token and inherited environment.

Install only if you trust the IMIVA service and the @infimind npm package supply chain. Use a dedicated, low-privilege IMIVA token, run it from a clean environment or sandbox with unnecessary secrets removed, confirm budget before task creation, and prefer a pinned reviewed package version before production use.

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

Error
Location
scripts/imiva_mcp.py:13
Finding

Unpinned Remote npm Package Is Automatically Downloaded and Executed

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (11)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
82% confidence
Finding

os.environ.copy() forwards the entire parent environment into the spawned npm process, not just the intended API settings. That broad exposure can leak unrelated secrets such as cloud credentials, CI tokens, proxies, and internal configuration to third-party code, which is especially risky here because the subprocess is launched from a remotely resolved npm package.

Content

Scanner excerpt · scripts/imiva_mcp.py (reported line 51)May include surrounding context.

python
def invoke(method: str, params: dict | None = None) -> dict:
    npx, token = require_runtime()
    env = os.environ.copy()
    env["MCP_TOKEN"] = token
    env["API_URL"] = os.environ.get("IMIVA_API_URL", os.environ.get("API_URL", DEFAULT_API_URL))
    proc = subprocess.Popen(

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The example task payload hard-codes "language":"简体中文", which signals a fixed locale in the skill's natural-language guidance. The file does not pair this with an explicit user opt-in or alternative language choice, so it can be read as enforcing a specific language policy rather than offering one.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This scenario again embeds "language":"简体中文" in the recommended request body, reinforcing a mandatory locale in the skill instructions. Because the document does not explicitly offer a language-selection path, this natural-language guidance conflicts with the requirement to avoid forcing a locale without user opt-in.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill enables implicit invocation without any visible activation constraints, confirmation requirements, or narrow triggering conditions. That creates a real risk that the agent may invoke this commerce-optimization workflow automatically in response to loosely related user requests, causing unintended data sharing, confusing task execution, or unauthorized downstream actions such as creating optimization tasks based on user-provided assets and budget context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script reads MCP_TOKEN from the environment and forwards it to an external subprocess, which means the token is exposed to all code executed within that npm package and its dependencies. Even if intended for authentication, this is dangerous without explicit disclosure and scoping because a malicious or compromised package could exfiltrate the credential.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
93% confidence
Finding

The code spawns an external process using npx -y @infimind/ecom-content-cli@latest, which downloads and executes code outside the Python package trust boundary. Because it targets the mutable latest tag and runs with inherited environment variables and a live MCP token, compromise of the npm package, dependency chain, or registry response could lead to arbitrary code execution and credential exposure.

Content

Scanner excerpt · scripts/imiva_mcp.py (reported line 54)May include surrounding context.

python
env = os.environ.copy()
    env["MCP_TOKEN"] = token
    env["API_URL"] = os.environ.get("IMIVA_API_URL", os.environ.get("API_URL", DEFAULT_API_URL))
    proc = subprocess.Popen(
        [npx, "-y", PACKAGE],
        stdin=subprocess.PIPE,
        stdout=subprocess.PIPE,

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This skill's stated purpose is PDP/content optimization, but it achieves that by launching a remotely resolved npm package via npx, which expands capability from content orchestration to arbitrary third-party code execution. That creates a meaningful supply-chain and runtime-execution risk inconsistent with a narrow helper script unless explicitly constrained and disclosed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Executing an external package through npx runs code retrieved from the npm ecosystem, but this file provides no explicit warning that third-party code will be installed and executed. In combination with the latest tag and token forwarding, this materially increases the risk of silent supply-chain compromise and user surprise.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The error messages presented to users are written only in Chinese, with no mechanism to select another language or locale. This creates a language-policy concern because the skill imposes a specific language on all users regardless of preference or environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The command description and subcommand help strings are only in Chinese, so all users receive a fixed locale with no opt-in or selection. This is a natural-language policy issue unless the tool is explicitly documented as region- or language-specific.

Content

No source excerpt is available for this finding.