Back to skill

Security audit

Code Formatter

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward code-formatting reference skill, with ordinary but unpinned package-install and formatter commands users should run carefully.

Before using the commands, prefer project-pinned dependencies, committed lockfiles, package scripts, and a sandbox or least-privileged environment when running formatters that can modify many files.

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

Unpinned Third-Party Package Installation and Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 17, 37, 51, 66, 85, 112, and 191
Vulnerability Type: Unpinned third-party dependencies
Risk Level: Medium

Vulnerable Code

bash
# SKILL.md:17
pip install black

# SKILL.md:37
pip install isort

# SKILL.md:51
pip install flake8

# SKILL.md:66
pip install ruff

# SKILL.md:85
npm install -D prettier

# SKILL.md:112
npm install -D eslint

# SKILL.md:191
npm install -D markdownlint-cli

Technical Analysis

The documented installation commands do not pin package versions or verify package integrity. Consequently, package managers resolve whichever compatible releases are available from their configured registries when the commands are run. The audited skill therefore cannot guarantee that the installed code is the same code that existed when the skill was reviewed.

Python packages may execute packaging or build-related code during installation, depending on their distribution format and build configuration. npm packages and transitive dependencies may define lifecycle scripts that execute during installation. Subsequent npx commands documented elsewhere in the file also execute the resolved npm package code.

No evidence shows that the named packages are malicious, misspelled, or currently compromised. The vulnerability is the unsafe, non-reproducible dependency acquisition pattern, which increases exposure to compromised releases, registry redirection, malicious transitive dependencies, and future supply-chain attacks.

Attack Path

  1. A user or AI Agent follows the installation guidance in SKILL.md.
  2. pip or npm contacts the registry configured in the local environment.
  3. Because no exact versions or integrity constraints are specified, the package manager resolves current package releases and their transitive dependencies.
  4. An attacker who has compromised an upstream release, dependency, maintainer account, reg ...[truncated 1122 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace unversioned package specifications with exact, reviewed versions.
  2. For Python, maintain a requirements or constraints file with cryptographic hashes and install it using hash enforcement, for example:
    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  3. For npm, declare exact development dependency versions in package.json, commit the generated lockfile, and use npm ci in automated or reproducible environments.
  4. Run npm installation with lifecycle scripts disabled when scripts are unnecessary:
    bash
    npm ci --ignore-scripts
    
    If a required package legitimately needs a lifecycle script, review that script before allowing it.
  5. Prefer project-local binaries invoked through package scripts rather than allowing npx to resolve software dynamically. If npx remains necessary, require an explicitly pinned version and prevent implicit installation.
  6. Configure pip and npm to use approved registries, validate TLS, and prevent untrusted registry overrides in automated environments.
  7. Review direct and transitive dependencies before updating pins. Use dependency scanning, provenance information, and package-manager audit tooling as supporting controls.
  8. Perform installations and formatter execution in a least-privileged container or sandbox without unnecessary credentials, sensitive filesystem mounts, or unrestricted network access.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (16)

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The skill instructs users to run npx prettier --write file.js without pinning a version. npx can fetch and execute the latest package from the registry at runtime, which creates a supply-chain risk if a malicious or compromised release is published or if behavior changes unexpectedly. In a documentation skill that users may copy-paste directly, this is a real exposure even though the content appears instructional rather than malicious.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

This example runs npx prettier --write src/ without a pinned version. Because npx may resolve and execute an unpinned package dynamically, users are exposed to remote code execution and integrity risks through the npm supply chain. The risk is amplified by the skill's how-to format, which encourages direct execution of the command.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The npx prettier --check file.js example is unpinned and may execute whatever package version npx resolves at the time of use. Even though this is a read/check operation from the user's perspective, package installation and execution still occur, so a compromised upstream package could run arbitrary code. As instructional content, this is a legitimate supply-chain weakness rather than a false positive.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

npx eslint --init executes an unpinned package from npm and may also pull additional dependencies during setup. That creates a supply-chain execution risk if upstream content is compromised, and initialization workflows are particularly sensitive because users expect broad project changes. The skill's documentation context makes accidental copy-paste likely.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The command npx eslint file.js is unpinned and can cause npx to download and execute an arbitrary current version from the registry. This exposes users to dependency compromise or unexpected tool behavior, which is a real issue in security-sensitive environments. Because this file is a quick-reference skill, the unsafe pattern is likely to be reused broadly.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

npx eslint src/ has the same unpinned execution risk as other npx examples. The package version and its transitive dependencies are not fixed in the command, so users may run unreviewed code from the npm ecosystem. This is a true positive despite the benign educational intent.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The fix command npx eslint --fix file.js is especially sensitive because it both executes downloaded code and modifies repository contents. If the resolved package is malicious or compromised, it could perform arbitrary actions beyond formatting fixes. The skill context increases practical risk because users may run it on trusted source trees without additional review.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

This JSON example uses npx prettier --write file.json without a version pin. Any unpinned npx execution can introduce supply-chain risk through package substitution, compromise, or breaking changes. The fact that this is a formatter does not remove the underlying code execution exposure.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

npx prettier --write *.json is unpinned and may execute a freshly fetched package version. Because the command targets multiple files, the blast radius of any malicious or broken formatter behavior is larger. In a documentation skill aimed at convenience, users may execute it verbatim, making the issue materially relevant.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The Markdown example npx prettier --write README.md is another unpinned remote execution path via npm. Although the intended task is formatting, npx still resolves and runs package code, so users inherit supply-chain risk from the registry at command time. This is a genuine vulnerability pattern in operational guidance.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

npx prettier --write docs/ is unpinned and executes external package code at runtime. Since it acts on a directory, a malicious or unstable resolved package could affect many files at once, increasing operational impact. The context is benign instructional material, but that also means the command is likely to be copied directly.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding

The command npx markdownlint README.md runs an unpinned package from npm. This exposes users to the same registry and dependency-chain execution risks seen in other npx examples, even though the tool is only intended for linting. The skill context makes the issue actionable because it presents the command as a quick reference.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding

npx markdownlint docs/ is unpinned and may fetch and execute the latest package dynamically. That creates a real supply-chain risk and can affect multiple files or CI workflows if adopted as-is. The documentation-style presentation increases the likelihood of direct use.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding

The fix command npx markdownlint --fix README.md combines unpinned package execution with automatic file modification. If the fetched tool version is compromised or simply incompatible, it can alter content unexpectedly while running arbitrary package code. This is therefore more than a theoretical false positive.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The quick-command table includes npx prettier --write file.js without a pinned version. Summary tables are particularly likely to be copied verbatim, so they can propagate unsafe patterns widely. The vulnerability is the same: dynamic execution of unpinned npm package code.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The Markdown quick-command entry npx prettier --write README.md is unpinned and carries runtime package-resolution risk from npm. Because it appears in a concise cheat-sheet section, users may adopt it without reading surrounding setup guidance. That makes the finding a true positive with practical exploitation potential via supply-chain compromise.

Content

No source excerpt is available for this finding.