Back to skill

Security audit

AI电商专家|品牌 Campaign KV 风格迁移

Security checks for vulnerabilities and agentic risk

Overview

This skill is related to its stated IMIVA ecommerce workflow, but it needs review because it runs a mutable remote npm package and can invoke any MCP tool available to the user's token.

Install only if you trust the IMIVA npm package supply chain and can use a narrowly scoped, revocable MCP token. Review or change the helper to pin the package version, pass only required environment variables, disable implicit invocation, and restrict callable MCP tools before using it with business assets or billable account credits.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/imiva_mcp.py:14
Finding

Mutable npm Package Is Downloaded and Executed Without Integrity Verification

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 dependency selection is presented in the example MCP 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 launches `npx` with `-y` and the mutable package selector `@infimind/ecom-content-cli@latest`. The `-y` option suppresses interactive confirmation, while the `latest` distribution tag resolves at runtime and can point to a different package release after this Skill has been reviewed. Consequently, the repository does not fully define the code that will execute. There is no exact version pin, committed lockfile, package-integrity value, checksum verification, or local reviewed installation. This creates both a remote payload retrieval channel and a dependency supply-chain risk. The child process receives a copy of the parent environment together with `MCP_TOKEN` and `API_URL`. A ...[truncated 1774 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/imiva_mcp.py:101
Finding

Generic MCP Dispatcher Permits Calls Beyond the Skill's Declared Capability

Content
View full analysis
None: parser = argparse.ArgumentParser(description="调用 IMIVA Ecommerce MCP") sub = parser.add_subparsers(dest="command", required=True) sub.add_parser("list-tools", help="列出当前 Token 可用工具") call = sub.add_parser("call", help="调用一个 MCP 工具") call.add_argument("tool") call.add_argument("--args") call.add_argument("--args-file") ns = parser.parse_args() if ns.command == "list-tools": response = invoke("tools/list") else: response = invoke( "tools/call", { "name": ns.tool, "arguments": load_args(ns.args, ns.args_file), }, ) print(json.dumps(response, ensure_ascii=False, indent=2)) if "error" in response: raise SystemExit(1) ``` ### Technical Analysis The command-line interface accepts an arbitrary tool name through the positional `tool` argument and forwards it directly to the authenticated MCP server. It does not enforce an allowlist corresponding to the Skill's documented visual-migration workflow. Although `SKILL.md` identifies `create_visual_migration_task` as the primary capability and advises users to confirm budgets, these controls exist only as natural-language guidance. The executable helper does not enforce: - A permitted set of MCP tools. - Per-tool argument schemas. - Confirmation before billable or state-changing operations. - Maximum quantities, resolutions, or credit limits. - Separation between read-only and state-changing tools. The set of callable operations can also expand if the MCP server later exposes additional tools to the same token. Those new capabilities would immediately become reachable through this helper without a corresponding Skill review. ### Attack Path 1. ...[truncated 1469 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill is presented as a narrowly scoped Campaign KV style migration workflow, but its documented behavior includes listing all MCP tools and invoking arbitrary MCP tools by name through a generic transport script. That mismatch is dangerous because users and policy layers may authorize it for a limited purpose while it can actually reach unrelated token-scoped capabilities, enabling privilege expansion and unintended actions.

Content

No source excerpt is available for this finding.

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

The skill exposes shell, file read, and environment-driven capabilities without any explicit permission boundary such as allowed-tools or permissions. In practice, this means a broadly described skill can execute local commands, access local files, and consume secrets from environment variables while giving users no clear scope limitation, increasing the chance of overreach or accidental misuse.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file is in scope for vague-trigger checks. The phrase "Use this skill for IMIVA ecommerce content, product images, product detail pages, KOC seeding, product video, viral creative recreation, marketplace listing and social commerce workflows" is extremely broad and describes common ecommerce tasks rather than a narrow trigger condition, increasing the chance of unintended invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file sets language: zh-CN, and later limits the target audience to Chinese users, which indicates a fixed language/locale behavior. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is explicitly justified or users are offered a choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The phrase "特别适合...的中文用户" explicitly targets Chinese users and implies a language/locale restriction in the natural-language description. The file does not provide a user choice or explain a necessary compliance or regional reason for limiting the experience to Chinese.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill enables implicit invocation without any visible trigger boundaries, consent checks, or exclusion conditions. In a workflow that can create external content-generation tasks and process local paths or remote HTTPS assets, this increases the chance the assistant auto-invokes the skill in contexts the user did not clearly intend, causing unintended data handling, external calls, or cost-incurring operations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Using npx -y @infimind/ecom-content-cli@latest causes the script to download and execute whatever code is currently published under that package/version at runtime. This introduces a supply-chain execution risk: a compromised publisher account, malicious update, or dependency hijack can result in arbitrary code execution in the environment where the skill runs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code emits all visible error messages in Chinese, which imposes a specific language on users without any opt-in or fallback. The file does not indicate that the skill is intentionally limited to a Chinese-speaking or region-specific audience, so this is a natural-language locale policy concern.

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,

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script exposes generic list-tools and arbitrary call <tool> functionality even though the skill is described as focused on a single visual-migration workflow. This creates a capability mismatch: any MCP tool available to the token can be enumerated and invoked, potentially granting broader actions than users or reviewers would expect from the manifest.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The display name, short description, and default prompt are written entirely in Chinese, and the prompt instructs operation in that language context without offering a user language choice. Under the language/locale policy, forcing a specific language without opt-in can be a natural-language policy concern unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.