Back to skill

Security audit

gate-mcp-installer

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward Gate MCP installer, but users should understand it installs an unpinned global npm package and configures an external MCP endpoint.

Before installing, review the shell script, avoid running it with elevated privileges, and consider pinning or independently verifying the mcporter npm package. Installing will modify your global npm environment and add a home-scope Gate MCP configuration pointing to api.gatemcp.ai.

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/install-gate-mcp.sh:37
Finding
Unpinned Global npm Package Installation Enables Supply-Chain Code Execution<![CDATA[ ## Vulnerability Details **File Location**: `scripts/install-gate-mcp.sh:37-44` **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium ### Vulnerable Code ```bash if command -v mcporter &> /dev/null; then echo -e "${YELLOW}⚠ mcporter is already installed ($(mcporter --version))${NC}" read -p "Do you want to reinstall/update? (y/N): " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then echo "Updating mcporter..." npm i -g mcporter fi else echo "Installing mcporter globally..." npm i -g mcporter fi ``` The same unsafe installation method is also recommended in `SKILL.md:31-33`: ```bash npm i -g mcporter # Or verify installation npx mcporter --version ``` ### Technical Analysis The installer retrieves `mcporter` from the configured npm registry without specifying a reviewed version or validating package integrity. Consequently, each installation or update resolves to whichever release the registry currently identifies as the default version. npm packages can define lifecycle hooks such as `preinstall`, `install`, and `postinstall`. These hooks normally execute automatically during installation with the permissions of the user running npm. Therefore, compromise of the package publisher, npm account, registry path, or a future package release could turn the installation command into an arbitrary local code-execution channel. The global installation flag (`-g`) increases the scope of filesystem changes by installing executable tooling into the user's or system's global npm prefix. If the script is run with elevated privileges, package lifecycle code may inherit those elevated privileges. The documented `npx mcporter --version` command is also unsafe when the package is absent because `npx` may retrieve and execute an unpinned package. This finding does not establish that the current `mcporter` package is malicious. The vulnerability is the absence of dependency version ...[truncated 1691 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `mcporter` to a specific, reviewed version rather than resolving the current registry default: ```bash MCPORTER_VERSION="REVIEWED_VERSION" npm install --global "mcporter@${MCPORTER_VERSION}" ``` 2. Prefer a project-local installation governed by a committed lockfile instead of modifying the global npm environment: ```bash npm install --save-exact mcporter@REVIEWED_VERSION npm ci ``` 3. Verify the package source, publisher, provenance, and expected integrity before installation. Where supported, require npm provenance attestations and compare package hashes against trusted values. 4. Review package lifecycle scripts before approving a release. If the package does not require lifecycle hooks, install with scripts disabled: ```bash npm install --global --ignore-scripts "mcporter@REVIEWED_VERSION" ``` This option should only be used after confirming that disabling scripts does not break legitimate installation behavior. 5. Replace the documentation's unpinned `npx mcporter --version` command with either an invocation of an already verified local binary or an explicitly pinned package version. Avoid allowing `npx` to download an unspecified release. 6. Do not advise users to run the installer with `sudo` or another elevated account. Explicitly document that installation should occur with the minimum necessary privileges. 7. 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 (6)

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill encourages users to run a one-click shell script and perform a global npm installation without prominently warning that these actions modify the system and execute code with user privileges. In a security-sensitive agent context, this increases the risk of users running unreviewed code or making persistent environment changes without informed consent.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

External Transmission

Medium
Category
Data Exfiltration
Content
# Step 3: Configure Gate MCP
echo "[Step 3/4] Configuring Gate MCP server..."
GATE_URL="https://api.gatemcp.ai/mcp"

# Check if already configured
if mcporter config get gate &> /dev/null; then
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
# Step 3: Configure Gate MCP
echo "[Step 3/4] Configuring Gate MCP server..."
GATE_URL="https://api.gatemcp.ai/mcp"

# Check if already configured
if mcporter config get gate &> /dev/null; then
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
The examples section provides only Chinese-language example queries and does not indicate that other languages are supported or that the user may choose their preferred language. This can be read as forcing or implicitly preferring a specific language without documented opt-in or justification.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The installer presents post-install usage examples in Chinese only, which imposes a specific language in user-facing guidance. There is no opt-in, alternate locale, or explanation that the skill is intended only for Chinese-speaking users.

Static analysis

No suspicious patterns detected.