Back to skill

Security audit

clawpet

Security checks for vulnerabilities and agentic risk

Overview

This pet companion skill is not clearly malicious, but it needs review because it can run unpinned code from GitHub and send generated images through Telegram.

Install only if you are comfortable with this skill fetching and running the current contents of the referenced GitHub repository. Prefer a pinned, reviewed release or commit, and require confirmation before it sends generated images to Telegram.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Warning
Location
scripts/clawpet.sh:4
Finding
Execution of Unpinned Code from a Mutable Remote Repository## Vulnerability Details **File Location**: `scripts/clawpet.sh`, lines 4-15; corroborating dependency declaration in `SKILL.md`, lines 8-12 and 98-101 **Vulnerability Type**: Remote payload retrieval and execution through an unpinned Git dependency **Risk Level**: Medium ### Vulnerable Code ```bash REPO_URL="git+https://github.com/yazelin/clawpet.git" if command -v clawpet >/dev/null 2>&1; then exec clawpet "$@" fi if command -v uvx >/dev/null 2>&1; then exec uvx --from "$REPO_URL" clawpet "$@" fi if command -v uv >/dev/null 2>&1; then exec uv tool run --from "$REPO_URL" clawpet "$@" fi ``` The corresponding installation metadata also uses the mutable repository reference: ```yaml install: - id: clawpet-git kind: pip package: "git+https://github.com/yazelin/clawpet.git" bins: [clawpet] label: "Install clawpet from GitHub" ``` ### Technical Analysis The wrapper retrieves and executes a Python package directly from a GitHub repository without pinning it to an immutable commit hash, verified release artifact, or integrity digest. When a local `clawpet` executable is unavailable, `uvx` or `uv tool run` resolves the repository's current state and runs its `clawpet` entry point. Because the dependency reference does not identify a fixed revision, the effective executable payload can change after this skill has been reviewed. A compromise of the upstream repository, malicious maintainer update, repository ownership transfer, or unauthorized modification could therefore turn an ordinary pet-management command into arbitrary code execution. This is best classified as remote payload retrieval and execution because runtime behavior explicitly fetches executable code from an external, mutable source. ### Attack Path 1. An attacker compromises the referenced GitHub repository or otherwise gains the ability to publish malicious code to its default ...[truncated 1443 chars]
Remediation
## Remediation Suggestions 1. Pin the Git dependency to a reviewed immutable commit: ```bash REPO_URL="git+https://github.com/yazelin/clawpet.git@<full-reviewed-commit-sha>" ``` Apply the same immutable reference in `SKILL.md`. 2. Prefer a trusted, versioned package release with cryptographic hash verification rather than executing directly from a repository branch. 3. Avoid runtime dependency retrieval. Require administrators to install an approved version in advance, then verify the local executable's version before invoking it. 4. For stronger assurance, vendor the minimal required implementation into the audited package and review all transitive dependencies. 5. Use lock files and integrity hashes for the complete dependency graph. Re-audit and deliberately update the pinned revision when upstream changes are required. 6. Run the command in a restricted environment with minimal filesystem, credential, and network access so that a compromised dependency cannot access unrelated agent resources.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (7)

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The top-level description says the skill produces pet image prompts, but the workflow goes further by instructing the agent to generate a full image file and send it externally. This mismatch obscures the true privilege and behavior of the skill, making it more likely an operator or downstream system will grant broader capabilities than intended.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The workflow creates a local file and then transmits it through a messaging channel, but it provides no user-facing warning or confirmation requirement for these side effects. In agent settings, silent file creation and outbound transmission are meaningful security-relevant actions that should not occur implicitly from a casual image request.

Context-Inappropriate Capability

Medium
Confidence
89% confidence
Finding
The skill directs the agent to send a generated image over Telegram via the message tool, which is an external data-transfer action not inherent to basic pet state management. Even if the content is seemingly harmless, outbound transmission expands the skill's capability surface and can normalize exfiltration behavior without clear user confirmation or scope limitation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
The troubleshooting guidance instructs fallback execution directly from a Git repository using `uvx --from git+https://github.com/yazelin/clawpet.git`, without pinning to a specific commit, tag, or version. That creates a supply-chain risk: future upstream changes or a compromised repository could cause different, potentially malicious code to be fetched and executed in the agent environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
The documented fallback `uv tool run --from git+https://github.com/yazelin/clawpet.git clawpet ...` also executes unpinned code from a live Git source. In an agent skill, this is especially dangerous because troubleshooting instructions may be followed automatically, turning a recoverable missing-binary situation into remote code execution from mutable upstream content.

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding
uvx/uv tool run commands without ==version create a rug-pull risk.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
The skill presents its trigger phrases exclusively in Chinese, which can imply a language-specific activation pattern without an explicit opt-in or justification. Under the language/locale policy, skills should either offer language choice or clearly document that they are intentionally region- or language-specific.

Static analysis

No suspicious patterns detected.