T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:14
- Finding
- Unpinned npx Package Execution May Introduce Supply-Chain Code Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 14-29 **Vulnerability Type**: Unpinned third-party package execution through `npx` **Risk Level**: Medium ### Vulnerable Code ```bash cd /Users/kendrick/projects/hauscout && npx tsx scripts/collect.ts ``` ```bash cd /Users/kendrick/projects/hauscout && npx tsx scripts/collect.ts --url "<housesigma_url>" ``` ```bash cd /Users/kendrick/projects/hauscout && npx tsx scripts/collect.ts --profile <id> ``` ```bash cd /Users/kendrick/projects/hauscout && npx tsx scripts/collect.ts --headed ``` ### Technical Analysis The documented commands execute `tsx` through `npx` without specifying a package version or using `--no-install`. If a trusted, locally installed `tsx` binary is unavailable, `npx` may resolve, download, and execute package content from the configured package registry. The referenced Hauscout project and its dependency metadata are outside the audited artifact, which contains only `SKILL.md`. Consequently, the audit could not verify that `tsx` is pinned by a lockfile, installed from a trusted registry, or protected by integrity controls. Package initialization or runtime code executes with the privileges of the user running the Skill. This is a supply-chain weakness rather than evidence that the current `tsx` package is malicious. Exploitation requires the resolved dependency or configured registry to be compromised, substituted, or otherwise attacker-controlled. ### Attack Path 1. An agent or user follows one of the documented collection commands. 2. `npx` searches for a locally installed `tsx` executable. 3. If the executable is unavailable, `npx` resolves the unpinned package through the configured registry. 4. An attacker who has compromised the package, registry, dependency-resolution path, or local package configuration supplies malicious package content. 5. `npx` downloads and executes ...[truncated 984 chars]
- Remediation
- ## Remediation Suggestions 1. Add `tsx` as an explicit development dependency in the Hauscout project and pin it through a committed lockfile. 2. Install dependencies using a lockfile-enforcing command such as: ```bash npm ci ``` 3. Prevent `npx` from downloading missing packages at execution time: ```bash npx --no-install tsx scripts/collect.ts ``` 4. Prefer a lockfile-backed package script, for example: ```json { "scripts": { "collect": "tsx scripts/collect.ts" } } ``` Then invoke it with: ```bash npm run collect ``` 5. Configure an approved package registry and retain package-integrity metadata in the lockfile. 6. Run dependency auditing and update review processes before accepting new versions. 7. Execute collection under a least-privileged account with only the filesystem, database, network, and repository permissions required for the task. 8. Avoid exposing unrelated secrets or broadly privileged Git credentials to the collection process.
