Back to skill

Security audit

ClawPolicy

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent, but users should review it because it installs and runs an unpinned PyPI policy-engine package that can create local agent policy files.

Install only if you are comfortable running the current PyPI `clawpolicy` package under your user account. Prefer pinning the intended version, for example `clawpolicy==3.0.1`, and review the `.clawpolicy/` files it creates before allowing them to guide agent behavior.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
scripts/verify_install.sh:8
Finding
Unpinned Third-Party Package Installation## 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**: Medium **Vulnerable Code**: ```bash source "$TMPDIR/venv/bin/activate" python3 -m pip install --upgrade pip >/dev/null python3 -m pip install clawpolicy >/dev/null ``` The documentation also recommends: ```bash python3 -m pip install clawpolicy python3 -m pip install "clawpolicy[phase3]" ``` ### Technical Analysis The verification script and installation documentation install `clawpolicy` without 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 `phase3` extra expands this uncontrolled dependency set further. The `pip` upgrade 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 1. An attacker compromises the `clawpolicy` PyPI project, one of its transitive dependencies, or a future package release. 2. The attacker publishes a malicious release that still satisfies the unconstrained package name. 3. A user or ...[truncated 1243 chars]
Remediation
## Remediation Suggestions 1. Pin the reviewed package release explicitly: ```bash python3 -m pip install "clawpolicy==3.0.1" ``` 2. 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 ``` 3. Pin and hash optional dependencies separately. Do not recommend `clawpolicy[phase3]` until its expanded dependency graph has been audited and locked. 4. Remove the unconditional unpinned pip upgrade, or pin and verify the required pip version in the same manner. 5. Ensure the version declared in the wrapper metadata, documentation, verification script, and lock file remains synchronized. 6. 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. 7. Add automated dependency review, vulnerability scanning, provenance verification, and lock-file integrity checks to the release workflow.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
The document presents the current file entirely in Simplified Chinese and labels English as an alternate primary document, which is a natural-language locale choice embedded in the skill documentation. There is no user opt-in within this file and no stated region-specific reason for requiring or preferring this locale.

Static analysis

No suspicious patterns detected.