T08 · Insecure Dependencies
- Location
skill.md:34- Finding
Unpinned Remote Repository Clone Followed by Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
skill.md, lines 34–39
Vulnerability Type: Unpinned remote source and dependency installation
Risk Level: MediumVulnerable code snippet:
bash # Clone repository git clone https://github.com/ZhenRobotics/openclaw-news-publisher.git cd openclaw-news-publisher # Install dependencies npm installTechnical Analysis
The installation instructions clone the repository's mutable default branch without specifying a reviewed commit or signed release. They then execute
npm installwithout requiring a lockfile, integrity verification, or lifecycle-script restrictions.Consequently, the installed source and dependency graph can differ from the version reviewed during this audit. Moreover,
npm installmay automatically execute lifecycle scripts such aspreinstall,install, andpostinstall. If the remote repository, an npm maintainer account, or a transitive dependency is compromised, attacker-controlled code could execute during installation.The audited artifact only contains
skill.mdandreadme.md; it does not include the repository code, package manifest, or lockfile referenced by these instructions. Therefore, the safety of the remotely retrieved implementation and its dependencies cannot be verified from this artifact.Attack Path
- An attacker compromises the referenced GitHub repository, its default branch, a dependency maintainer, or the relevant package registry entry.
- The attacker adds malicious application code or an npm lifecycle script to the remote source or dependency graph.
- A user follows the documented installation procedure and clones the current, attacker-modified default branch.
- The user runs
npm install. - npm resolves the unverified dependency graph and may execute the malicious lifecycle script automatically.
- The payload runs with the operating-system permissions of the user performing the installatio ...[truncated 676 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin installation instructions to a specific reviewed commit hash or immutable, signed release tag rather than the mutable default branch.
- Publish and commit a dependency lockfile, and use
npm ciinstead ofnpm installto enforce the reviewed dependency graph. - Require verification of release signatures, commit signatures, or published checksums before installation.
- Pin direct and transitive dependency versions and retain npm integrity hashes in the lockfile.
- Audit dependencies with tools such as
npm audit, software composition analysis, and malware or provenance scanning before release. - Disable lifecycle scripts during initial dependency retrieval with
npm ci --ignore-scripts, then explicitly review and run only required build scripts. - Document installation in an isolated, least-privileged environment without production credentials.
- Include the actual implementation and dependency metadata in the reviewed skill package, or clearly disclose that remote code lies outside the audit boundary.
