T08 · Insecure Dependencies
- Location
SKILL.md:14- Finding
Unpinned Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 12-15; a second occurrence appears at lines 36-46
Vulnerability Type: Unpinned third-party package execution
Risk Level: MediumVulnerable Code
bash cd /Users/kendrick/projects/hauscout npx tsx scripts/collect.tsThe database inspection instructions similarly invoke the package without an explicit version:
bash cd /Users/kendrick/projects/hauscout npx tsx -e " import { neon } from '@neondatabase/serverless'; import { drizzle } from 'drizzle-orm/neon-http'; import * as schema from './src/db/schema'; // .env.local 로드 필요 const sql = neon(process.env.DATABASE_URL!); const db = drizzle(sql, { schema }); const all = await db.select().from(schema.listings); console.log(JSON.stringify(all, null, 2)); "Technical Analysis
The Skill invokes
tsxthroughnpxwithout specifying an exact version or requiring a verified, locally installed dependency. If a suitable local executable is unavailable,npxmay resolve and download a package from the configured npm registry. The resulting executable is then run with the current user's permissions.The command also executes
scripts/collect.tsfrom the external absolute directory/Users/kendrick/projects/hauscout. That script and its dependency metadata were not included in the audited artifact, so their integrity and behavior cannot be verified from this project.This creates a supply-chain boundary in which execution may depend on mutable registry content, local npm configuration, dependency resolution, and an unaudited external project directory.
Attack Path
- An attacker compromises or influences the npm registry, configured registry mirror, package-resolution configuration, or the relevant package distribution.
- Alternatively, an attacker with access to the external project modifies its dependency configuration or
scripts/collect.ts. - The agent follow ...[truncated 975 chars]
- Remediation
View remediation
Remediation Suggestions
- Declare
tsxas a project dependency at an exact, reviewed version and commit the package manifest and lockfile. - Install dependencies using a lockfile-enforcing command such as
npm cirather than permitting ad hoc package resolution. - Invoke the verified local executable through a package script, for example
npm run collect, instead of relying on an unversionednpxcommand. - Consider using
npx --no-install tsx ...ifnpxremains necessary, so execution fails rather than downloading a missing package. - Verify package integrity and provenance, use a trusted registry, and protect npm configuration from unauthorized modification.
- Include the referenced collection script, dependency manifests, and relevant source files within the auditable project boundary.
- Run the collector with a least-privileged account and provide only the environment variables and filesystem access required for the task.
- Replace the inline database command with a reviewed, version-controlled diagnostic script that limits output to necessary records and fields.
- Declare
