T08 · Insecure Dependencies
- Location
SKILL.md:86- Finding
Unpinned Prisma CLI May Be Downloaded and Executed by npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:86
Vulnerability Type: Supply-chain exposure through unpinned dependency execution
Risk Level: MediumComplete Code Snippet:
bash npx prisma migrate diff --from-schema-datamodel prisma/schema.prisma --to-schema-datasource prisma/schema.prisma --script 2>/dev/nullTechnical Analysis
The skill directs the agent to execute
npx prismawithout specifying a package version or requiring a locally installed, lockfile-pinned Prisma CLI. Depending on the environment andnpxbehavior, if the package is unavailable locally,npxmay resolve, download, and execute it from the configured package registry.This introduces a supply-chain trust boundary into an otherwise local schema-analysis workflow. The effective executable may differ between audit runs, and its integrity is not established by the skill. Exploitation would require control over or compromise of the relevant package-distribution path, such as the configured registry, package publication, dependency resolution, or network path.
Attack Path
- A user invokes the Prisma schema analyzer and migration-safety workflow.
- The agent runs the documented
npx prisma migrate diffcommand. - The environment does not contain a suitable local Prisma executable.
npxresolves the unpinned package through the configured package registry.- A compromised, substituted, or unexpectedly changed package is downloaded.
- Package installation hooks or CLI code execute with the permissions of the agent or user running the audit.
Impact Assessment
Successfully substituted package code could execute arbitrary commands with the invoking process's privileges. Its accessible scope could include project files, environment variables, credentials available to the process, network resources, and any other resources permitted to that user account.
The skill itself does not request elevated privile ...[truncated 254 chars]
- Remediation
View remediation
Remediation Suggestions
-
Require Prisma to be declared at an exact or appropriately constrained version in the project's package manifest and resolved through a committed lockfile.
-
Prevent implicit downloads by invoking the existing local dependency with:
bash npx --no-install prisma migrate diff \ --from-schema-datamodel prisma/schema.prisma \ --to-schema-datasource prisma/schema.prisma \ --script -
Alternatively, use the package manager's local-only execution mechanism and fail safely when Prisma is not installed.
-
Install dependencies in a separate controlled step using lockfile-enforcing options such as
npm ci. -
Use a trusted registry and apply available package-integrity and provenance verification.
-
Run schema analysis in a least-privileged, sandboxed environment without unnecessary credentials or write access.
-
Avoid suppressing all standard error output during security-sensitive dependency resolution; preserve diagnostic output so missing local dependencies and resolution failures remain visible.
-
