T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:193
- Finding
- Unpinned Package Execution Through npx## Vulnerability Details **File Location**: `SKILL.md:193` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium **Vulnerable Code Snippet**: ```markdown - Run `npx svelte-check` for type errors, a11y warnings, and unused CSS ``` ### Technical Analysis The Skill recommends invoking `svelte-check` through `npx` without specifying a version or requiring use of a locally installed, lockfile-pinned dependency. If the package is unavailable locally, `npx` may resolve it from the configured package registry and execute the retrieved package code. This creates a mutable supply-chain execution path: the code executed during an audit may differ from the code reviewed when the Skill was published. The risk exceeds the minimum privileges required for the Skill's otherwise read-only static analysis because package installation and lifecycle execution can run arbitrary third-party code under the invoking user's account. This instruction does not itself exfiltrate source code or secrets. The separately flagged searches for private environment imports only inspect local files and print results locally. ### Attack Path 1. An Agent or user follows the recommendation and runs `npx svelte-check`. 2. No trusted local installation of `svelte-check` is available, or package resolution is influenced by the configured registry. 3. `npx` retrieves an unpinned package release and its dependency graph. 4. A compromised package version, transitive dependency, registry, or package lifecycle script executes locally. 5. The malicious code runs with the privileges of the Agent or user performing the audit and can access resources available to that account. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the invoking user's privileges. Depending on the surrounding environment, this may expose project source code, environment variables, credentials, local files, and network-access ...[truncated 368 chars]
- Remediation
- ## Remediation Suggestions - Require `svelte-check` to be declared at an audited, exact version in the project's development dependencies and committed lockfile. - Execute only the verified local dependency, preferably without network fallback, for example: ```bash npm exec --offline -- svelte-check ``` - Before execution, verify that the package is present in the lockfile and was obtained from an approved registry. - If installation is necessary, pin an exact reviewed version rather than resolving the latest release: ```bash npm install --save-dev --save-exact svelte-check@<reviewed-version> ``` - Use lockfile integrity verification, a trusted registry, dependency scanning, and restricted execution environments. - Run auditing tools with minimal filesystem and network permissions and without access to unrelated credentials or secrets.
