T08 · Insecure Dependencies
- Location
scripts/create_openclaw_guide_full.py:134- Finding
Generated Guide Recommends Unpinned Package Installation with Elevated Privileges
- Content
View full analysis
Vulnerability Details
File Location:
scripts/create_openclaw_guide_full.py:134-161andscripts/create_openclaw_guide.py:88-103
Vulnerability Type: Unsafe third-party dependency installation guidance
Risk Level: MediumEvidence
python doc.add_paragraph('Windows users:') add_code_block(doc, 'npm install -g openclaw') doc.add_paragraph('Mac/Linux users:') add_code_block(doc, 'sudo npm install -g openclaw') steps = [ 'Clone the repository: git clone https://github.com/openclaw/openclaw.git', 'Enter the directory: cd openclaw', 'Install dependencies: npm install', 'Create a global link: npm link', 'Verify: openclaw --version' ] add_code_block(doc, 'npm config set registry https://registry.npmmirror.com') add_code_block(doc, 'sudo npm install -g openclaw')The equivalent unpinned global and elevated installation instructions also appear in the smaller generator:
python doc.add_paragraph('npm install -g openclaw', style='No Spacing') doc.add_paragraph('sudo npm install -g openclaw', style='No Spacing') steps = [ 'Clone the repository: git clone https://github.com/openclaw/openclaw.git', 'Enter the directory: cd openclaw', 'Install dependencies: npm install', 'Create a global link: npm link', 'Verify: openclaw --version' ]Technical Analysis
These scripts do not execute the commands directly; they embed them into generated Word guides. However, the guides recommend installing an unpinned npm package globally and, on macOS or Linux, running npm with
sudo. No exact version, lockfile, integrity hash, verified publisher identity, or package provenance check is specified.npm packages may execute lifecycle scripts during installation. Running such scripts through
sudo npm install -gcan give package code root-level execution. Changing the npm registry to a third-party mirror also changes the trust boundary without ...[truncated 1599 chars]- Remediation
View remediation
Remediation Suggestions
- Do not recommend running npm as root. Document a user-scoped installation method, a version manager, or a correctly permissioned npm prefix.
- Pin the package to a reviewed exact version, for example
openclaw@X.Y.Z, instead of resolving the latest release dynamically. - Require verification against an official package name, publisher, release signature, checksum, and authoritative project documentation.
- For source installations, pin a reviewed commit or signed release and use the lockfile-preserving command appropriate to the project, such as
npm ci. - Avoid recommending a third-party registry by default. If a mirror is necessary, explain its trust implications and provide a command to restore the official registry.
- Warn users that npm lifecycle scripts execute code during installation. Where supported, inspect packages before installation and initially install with lifecycle scripts disabled.
- Apply the same corrections to both guide generators so the shorter document cannot reintroduce the unsafe instructions.
