T08 · Insecure Dependencies
- Location
scripts/build.sh:3- Finding
Unreviewed External npm Installation and Script Execution
- Content
View full analysis
Vulnerability Details
File Location:
scripts/build.sh, lines 3–5
Vulnerability Type: Insecure third-party dependency and build-script execution
Risk Level: Mediumbash cd /home/umbrel/.openclaw/workspace/deal-analyst/paragon-mls-mcp npm install npm run buildTechnical Analysis
The build script changes into an external project directory that is not part of the audited artifact and runs
npm install. This command may retrieve third-party packages and execute npm lifecycle hooks with the invoking user's privileges. It then executesnpm run build, whose command is defined by an externalpackage.jsonthat was unavailable for review.Consequently, the audited package does not provide enough information to verify the installed package names, versions, integrity constraints, lifecycle behavior, or build command. If the external dependency manifest, lockfile, registry-resolved package, or lifecycle script is compromised, arbitrary commands can run during the build.
The same unreviewed external project is referenced by
SKILL.mdlines 12–14 as the MCP server implementation:yaml command: node args: - /home/umbrel/.openclaw/workspace/deal-analyst/paragon-mls-mcp/dist/index.jsThis supporting observation means the runtime implementation and its network or data-handling behavior could not be verified from the artifact. It does not independently establish malicious behavior.
Attack Path
- An attacker compromises an npm dependency resolved by the external project, or modifies its
package.json, lockfile, lifecycle scripts, or build script. - A user or agent invokes
scripts/build.sh. - The script enters the external project directory without validating its provenance or contents.
npm installdownloads dependencies and may execute attacker-controlled lifecycle hooks.npm run buildexecutes the externally defined build command.- The attacker's commands run w ...[truncated 564 chars]
- An attacker compromises an npm dependency resolved by the external project, or modifies its
- Remediation
View remediation
Remediation Suggestions
- Include the required source,
package.json, and lockfile within the reviewed project boundary, or otherwise pin the external project's exact trusted revision. - Replace
npm installwithnpm ciand require a committed, reviewed lockfile to ensure reproducible dependency resolution. - Use
npm ci --ignore-scriptswhen lifecycle scripts are unnecessary. - If lifecycle scripts are required, audit and explicitly allow only the necessary scripts and dependencies.
- Pin dependencies to reviewed versions and verify package integrity and registry provenance.
- Avoid a hardcoded absolute path to an unreviewed mutable workspace. Resolve a validated project-relative location or verify the external directory and files cryptographically before use.
- Audit the externally defined build command and generated
dist/index.jsbefore executing them. - Run dependency installation and builds in a sandbox or container with minimal filesystem access, no unnecessary credentials, restricted network access, and a non-privileged account.
- Include the required source,
