T03 · Remote Payload Retrieval and Execution
- Location
scripts/manage.py:204- Finding
Unverified Remote Plugin Bundle Can Be Installed and Executed
- Content
View full analysis
/assets/skill-sediment-ext.tar.gz.\n" " If the bundled tarball is lost, set SKILL_SEDIMENT_CDN= to point at a fallback download." ) return False log(f"Downloading plugin bundle from CDN... ({CDN_PLUGIN_TARGZ[:60]}...)") try: req = urllib.request.Request( CDN_PLUGIN_TARGZ, headers={"User-Agent": "skill-sediment-installer"} ) with urllib.request.urlopen(req, timeout=60) as resp, open( dest_targz, "wb" ) as f: shutil.copyfileobj(resp, f) except Exception as e: err(f"Download failed: {e}") return False if EXPECTED_SHA256: import hashlib h = hashlib.sha256(Path(dest_targz).read_bytes()).hexdigest() if h != EXPECTED_SHA256: err(f"sha256 mismatch: expected {EXPECTED_SHA256}, got {h}") return False ok("sha256 verified") ok(f"Plugin bundle downloaded: {dest_targz}") return True ``` The downloaded archive subsequently enters the installation path: ```python # Path 4: CDN EXTENSION_DIR.mkdir(parents=True, exist_ok=True) if not download_plugin(targz): return False return extract_plugin(targz) ``` The installed extension can then be activated by restarting the gateway: ```python if args.auto_restart: log("Triggering gateway restart...") try: subprocess.run(["openclaw", "gateway", "restart"], timeout=60) ``` ### Technical Analysis When the bundled plugin source is unava ...[truncated 2286 chars]- Remediation
View remediation
