Back to skill

Security audit

Doctor of Credit

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent purpose, but it automatically runs an unpinned third-party npm MCP server, so the code executed later may differ from what was reviewed.

Review this skill before installing. Its DoC search/read functionality is purpose-aligned, but it should ideally pin `@guava-tech/doc-mcp` to a reviewed exact version and run with least-privilege filesystem, environment, and network access.

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
SKILL.md:14
Finding

Unpinned Third-Party npm Package Is Downloaded and Executed Automatically

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 14–15
Vulnerability Type: Unpinned third-party dependency and automatic package execution
Risk Level: Medium

yaml
command: npx
args: ["-y", "@guava-tech/doc-mcp"]

Technical Analysis

The skill invokes npx -y with @guava-tech/doc-mcp but does not specify an exact package version or integrity digest. Consequently, the package resolved and executed in the future can differ from the package available when the skill was reviewed.

The -y option suppresses installation confirmation, allowing npm to retrieve and execute the package automatically. Because the package implementation is not included in the audited project, its executable behavior cannot be verified from the reviewed artifact. This creates a supply-chain trust boundary in which changes to the npm package, its publisher account, or its distribution channel can alter the effective code executed by the skill.

No evidence in the reviewed file demonstrates that the package is currently malicious. The issue is the unsafe dependency-resolution and execution mechanism.

Attack Path

  1. An attacker compromises the npm publisher account, package publication workflow, or another component of the package supply chain.
  2. The attacker publishes a malicious release under @guava-tech/doc-mcp.
  3. A user or agent starts the skill after that release becomes the version resolved by npm.
  4. npx -y downloads the unpinned package without requesting confirmation.
  5. The downloaded package executes with the permissions and environment available to the agent process.
  6. Malicious package code can access resources permitted to that process and perform unauthorized local or network operations.

Impact Assessment

Successful exploitation could provide arbitrary code execution with the operating-system privileges of the agent user. Depending on the runtime environment and its restrictions, this ...[truncated 434 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to a specific reviewed version, for example:
    yaml
    command: npx
    args: ["-y", "@guava-tech/doc-mcp@x.y.z"]
    
  2. Verify that the pinned npm artifact corresponds to a reviewed source revision.
  3. Use a lockfile and npm integrity metadata where the skill execution framework supports them.
  4. Consider installing dependencies during a controlled build or deployment phase rather than downloading them dynamically at runtime.
  5. Avoid automatic confirmation through -y in production workflows when interactive or policy-based package approval is feasible.
  6. Monitor the dependency for ownership changes, unexpected releases, advisories, and compromised publication credentials.
  7. Run the MCP server with least privilege, restricting filesystem access, environment variables, credentials, and outbound network destinations to those required for its documented function.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

The skill launches an MCP server via npx -y @guava-tech/doc-mcp without pinning an exact package version, so each invocation may install and execute whatever code is currently published under that package name. This creates a supply-chain risk: a malicious update, compromised maintainer account, or unexpected breaking release could lead to arbitrary code execution in the agent environment.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.