Back to skill

Security audit

AI电商专家|16:9 电商 TVC 广告

Security checks for vulnerabilities and agentic risk

Overview

The skill appears purpose-aligned, but it runs a mutable npm MCP package with broad environment-variable access, so users should review it before installing.

Install only if you are comfortable giving the IMIVA MCP package access to your agent runtime. Prefer a pinned package version, run it with a minimal environment containing only `PATH`, `MCP_TOKEN`, and the API URL, and confirm credit estimates before creating paid tasks.

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
scripts/imiva_mcp.py:12
Finding

Unpinned npm Package Is Executed with Sensitive Environment Access

Content
View full analysis
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( [npx, "-y", PACKAGE], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, bufsize=1, env=env, ) ``` The same unsafe mutable dependency reference appears in the example configuration: ```json { "mcpServers": { "imiva-ecommerce": { "command": "npx", "args": [ "-y", "@infimind/ecom-content-cli@latest" ], "env": { "MCP_TOKEN": "your-token-here", "API_URL": "https://imiva.ecpro.com" } } } } ``` ### Technical Analysis The helper invokes `npx -y @infimind/ecom-content-cli@latest` whenever an MCP operation is performed. The `latest` tag is mutable, so the code that executes at runtime can differ from the version that was reviewed. No exact version, lockfile, package integrity hash, or reproducible installation mechanism constrains the downloaded artifact. The subprocess is also given an environment created with `os.environ.copy()`. Consequently, the external npm package receives not only the required `MCP_TOKEN` and API endpoint but every environment variable visible to the Python process. These variables may contain unrelated cloud credentials, repository tokens, API keys, or other Agent secrets. Running a third-party package is necessary for the declared MCP functionality, but resolving a mut ...[truncated 1627 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

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
87% confidence
Finding

The skill instructs users to run shell commands, read local files via $SKILL_PATH, and configure secrets in environment variables, but it does not declare any explicit tool restrictions such as allowed-tools or permissions. In an agent environment, that mismatch can cause overbroad access to shell, file, or env capabilities beyond what the skill strictly needs, increasing the blast radius if the skill is invoked or modified unexpectedly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The text says the skill is '特别适合...的中文用户', which imposes a language preference in natural-language instructions/description. The file does not provide an explicit user choice or explain a justified region-specific requirement, so this appears to violate the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script emits all runtime error messages in Chinese, such as the missing npx and missing MCP_TOKEN errors, without any opt-in or indication that the skill is intended only for Chinese-speaking users. This is a natural-language locale policy concern because the file imposes a specific language on users rather than offering a choice or documenting a justified regional constraint.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

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,