T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:14
- Finding
- Unpinned Third-Party Package and Remote Component Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 14-16 **Vulnerability Type**: Unpinned third-party dependency and mutable remote component installation **Risk Level**: Medium ### Vulnerable Code ```bash npx shadcn@latest add https://ui.inference.sh/r/widgets.json ``` ### Technical Analysis The documented command invokes `npx` with the mutable `shadcn@latest` package tag and retrieves component definitions from an external URL. `npx` can download and execute a package when the requested version is not already available locally. The `latest` tag does not identify an immutable, previously audited release. The component registry URL is also mutable and is not accompanied by a cryptographic checksum, signed release, fixed commit identifier, or other integrity control. Consequently, the code installed by this command can differ from the code reviewed when the Skill was published. This is a supply-chain weakness rather than evidence that the current upstream package or component is malicious. Exploitation requires compromise or malicious modification of the package, package-publishing account, registry service, DNS or delivery infrastructure, or another trusted upstream source. ### Attack Path 1. An attacker compromises an upstream package publisher, the remote component registry, or its delivery infrastructure. 2. The attacker publishes a malicious package as the version referenced by `latest`, or modifies the response returned by `https://ui.inference.sh/r/widgets.json`. 3. A user follows the Skill documentation and executes the command. 4. `npx` downloads and runs the mutable package, which then retrieves and installs the remote component. 5. Attacker-controlled installation logic or generated source code executes immediately or later during development, build, or application runtime. ### Impact Assessment Successful exploitation could execute code with the privileges of the developer running `npx`. Depending on that account's access and the ...[truncated 513 chars]
- Remediation
- ## Remediation Suggestions - Replace `shadcn@latest` with an exact, reviewed package version. - Pin the remote component to an immutable, versioned artifact rather than a mutable registry endpoint. - Publish and verify a SHA-256 or stronger cryptographic checksum before integrating downloaded content. - Prefer signed releases and verify package provenance or signatures where supported. - Download and review generated component code before executing builds or committing it to the project. - Use lockfiles, trusted package registries, and restricted installation environments. - Run installation with a minimally privileged account and without unnecessary credentials in the environment. - Add dependency and generated-code scanning to CI before release.
