Back to skill

Security audit

turingsenseai-classify-skill

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently configures and uses a product-image recognition MCP, with setup-time dependency and credential-handling risks users should understand.

Before installing, confirm you trust the Turing MCP endpoint and the mcporter npm package. Run setup only with normal user privileges, avoid committing real API keys, and consider manually configuring the MCP or pinning mcporter if you need tighter supply-chain control.

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
setup.sh:12
Finding

Unpinned Global npm Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: setup.sh, lines 12–16
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: Medium

Vulnerable Code

bash
if ! command -v mcporter >/dev/null 2>&1; then
  echo "mcporter not found. Installing mcporter..."
  npm install -g mcporter
  echo "mcporter installed."
fi

Technical Analysis

The setup script installs mcporter from the npm registry without specifying an exact version or verifying package integrity. Consequently, every fresh setup resolves whatever release the package registry currently identifies as the latest version rather than the version that was reviewed and tested with this project.

npm installation can execute package lifecycle scripts. If the package, one of its transitive dependencies, or its publishing account is compromised, malicious lifecycle code could execute with the permissions of the user running setup.sh. The -g option also modifies the user's or system's global Node.js environment rather than confining the dependency to the project.

Installation takes place before the script validates the required API credentials. Therefore, even an invocation that must later fail because credentials are missing can still install and execute the mutable dependency.

Attack Path

  1. An attacker compromises the mcporter npm package, its maintainer account, or a transitive dependency, and publishes a malicious release.
  2. A user without mcporter installed runs bash setup.sh.
  3. npm install -g mcporter resolves and downloads the mutable current release.
  4. npm executes any applicable package lifecycle scripts during installation.
  5. Malicious code runs with the invoking user's privileges and the package is added to the global tool environment.
  6. The compromised globally installed command may also execute during subsequent mcporter config add and mcporter list operations.

Impact Assessment

Successful exploitation could execute ar ...[truncated 570 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin mcporter to an exact audited version rather than resolving the latest release:

    bash
    npm install --global --ignore-scripts mcporter@X.Y.Z
    

    Confirm first that disabling lifecycle scripts is compatible with the package.

  2. Prefer a project-local, lockfile-controlled installation over a global installation. Commit a lockfile containing resolved dependency versions and integrity hashes, then use a reproducible installation command such as npm ci.

  3. Verify the package source, maintainer identity, published artifacts, transitive dependency tree, and registry integrity metadata before adoption.

  4. Validate API credentials before performing any installation so that failed configuration attempts do not unnecessarily modify the environment:

    bash
    if [ -z "${API_KEY}" ] || [ -z "${API_SECRET}" ]; then
      echo "Missing API credentials."
      exit 1
    fi
    
  5. Require explicit user confirmation before installing or changing global tooling, and document the exact package version that has been security-reviewed.

  6. Run setup with ordinary user privileges and avoid sudo or administrator execution.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The listed trigger phrases include broad expressions such as “帮我识别这是什么商品”, “这是什么牌子”, and “识别一下这个产品”, and the section says they are included but not limited to. Although the skill is for image-based product recognition via a specific MCP, the trigger description does not clearly constrain activation to cases with image URLs or explicit product-image analysis intent, which could cause 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 instruction says outputs must be suitable for Chinese users, which imposes a language/locale preference in the skill behavior. The file does not offer user opt-in or an alternative language choice, and no region-specific compliance rationale is provided.

Content

No source excerpt is available for this finding.