T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:16
- Finding
- Unpinned Third-Party npm Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:16-18` **Vulnerability Type**: Supply-chain risk from an unpinned dependency **Risk Level**: Medium ### Vulnerable Code ```yaml install: npm: - "@sardis/sdk" ``` ### Technical Analysis The Skill declares installation of `@sardis/sdk` without an exact version or integrity hash. Consequently, the package content installed in the future may differ from the content available when the Skill was audited. npm packages can define lifecycle scripts that execute during installation. If the package, its publishing account, or one of its transitive dependencies is compromised, a malicious release could execute code under the privileges of the user or agent installing the Skill. The package name appears consistent with the stated Sardis integration, and the audited file provides no evidence that it is currently malicious. The vulnerability is the mutable and unaudited dependency resolution process. ### Attack Path 1. An attacker compromises the npm publisher account, package distribution process, or a transitive dependency. 2. The attacker publishes a malicious version that satisfies the unspecified version selection. 3. A user or agent installs the Skill at a later time. 4. npm resolves the dependency to the malicious release. 5. Malicious package code or an npm lifecycle script executes during installation or when the SDK is imported. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the account performing installation. Depending on that account's permissions, an attacker could access environment variables such as `SARDIS_API_KEY`, read or modify accessible files, initiate network requests, alter the local development environment, or compromise wallet-management operations. The impact is limited by the privileges and sandboxing applied to the package installer, but a non-sandboxed installation could affect the entire user account. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin the SDK to a reviewed exact version, rather than using an unconstrained package reference: ```yaml install: npm: - "@sardis/sdk@1.2.3" ``` - Maintain a lockfile containing npm integrity hashes and verify it during installation. - Review the direct package and its transitive dependency tree before approving upgrades. - Use `npm ci` for reproducible installation where the hosting framework permits it. - Disable lifecycle scripts with `npm ci --ignore-scripts` when they are not required. - Install dependencies in a sandbox with minimal filesystem access and without sensitive environment variables. - Use package provenance verification, dependency scanning, and an allowlisted private registry or proxy where appropriate. ]]>
