Back to skill

Security audit

宽数题库

Security checks for vulnerabilities and agentic risk

Overview

The skill is a straightforward project guide, but it documents a one-command production Vercel deployment using an unpinned CLI without an explicit safety check.

Review the repository and build output before using this skill to deploy. Prefer `npm ci` with a lockfile, pin the Vercel CLI version, confirm the Vercel account/project, run a preview deployment first, and avoid `--yes` for production unless a human has approved the release.

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:56
Finding

Unpinned npm and npx Dependencies May Execute Unverified Registry Code

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 56–60 and 93–98
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Vulnerable Code

bash
npm install
bash
npx vercel whoami
npx vercel deploy dist --prod --yes

Technical Analysis

The documented workflow instructs users or agents to install npm dependencies and invoke the Vercel CLI without specifying an audited version. The reviewed artifact contains only SKILL.md; it does not provide package metadata or a lockfile that would allow the installed dependency graph to be verified.

npm install may execute package lifecycle scripts from the resolved dependency graph. In addition, an unversioned npx vercel invocation can download and execute the version currently selected by the npm registry when the CLI is not already available locally. This makes the effective executable code mutable after the skill has been reviewed.

The deployment command also combines this dependency risk with a non-interactive production operation through --prod --yes. Although production deployment is explicitly documented rather than hidden, executing a mutable CLI with existing Vercel credentials increases the potential impact of a compromised or unexpectedly changed package.

Attack Path

  1. A user or agent follows the workflow in SKILL.md.
  2. npm install resolves dependencies whose manifests and lockfile are not included in the reviewed artifact, or npx vercel obtains an unpinned CLI release from the npm registry.
  3. A compromised, substituted, or unexpectedly changed package executes through an npm lifecycle script or the CLI entry point.
  4. The package runs with the privileges and environment of the invoking account.
  5. It may access files, environment variables, npm configuration, or deployment credentials available to that account.
  6. In the deployment workflow, the package could alter deployment behavior or pub ...[truncated 832 chars]
Remediation
View remediation

Remediation Suggestions

  1. Include the relevant package.json and lockfile in the reviewable project package.
  2. Replace npm install with npm ci so installation is constrained to the committed lockfile.
  3. Pin the Vercel CLI to an exact, audited version, for example:
    bash
    npx --yes vercel@<audited-exact-version> whoami
    npx --yes vercel@<audited-exact-version> deploy dist --prod --yes
    
  4. Prefer installing the pinned CLI as a development dependency and invoking it through a locked npm script.
  5. Review package lifecycle scripts and use npm ci --ignore-scripts where lifecycle execution is unnecessary.
  6. Verify registry configuration and package integrity before installation.
  7. Require explicit human confirmation immediately before any production deployment rather than presenting unattended production deployment as a routine command.
  8. Use narrowly scoped Vercel credentials and isolate deployment execution in a restricted CI environment without unrelated secrets.
  9. Validate the contents of dist and record the expected deployment target before invoking the production command.
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 (3)

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill presents a production deployment command with --prod --yes and no cautionary note, making it easy for a user or agent to push a live update without an intentional confirmation step. In an agent skill context, operational commands are especially sensitive because users may copy or automate them directly, increasing the chance of accidental production changes, outages, or publication of unreviewed content.

Content

No source excerpt is available for this finding.