T08 · Insecure Dependencies
- Location
README.md:43- Finding
Unverified Third-Party Archive and Runtime Dependency Installation
- Content
View full analysis
/dev/null; then echo -e "${RED}✗ 需要 Python3${NC}" exit 1 fi if ! python3 -c "import psutil" 2>/dev/null; then echo -e "${YELLOW}⚠ 安装依赖: pip install psutil${NC}" pip install psutil -q fi } ``` ### Technical Analysis The installation instructions retrieve a release archive from a personal GitHub repository and install it without validating a cryptographic hash or signature. The archive's shell scripts are subsequently made executable. Consequently, the code ultimately executed by the user is determined by the remote release asset rather than solely by the audited project content. There is also a source inconsistency: the README references `github.com/zhmza/openclaw-optimize`, while `SKILL.md` documents `github.com/openclaw/openclaw-optimize`. This ambiguity makes it harder for users to identify the authoritative source. The wrapper performs `pip install psutil` if the import is unavailable. The dependency has no exact version constraint, lock file, or hash, and installation occurs as a side effect of invoking the Skill rather than during a controlled installation phase. Although `psutil` is a legitimate package, this pattern unnecessarily exposes executio ...[truncated 1159 chars]- Remediation
View remediation
openclaw-optimize-v2.0.0.tar.gz" | sha256sum --check - ``` 3. Prefer signed release artifacts and verify signatures against a documented maintainer key. 4. Download with failure-safe options such as `curl --fail --location --proto '=https'`. 5. Inspect archive paths before extraction and reject absolute paths or `..` traversal entries. 6. Pin Python dependencies to reviewed versions and hashes in a requirements or lock file: ```text psutil== --hash=sha256: ``` 7. Remove implicit `pip install` behavior from runtime commands. If a dependency is missing, exit with a clear installation instruction. 8. Explicitly advise users not to install or run the Skill as root. ]]>
