T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:44
- Finding
- Unpinned Third-Party Packages Are Downloaded and Executed## Vulnerability Details **File Location**: `SKILL.md:44-49`, `SKILL.md:58`; `references/stack-setup.md:4-22`, `references/stack-setup.md:136-140` **Vulnerability Type**: Supply-chain exposure through mutable and unpinned dependencies **Risk Level**: Medium ### Vulnerable Code `SKILL.md:44-49`: ```bash npx create-next-app@latest my-app --typescript --tailwind --eslint --app cd my-app npx shadcn@latest init ``` `SKILL.md:58`: ```bash npx vercel --prod ``` `references/stack-setup.md:4-22`: ```bash # 1. Create Next.js app npx create-next-app@latest my-app --typescript --tailwind --eslint --app cd my-app # 2. shadcn/ui npx shadcn@latest init npx shadcn@latest add button input label card dialog form toast # 3. Prisma + Supabase npm install prisma @prisma/client @supabase/supabase-js npx prisma init # 4. Clerk auth npm install @clerk/nextjs # 5. Zustand + forms npm install zustand react-hook-form @hookform/resolvers zod # 6. Optional: Framer Motion npm install framer-motion ``` `references/stack-setup.md:136-140`: ```bash ## Deploy to Vercel ```bash npm install -g vercel vercel # preview deploy vercel --prod # production deploy ``` ### Technical Analysis Commands such as `npx create-next-app@latest` and `npx shadcn@latest` resolve mutable package releases at execution time and immediately run downloaded code. The remaining `npm install` commands also omit exact versions. Consequently, the effective code executed or installed by the Skill can change after the Skill itself has been reviewed. npm packages may execute lifecycle scripts during installation. If a referenced package, one of its transitive dependencies, or its publishing account is compromised, a malicious release can execute code with the permissions of the user or agent running these commands. Installing Vercel globally also modifies the user's global tool environment rather than confining the ...[truncated 1573 chars]
- Remediation
- ## Remediation Suggestions 1. Replace `@latest` with exact, reviewed package versions. 2. Pin all direct dependency versions and commit the generated lockfile. 3. Use `npm ci` for repeatable installation after the initial reviewed lockfile has been created. 4. Avoid global CLI installation. Add Vercel as a version-pinned development dependency and invoke the local binary. 5. Review transitive dependency changes before updating the lockfile. 6. Verify package provenance, registry source, integrity metadata, and publisher identity. 7. Run scaffolding and installation in an isolated, least-privileged environment without production credentials. 8. Consider initially disabling lifecycle scripts with `npm install --ignore-scripts`, then explicitly allowing only reviewed scripts where operationally feasible. 9. Add automated dependency scanning and lockfile integrity checks to the generated project's CI workflow.
