T03 · Remote Payload Retrieval and Execution
- Location
scripts/guanshi-init.py:659- Finding
Unpinned Remote Skill Retrieval and Installation Without Integrity Verification
- Content
View full analysis
100: target_dir = Path(skills_base) / slug target_dir.mkdir(parents=True, exist_ok=True) with zipfile.ZipFile(io.BytesIO(zip_data)) as zf: zf.extractall(target_dir) subdirs = [d for d in target_dir.iterdir() if d.is_dir()] if len(subdirs) == 1 and subdirs[0].name == slug: nested = subdirs[0] for item in nested.iterdir(): dest = target_dir / item.name if dest.exists(): import shutil shutil.rmtree(dest) if dest.is_dir() else dest.unlink() item.rename(dest) nested.rmdir() if (target_dir / "SKILL.md").exists(): print("✅ 成功(从 ClawHub 下载)") installed.append(slug) installed_ok = True ``` ### Technical Analysis The initialization script retrieves Skill packages from a remote API using only a mutable slug. It does not constrain the download to an exact version or verify an expected cryptographic digest, trusted signature, package manifest, publisher identity, archive size ...[truncated 2565 chars]- Remediation
View remediation
