T03 · Remote Payload Retrieval and Execution
Error
- Location
- scripts/install.sh:4
- Finding
- Mutable Remote Application and Dependencies Are Executed Without Integrity Pinning<![CDATA[ ## Vulnerability Details **File Location**: `scripts/install.sh:4-37` **Vulnerability Type**: Remote payload retrieval and unsafe dependency installation **Risk Level**: High ### Vulnerable Code ```bash REPO_URL="https://github.com/EasonC13-agent/lulu-monitor.git" INSTALL_DIR="$HOME/.openclaw/lulu-monitor" PLIST_NAME="com.openclaw.lulu-monitor.plist" LAUNCH_AGENTS="$HOME/Library/LaunchAgents" echo "🚀 Installing LuLu Monitor..." echo "" # Check prerequisites first SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" if [ -f "$SCRIPT_DIR/check-prerequisites.sh" ]; then bash "$SCRIPT_DIR/check-prerequisites.sh" || { echo "" echo "❌ Prerequisites check failed. Please resolve the issues above." exit 1 } fi echo "" echo "📦 Cloning repository..." if [ -d "$INSTALL_DIR" ]; then echo " Directory exists, pulling latest..." cd "$INSTALL_DIR" git pull origin main else git clone "$REPO_URL" "$INSTALL_DIR" cd "$INSTALL_DIR" fi echo "" echo "📥 Installing dependencies..." npm install --production ``` ### Technical Analysis The reviewed package does not contain the application referenced by the generated service, including `src/index.js`, `package.json`, or a dependency lockfile. Instead, the installer obtains the effective application from the mutable `main` branch of an external GitHub repository. Neither a commit hash nor a cryptographic digest is verified. Consequently, the code executed by two installations can differ even though the reviewed Skill package remains unchanged. A repository compromise, malicious upstream update, account takeover, or force-push can replace the effective payload after review. The subsequent `npm install --production` also permits npm dependency lifecycle scripts to execute during installation. The audited artifact provides no lockfile or dependency metadata with which to verify versions or integrity. The audit therefore cannot establish what packages or lifecycle scripts will ex ...[truncated 1169 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Include every locally executed application source file and dependency manifest in the reviewed Skill package. 2. If an external repository is necessary, check out a reviewed immutable commit hash rather than `main`. 3. Verify a cryptographic digest or signed release before executing downloaded content. 4. Commit a dependency lockfile and use `npm ci` instead of unconstrained `npm install`. 5. Use `npm ci --ignore-scripts` where lifecycle scripts are unnecessary. If scripts are required, audit and explicitly allow each one. 6. Perform dependency provenance, vulnerability, and integrity checks before service registration. 7. Abort installation if the checked-out revision or package integrity differs from the reviewed values. ]]>
