T08 · Insecure Dependencies
- Location
scripts/fix-whatsapp-428.sh:43- Finding
Unpinned npm Dependency Installation at Runtime
- Content
View full analysis
Vulnerability Details
File Location:
scripts/fix-whatsapp-428.sh, lines 43–45
Vulnerability Type: Supply-chain exposure through an unpinned runtime dependency
Risk Level: Mediumbash # 3. Install https-proxy-agent echo "[3/7] Installing https-proxy-agent..." cd "$OPENCLAW_DIR" npm list https-proxy-agent >/dev/null 2>&1 || npm install https-proxy-agent --saveTechnical Analysis
The script installs
https-proxy-agentfrom the npm registry without specifying an exact version, enforcing a lockfile, validating package integrity, disabling lifecycle scripts, or confirming the registry from which the package will be retrieved.As a result, the code installed by the script can change after the Skill has been reviewed. The effective dependency source may also be influenced by the user's npm configuration. npm installation can execute package lifecycle scripts, so a compromised package release, registry account, registry mirror, or local npm configuration could result in arbitrary code execution.
Attack Path
https-proxy-agentis absent from the target OpenClaw installation.- An attacker compromises the relevant package release, registry account, configured registry, or registry mirror.
- The user invokes
fix-whatsapp-428.sh. - The
npm listcommand fails because the package is absent. - The script executes
npm install https-proxy-agent --save, resolving a mutable package version from the configured registry. - Malicious lifecycle code may execute during installation, or malicious package code may execute when OpenClaw imports the dependency.
Impact Assessment
Exploitation could execute arbitrary code with the permissions of the user running the repair script. The attacker could modify the global OpenClaw installation, access data available to that user, alter OpenClaw runtime behavior, or establish additional user-level persistence. This script does not invoke
sudo...[truncated 96 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
https-proxy-agentto a reviewed exact version. - Maintain and enforce a lockfile with integrity hashes.
- Use a controlled installation process such as
npm ciinstead of resolving dependencies dynamically on the target system. - Use
--ignore-scriptswhen package lifecycle scripts are not required. - Validate that npm is using an approved HTTPS registry before installing anything.
- Prefer including this dependency during a controlled OpenClaw build or deployment rather than modifying a deployed global installation.
- Verify the installed package version and integrity before restarting OpenClaw.
- Pin
