T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:188
- Finding
- Unpinned Package Retrieval and Execution Through npx<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:188` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium **Vulnerable Code**: ```markdown - Run `npx vue-tsc --noEmit` to type-check all SFC files including template expressions ``` ### Technical Analysis The skill recommends running `npx vue-tsc --noEmit` without requiring a locally installed, lockfile-pinned version of `vue-tsc`. If the executable is unavailable in the project, `npx` may retrieve the package from the configured package registry and execute it. Because neither a version nor an integrity-verified lockfile installation is required, the effective package code can change after this skill has been reviewed. Package lifecycle scripts and the resulting executable run with the permissions of the user executing the agent. This creates a supply-chain exposure if the registry, package, dependency chain, or registry configuration is compromised. The audited skill does not contain a malicious payload, and exploitation depends on the command being followed in an environment where a trusted local executable is unavailable. ### Attack Path 1. An agent follows the recommendation in `SKILL.md` and invokes `npx vue-tsc --noEmit`. 2. The target project does not contain a trusted local installation of `vue-tsc`, or package resolution is redirected through an attacker-controlled or compromised registry. 3. `npx` downloads the unresolved package and its dependency graph from the configured registry. 4. Package installation scripts or the downloaded executable run under the agent user's account. 5. Malicious package code accesses files and credentials available to that account, modifies the workspace, or initiates outbound communications. ### Impact Assessment Successful exploitation grants code execution with the privileges of the user running `npx`. The accessible scope can include the audited project, other files readable or writable by that user, environment variables, pa ...[truncated 402 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Add an approved, exact version of `vue-tsc` to the project's development dependencies and commit the package lockfile. 2. Install dependencies using a deterministic, integrity-checked operation such as `npm ci`. 3. Invoke only the lockfile-installed executable. For example: ```bash npm ci npm exec --offline -- vue-tsc --noEmit ``` 4. Configure an approved package registry and enforce lockfile integrity in CI. 5. Disable dependency lifecycle scripts where compatible with the project: ```bash npm ci --ignore-scripts ``` 6. Run type checking in a restricted container or sandbox with minimal filesystem access, no unnecessary credentials, and controlled outbound network access. 7. Update the skill text to prohibit automatic package downloads and to fail safely when the pinned local tool is unavailable. ]]>
