T08 · Insecure Dependencies
- Location
scripts/verify_install.sh:8- Finding
Unpinned Third-Party Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
scripts/verify_install.sh:8-10
Additional Locations:SKILL.md:35,SKILL.md:41,SKILL.md:60;references/upstream-README.md:20-34;references/upstream-README.zh-CN.md:20-34
Vulnerability Type: Unpinned and unaudited dependency installation
Risk Level: MediumVulnerable Code:
bash source "$TMPDIR/venv/bin/activate" python3 -m pip install --upgrade pip >/dev/null python3 -m pip install clawpolicy >/dev/nullThe documentation also recommends:
bash python3 -m pip install clawpolicy python3 -m pip install "clawpolicy[phase3]"Technical Analysis
The verification script and installation documentation install
clawpolicywithout a version constraint or package hashes. Consequently, pip resolves whichever release is current at execution time rather than the release represented by the reviewed wrapper. The wrapper identifies itself as targeting version 3.0.1, but the installation command does not enforce that version.Python package installation can execute package build logic, and subsequent smoke-test commands execute the installed package directly. Its transitive dependencies are also resolved without integrity pinning. The optional
phase3extra expands this uncontrolled dependency set further.The
pipupgrade is likewise unpinned. Although installation occurs inside a temporary virtual environment, code executed during installation and smoke testing retains the invoking user's operating-system privileges and can access resources available to that user. The external package implementation is not included in this project, so its behavior could not be verified by this audit.Attack Path
- An attacker compromises the
clawpolicyPyPI project, one of its transitive dependencies, or a future package release. - The attacker publishes a malicious release that still satisfies the unconstrained package name.
- A user or ...[truncated 1243 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
-
Pin the reviewed package release explicitly:
bash python3 -m pip install "clawpolicy==3.0.1" -
Generate a reviewed lock file containing exact versions and SHA-256 hashes for every transitive dependency, then enforce it:
bash python3 -m pip install --require-hashes -r requirements.lock -
Pin and hash optional dependencies separately. Do not recommend
clawpolicy[phase3]until its expanded dependency graph has been audited and locked. -
Remove the unconditional unpinned pip upgrade, or pin and verify the required pip version in the same manner.
-
Ensure the version declared in the wrapper metadata, documentation, verification script, and lock file remains synchronized.
-
Run package verification in a sandbox or isolated container with no credentials, minimal filesystem access, restricted outbound networking, and an unprivileged user. A virtual environment alone is not a security boundary.
-
Add automated dependency review, vulnerability scanning, provenance verification, and lock-file integrity checks to the release workflow.
-
