Back to skill

Security audit

Codebase Migration Planner

Security checks for vulnerabilities and agentic risk

Overview

This skill is a code migration planning helper with disclosed repository analysis and planning guidance, but users should review any suggested codemod commands before running them.

Install only if you want repository-level migration planning. Before running any suggested npx, gogocode, or codemod command, pin versions, review the package source, use a clean git checkpoint, and inspect all generated changes before committing.

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:174
Finding
Unpinned Third-Party Migration Tools Enable Supply-Chain Code Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 174–197 **Vulnerability Type**: Unpinned third-party executable dependencies **Risk Level**: Medium ### Vulnerable Code ```bash echo " - npx @codemod/cli --transform react/19/migration" echo " - npx react-codemod rename-unsafe-lifecycles" echo " - npx react-codemod update-react-imports" ``` ```bash echo " - npx ts-migrate setup ." echo " - npx @codemod/cli --transform js-to-ts" ``` ```bash echo " - npx @vue/compat" echo " - gogocode-cli -s ./src -t vue2-to-vue3 -o ./src" ``` ### Technical Analysis The skill recommends executing third-party migration utilities without pinning reviewed versions or requiring lockfile and integrity verification. In particular, `npx` can download and execute the current package-registry release, including package CLI and lifecycle code, when the package is not already installed locally. The effective code therefore may differ from the code that existed when this skill was reviewed. A compromised maintainer account, malicious package release, dependency compromise, or unexpected upstream change could cause arbitrary code to execute under the invoking user's account. The listed commands are emitted as recommendations rather than executed automatically by this skill, which reduces the immediacy of exploitation. Exploitation nevertheless becomes possible when a user or automation agent follows the generated recommendation. ### Attack Path 1. A user requests codemod recommendations for a supported migration. 2. The skill emits one of the unpinned `npx` or `gogocode-cli` commands. 3. The user or an automation agent executes the recommended command. 4. The package manager resolves mutable third-party registry content without enforcing a reviewed version and integrity baseline. 5. A compromised or malicious package, version, or transitive dependency executes with the user's local privileges. 6. The executed code can access and alter files and credentials availabl ...[truncated 752 chars]
Remediation
## Remediation Suggestions 1. Pin every recommended package to a specifically reviewed version, for example `package@x.y.z`. 2. Add approved tools to project development dependencies and commit the package-manager lockfile. 3. Invoke only locked, locally installed binaries; where appropriate, use `npx --no-install` to prevent implicit downloads. 4. Use a trusted registry and enforce package integrity, provenance, and signature checks where supported. 5. Review each tool and its transitive dependency graph before approval. 6. Run codemods in an isolated environment with minimal filesystem permissions, no unnecessary credentials, and restricted network access. 7. Require explicit user confirmation before downloading or executing any third-party migration tool. 8. Create a clean version-control checkpoint before execution and review all resulting changes before commit.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Vague Triggers

Medium
Confidence
92% confidence
Finding
The 'Use when' line includes generic phrases like 'plan a migration' and 'migrate from X to Y' plus a broad catch-all of 'planning a major framework/language change.' In a markdown skill description, this lacks negative examples or explicit constraints, so the activation scope may collide with ordinary discussion about migrations rather than intentional invocation of this skill.

Intent-Code Divergence

Medium
Confidence
91% confidence
Finding
The skill states it 'does not execute migrations,' but the `codemods` section contains concrete executable commands that perform or initiate repository modifications. This mismatch can mislead users or orchestrating agents into treating the skill as read-only when it actually includes mutation-capable guidance, weakening trust boundaries and safety controls.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The skill recommends running `npx @codemod/cli` without pinning an exact version, which allows whatever package version is current at execution time to be fetched and executed. In an agent skill context, this creates a supply-chain risk and undermines reproducibility, especially because `npx` executes remote package code directly.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The unpinned `npx react-codemod` command pulls and executes the latest published package version at runtime. That exposes users to dependency hijacking, malicious package updates, or unexpected behavioral changes in a tool that can rewrite source code across the repository.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
This second `npx react-codemod` invocation has the same risk profile: it executes an unpinned external package capable of mass code modification. In a skill file, presenting it as a recommended action increases the chance an agent or user will run it without understanding the supply-chain and integrity implications.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
`npx ts-migrate setup .` runs an unpinned package that can modify many files in place, while also depending on the current state of the upstream package registry. This creates both code-execution and code-integrity risk, since a compromised or breaking release could affect the entire repository.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The second `@codemod/cli` example is also unpinned and executable, so it carries the same supply-chain and reproducibility risks. Because codemods alter code automatically, the danger is greater than a read-only helper command: a malicious or incompatible release could silently introduce harmful changes at scale.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
`npx @vue/compat` is presented without version pinning, so execution would depend on the latest published package state rather than a reviewed, deterministic version. Although the exact command shown is less obviously a direct file rewrite than some other codemods, it still executes remote code and can influence migration outcomes unpredictably.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill advises updating a `MIGRATION.md` tracking file but does not provide a clear user-facing notice that repository files may be created or modified. In agent contexts, undocumented file mutation can violate user expectations and lead to unauthorized workspace changes, even if the target file is non-executable documentation.

Static analysis

No suspicious patterns detected.