T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:13
- Finding
- Unpinned npm Dependency Creates Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md`, lines 13-15 **Vulnerability Type**: Unpinned third-party package dependency **Risk Level**: Medium **Vulnerable Code:** ```yaml install: npm: - "@sardis/sdk" ``` ### Technical Analysis The skill declares `@sardis/sdk` without an exact version or integrity hash. Consequently, installation may resolve to a future package release whose contents were not included in this audit. npm packages can also execute lifecycle scripts during installation unless that capability is explicitly disabled. This does not establish that the current package is malicious. However, it creates a supply-chain exposure: compromise of the package publisher, registry account, package release process, or transitive dependency could cause users to install attacker-controlled code. ### Attack Path 1. An attacker compromises the npm publisher account, package release pipeline, or another relevant part of the dependency chain. 2. The attacker publishes a malicious release of `@sardis/sdk`, potentially including an npm lifecycle script or malicious runtime code. 3. A subsequent skill installation resolves the unpinned dependency to the malicious release. 4. npm installs the release and may execute its lifecycle scripts. 5. The malicious code executes with the permissions of the account performing the installation or later invoking the package. ### Impact Assessment Successful exploitation could permit arbitrary code execution under the installing user's privileges. Depending on that user's environment and permissions, the malicious package could access local files, environment variables such as `SARDIS_API_KEY`, network resources, and credentials available to the process. It could also modify project or user-owned files and compromise operations that later load the dependency. The audited project otherwise consists only of `SKILL.md`. No embedded scripts, credential harvesting, private- ...[truncated 117 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `@sardis/sdk` to an exact, reviewed version rather than a floating release: ```yaml install: npm: - "@sardis/sdk@<reviewed-exact-version>" ``` 2. Maintain and enforce a lockfile containing package integrity hashes. 3. Install dependencies only from an explicitly trusted npm registry. 4. Verify package provenance, signatures, and published integrity metadata where supported. 5. Use `npm ci` for reproducible installation when a lockfile is available. 6. Disable npm lifecycle scripts with `--ignore-scripts` where the package does not require them. 7. Audit the pinned package and its transitive dependency tree before updating. 8. Run installation and package execution with least privilege and restrict access to sensitive environment variables.
