T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:72- Finding
Automatic Retrieval and Execution of Mutable Remote Code
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:72-103,SKILL.md:133-212,SKILL.md:357-365
Vulnerability Type: Mutable remote payload retrieval followed by dependency installation and execution
Risk Level: CriticalVulnerable Code
bash # SKILL.md:72-103 cd ~/projects/OpenClaw-bot-review git fetch origin main 2>/dev/null LOCAL=$(git rev-parse HEAD 2>/dev/null) REMOTE=$(git rev-parse origin/main 2>/dev/null) if [ "$LOCAL" != "$REMOTE" ]; then echo "update_available" else echo "up_to_date" fitext If update available: - Inform user: "检测到新版本,正在更新..." - Pull latest code: `git pull origin main` - Reinstall dependencies: `npm install` - Continue to Step 5 (start service)bash # SKILL.md:133-160 # macOS/Linux mkdir -p ~/projects cd ~/projects git clone https://github.com/xmanrui/OpenClaw-bot-review.git # Windows (PowerShell) New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\projects" cd "$env:USERPROFILE\projects" git clone https://github.com/xmanrui/OpenClaw-bot-review.gitbash mkdir -p ~/projects cd ~/projects curl -L https://github.com/xmanrui/OpenClaw-bot-review/archive/refs/heads/main.zip -o openclaw-dashboard.zip unzip openclaw-dashboard.zip mv OpenClaw-bot-review-main OpenClaw-bot-review rm openclaw-dashboard.zippowershell New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\projects" cd "$env:USERPROFILE\projects" Invoke-WebRequest -Uri "https://github.com/xmanrui/OpenClaw-bot-review/archive/refs/heads/main.zip" -OutFile "openclaw-dashboard.zip" Expand-Archive -Path "openclaw-dashboard.zip" -DestinationPath "." Rename-Item -Path "OpenClaw-bot-review-main" -NewName "OpenClaw-bot-review" Remove-Item "openclaw-dashboard.zip"bash # SKILL.md:183-212 cd ~/projects/OpenClaw-bot-review npm install cd ~/projects/OpenClaw-bot-review npm run dev > /dev/null 2 ...[truncated 2228 chars]- Remediation
View remediation
Remediation Suggestions
- Bundle the reviewed dashboard implementation with the Skill instead of retrieving executable code at runtime.
- If remote retrieval is unavoidable, pin an immutable Git commit rather than
main. - Publish and verify a trusted SHA-256 digest or cryptographic signature before extraction or execution.
- Commit and enforce a reviewed lockfile, and use
npm cirather than unconstrainednpm install. - Use
npm ci --ignore-scriptsunless lifecycle scripts have been individually audited and are strictly required. - Display the source revision and request explicit user approval before downloading, updating, installing dependencies, or executing code.
- Run the dashboard in a sandbox with read-only filesystem access, restricted network access, and access only to explicitly required configuration fields.
- Do not automatically update previously reviewed installations to an unreviewed upstream revision.
