T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:8
- Finding
- Global Installation of an Unpinned, Unaudited Third-Party npm Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:8` and `SKILL.md:89` **Vulnerability Type**: Supply-chain exposure through an unpinned global dependency **Risk Level**: Medium ### Vulnerable Code At `SKILL.md:8`, the metadata instructs OpenClaw to install the package globally: ```yaml metadata: {"openclaw":{"requires":{"env":["PERSTUDIO_API_KEY"],"config":["plugins.entries.perstudio.config.apiKey"]},"primaryEnv":"PERSTUDIO_API_KEY","install":[{"id":"npm","kind":"node","package":"perstudio-openclaw","global":true,"label":"Install perstudio-openclaw"}],"emoji":"🎨"}} ``` The same global installation is explicitly documented at `SKILL.md:89`: ```bash npm install -g perstudio-openclaw ``` ### Technical Analysis The Skill instructs users or the OpenClaw environment to install `perstudio-openclaw` from the npm registry without an exact version, lockfile, or integrity hash. The package is also installed globally rather than being isolated as a project-local dependency. Because the audited artifact contains only `SKILL.md`, the package's source code, transitive dependencies, lifecycle scripts, and correspondence with the referenced GitHub repository cannot be verified. npm packages may execute lifecycle scripts during installation. An unpinned package reference resolves to whatever release the registry currently serves, allowing the effective installed code to change after this Skill has been reviewed. Global installation expands exposure by making the executable available outside an isolated project directory. It does not by itself grant elevated privileges, but package installation scripts execute with the privileges of the account performing the installation. If installation is performed by an administrator or through a privileged automation service, the potential impact increases accordingly. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, or a dependency used by `perstudio-openclaw`. 2. The ...[truncated 1543 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a reviewed exact version instead of resolving the mutable latest release: ```bash npm install --save-exact perstudio-openclaw@3.2.1 ``` 2. Verify the selected package version and record its registry integrity hash in a lockfile or equivalent trusted installation manifest. 3. Include the plugin source, manifest, lockfile, and relevant build artifacts in the audited project so its implementation and transitive dependencies can be reviewed. 4. Prefer a project-local installation over a global installation and invoke the package through an explicitly controlled path. 5. Run installation and execution as a dedicated, least-privileged user without unnecessary access to credentials or sensitive files. 6. Review npm lifecycle scripts before installation and disable them with `--ignore-scripts` when they are not required. 7. Use dependency scanning, package provenance verification, and publisher-account protections such as multi-factor authentication and trusted publishing. 8. Ensure the referenced npm release is verifiably built from the stated source repository and reviewed commit. ]]>
