Back to skill

Security audit

Pet Me Master - Autonomous Aavegotchi Petting

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims, but it can make unattended wallet-linked blockchain actions and has weak controls around credentials and natural-language transaction triggers.

Review this carefully before installing. Use a dedicated, narrowly scoped Bankr key, do not run it in an environment where BANKR_API_URL can be changed by untrusted code, prefer dry-run/status checks first, and avoid enabling cron, fallback auto-pet, or the recurring loop unless you explicitly want unattended blockchain actions. Protect the config files and rotate credentials if this has been run from an untrusted environment.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/pet-command.py:39
Finding

Ambiguous or Negated Natural-Language Requests Can Trigger Blockchain Transactions

Content
View full analysis
tuple[str, list[str]]: lowered = normalize(text) gotchi_id = extract_gotchi_id(text) if any(phrase in lowered for phrase in ("pet status", "status", "when can i pet", "when pet")): return "pet-status.sh", [] if "check cooldown" in lowered or "cooldown" in lowered: return "check-cooldown.sh", [gotchi_id] if gotchi_id else [] # Enforced behavior: any pet action is batch-only (pet-all.sh). if "pet" in lowered: return "pet-all.sh", [] ``` ```python def run_command(cmd: list[str], dry_run: bool) -> int: print(f"dispatch={' '.join(shlex.quote(part) for part in cmd)}") if dry_run: return 0 proc = subprocess.run(cmd, text=True, capture_output=True) if proc.stdout: print(proc.stdout, end="") if proc.stderr: print(proc.stderr, end="", file=sys.stderr) return proc.returncode ``` ### Technical Analysis The command classifier treats any otherwise-unmatched input containing the substring `pet` as an affirmative instruction to execute `pet-all.sh`. It does not recognize negation, uncertainty, quoting, discussion, or a requirement for explicit confirmation. Consequently, inputs such as the following are classified as transaction requests: - `Do not pet my gotchis` - `Never pet them automatically` - `Can you explain what pet-all does?` - `I did not ask you to pet anything` Unless the dispatcher itself is invoked with `--dry-run` or `--tx-dry-run`, `run_command()` executes the selected script. The target script can submit a real transaction through the Bankr API. The use of an argument array in `subprocess.run()` prevents shell metacharacter injection, but it does not address the authorization flaw caused by overly broad intent classif ...[truncated 1041 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/lib.sh:170
Finding

Bankr API Credential Can Be Exfiltrated Through an Unrestricted Endpoint Override

Content
View full analysis
/dev/null 2>&1; then key="$(systemctl --user show-environment 2>/dev/null | sed -n 's/^BANKR_API_KEY=//p' | head -n1 || true)" fi if [ -z "$key" ] && [ -f "$HOME/.openclaw/skills/bankr/config.json" ]; then key="$(jq -r '.apiKey // empty' "$HOME/.openclaw/skills/bankr/config.json" 2>/dev/null || true)" fi if [ -z "$key" ] && [ -f "$HOME/.openclaw/workspace/skills/bankr/config.json" ]; then key="$(jq -r '.apiKey // empty' "$HOME/.openclaw/workspace/skills/bankr/config.json" 2>/dev/null || true)" fi case "$key" in ""|null|"your-api-key-here"|"YOUR_BANKR_API_KEY") err "BANKR_API_KEY is missing (env/systemd/bankr config)" ;; esac printf '%s\n' "$key" } submit_bankr_tx() { local to_addr="$1" local calldata="$2" local description="$3" local api_key api_key="$(resolve_bankr_api_key)" local payload payload="$(jq -n \ --arg to "$to_addr" \ --arg chainId "$CHAIN_ID" \ --arg data "$calldata" \ --arg description "$description" \ '{transaction:{to:$to,chainId:($chainId|tonumber),value:"0",data:$data},description:$description,waitForConfirmation:true}')" curl -sS -X POST "$BANKR_API_URL/agent/submit" \ -H "X-API-Key: $api_key" \ -H "Content-Type: application/json" \ -d "$payload" } ``` ### Technical Analysis The code legitimately requires a Bankr API key to submit transactions, and access to the documented Bankr configuration is consistent with the Skill's declared Bankr integration. However, the destination receiving that credential is controlled by the unrestricted `BANKR_API_URL` envir ...[truncated 1962 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/schedule-next-reminder.sh:30
Finding

Predictable Shared Temporary Files Allow Symlink-Based File Clobbering

Content
View full analysis
/tmp/reminder-job.json << EOF { "name": "$REMINDER_NAME", "schedule": {"kind": "at", "at": "$NEXT_REMINDER_ISO"}, "payload": { "kind": "systemEvent", "text": "fren pet your gotchi(s)!" }, "sessionTarget": "main", "enabled": true } EOF ``` ```bash cat > /tmp/fallback-job.json << EOF { "name": "$FALLBACK_NAME", "schedule": {"kind": "at", "at": "$NEXT_FALLBACK_ISO"}, "payload": { "kind": "systemEvent", "text": "🤖 Auto-pet fallback triggered. Running: cd ~/.openclaw/workspace/skills/pet-me-master && bash scripts/pet-all-and-reschedule.sh" }, "sessionTarget": "main", "enabled": true } EOF ``` ### Technical Analysis The script writes job definitions to fixed, globally predictable paths under `/tmp`. Shell output redirection follows symbolic links and does not perform exclusive file creation. A local attacker can pre-create either path as a symbolic link to another file writable by the user running the Skill. When the scheduling script runs, `cat > ...` truncates and overwrites the symlink target. The files may also be observed or modified by another local process before a subsequent component consumes them. Although the inspected script only creates the definitions and states that another component must submit them, predictable shared paths create both file-integrity and race-condition risks. ### Attack Path 1. A local attacker determines that the victim may run `schedule-next-reminder.sh`. 2. The attacker creates a symbolic link such as: `ln -s /home/victim/.profile /tmp/reminder-job.json` 3. The victim runs the scheduling script. 4. Shell redirection follows the symbolic link and truncates the target file. 5. The generated JSON is written into the victim-owned target. 6. Alternatively, an at ...[truncated 790 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (45)

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · FIX_PLAN.md (reported line 19)May include surrounding context.

md
Make a single entry point for all status checks

### Fix Documentation
Update SKILL.md to reflect the correct commands

## Implementation

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · FIX_PLAN.md (reported line 24)May include surrounding context.

md
Make a single entry point for all status checks

### Fix Documentation
Update SKILL.md to reflect the correct commands

## Implementation

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is presented as an Aavegotchi/Bankr petting utility, but documentation indicates it may also read credential/config files, inspect systemd user environment, and send Telegram messages. That is a significant expansion into credential discovery and external communications, which is security-relevant because it increases data exposure and creates side effects unrelated to the core on-chain action.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is presented as an Aavegotchi/Bankr petting utility, but documentation indicates it may also read credential/config files, inspect systemd user environment, and send Telegram messages. That is a significant expansion into credential discovery and external communications, which is security-relevant because it increases data exposure and creates side effects unrelated to the core on-chain action.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill is presented as an Aavegotchi/Bankr petting utility, but documentation indicates it may also read credential/config files, inspect systemd user environment, and send Telegram messages. That is a significant expansion into credential discovery and external communications, which is security-relevant because it increases data exposure and creates side effects unrelated to the core on-chain action.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is presented as an Aavegotchi/Bankr petting utility, but documentation indicates it may also read credential/config files, inspect systemd user environment, and send Telegram messages. That is a significant expansion into credential discovery and external communications, which is security-relevant because it increases data exposure and creates side effects unrelated to the core on-chain action.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is presented as an Aavegotchi/Bankr petting utility, but documentation indicates it may also read credential/config files, inspect systemd user environment, and send Telegram messages. That is a significant expansion into credential discovery and external communications, which is security-relevant because it increases data exposure and creates side effects unrelated to the core on-chain action.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 78)May include surrounding context.

md
- `./scripts/auto-pet-fallback.sh`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 79)May include surrounding context.

md
- `./scripts/auto-pet-at-cooldown.sh`

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · USAGE_GUIDE.md (reported line 76)May include surrounding context.

md
→ Always use `scripts/check-status.sh` (most reliable)

**"Pet failed"**
→ Check Bankr API key in ~/.openclaw/.env
→ Verify BANKR_API_KEY is set

**"Gotchi still on cooldown"**

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 11)May include surrounding context.

  1. Install Bankr skill and configure API key at ~/.openclaw/skills/bankr/config.json

  2. Create config:

    bash
    mkdir -p ~/.openclaw/workspace/skills/pet-me-master
    cat > ~/.openclaw/workspace/skills/pet-me-master/config.json << 'EOF'
    

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README explicitly promotes a workflow where a reminder can trigger automatic fallback petting if the user does not respond, which is an autonomous on-chain action. Even if the transaction is limited to petting, users are not clearly warned in this section that unattended execution may submit blockchain transactions on their behalf, creating consent and operational-risk issues.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises capabilities that require environment access, file reads, network access, and shell execution, but it does not declare an explicit tool scope or permissions boundary. In a skill that reads credentials, queries wallets, sends network requests, and may submit on-chain transactions, missing scope declarations weakens reviewability and increases the risk of over-privileged execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes an automatic fallback pet transaction after a delay, but it does not prominently warn users that it can autonomously submit on-chain transactions. Autonomous blockchain actions are sensitive because they can consume gas, trigger unintended state changes, and continue operating after initial setup without fresh user confirmation.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
84% confidence
Finding

The skill instructs users to store persistent configuration under the home workspace, including wallet-related settings and notification identifiers. Persistent local state is not inherently malicious, but it increases exposure of sensitive operational data and can be abused by other local processes or mistakenly committed/backed up if file protections are weak.

Content

Scanner excerpt · SKILL.md (reported line 28)May include surrounding context.

Config

Create ~/.openclaw/workspace/skills/pet-me-master/config.json:

json
{

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guide promotes an automated workflow that pets all ready gotchis via Bankr, but it does not warn that this causes external account-affecting operations or may submit authenticated requests/transactions on the user's behalf. In an agent-integrated setting, omitting this warning can cause users to invoke a state-changing action without appreciating that it will act against their configured account and automation credentials.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The usage guide defines broad natural-language triggers such as 'pet gotchis' and 'pet all when ready' that can map directly to account-affecting actions without clear confirmation boundaries. In an agent context, ambiguous conversational routing increases the chance of unintended execution from casual phrasing, quoted text, or context bleed, especially because the action invokes external automation rather than a read-only check.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description advertises autonomous blockchain monitoring, Telegram alerts, and auto-petting after a grace period, but it does not warn about the security and operational consequences of linking a wallet and enabling unattended on-chain actions. In this context, missing disclosure is risky because users may unknowingly authorize automated transactions, external messaging, and persistent monitoring behavior.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
82% confidence
Finding

The installation instructs users to add a cron job for scheduled checks, and the manifest also claims state persistence across restarts, indicating recurring execution beyond a single interactive session. Persistent scheduled execution increases risk because a misconfigured or compromised skill can continue making wallet-linked checks, sending notifications, or performing automated actions without active user awareness.

Content

Scanner excerpt · clawhub.json (reported line 40)May include surrounding context.

json
"Copy config.json.example to config.json",
      "Configure your gotchi IDs and wallet",
      "Set up Bankr wallet integration",
      "Add cron job for scheduled checks",
      "Test with manual pet command"
    ]
  },

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest says the skill is 'Fully automated' and describes periodic checks plus automatic petting, but it does not clearly define trigger conditions, scope, or how/when autonomous actions start and stop. For a wallet-linked blockchain skill, this ambiguity can cause users to enable recurring behavior they do not fully understand, leading to unintended on-chain transactions and notification spam.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/contract-info.md (reported line 79)May include surrounding context.

md
**Safe Operations:**
- ✅ No token transfers
- ✅ No approvals needed
- ✅ Only updates kinship state
- ✅ Reverts if cooldown not ready

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script does more than check cooldowns and send reminders: it schedules auto-pet-fallback.sh to run later without requiring a fresh user confirmation at execution time. In a wallet-managing skill, unattended transaction-triggering behavior expands the agent’s authority and can cause on-chain actions the user did not explicitly approve at the moment they occur.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The script schedules background execution via at or a detached sleep ... && bash fallback, which means an on-chain action may occur later even if the user is no longer actively interacting with the agent. Although the notification text mentions auto-pet, this script itself implements delayed execution in a non-interactive way, increasing the risk of surprise transactions, stale context, or execution after ownership/delegation changes.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/lib.sh (reported line 13)May include surrounding context.

sh
DEFAULT_CHAIN_ID="8453"
DEFAULT_RPC_URL="https://mainnet.base.org"
BANKR_API_URL="${BANKR_API_URL:-https://api.bankr.bot}"
CORE_SUBGRAPH_URL="${CORE_SUBGRAPH_URL:-https://api.goldsky.com/api/public/project_cmh3flagm0001r4p25foufjtt/subgraphs/aavegotchi-core-base/prod/gn}"
BANKR_WALLET_CACHE_FILE="${PET_ME_BANKR_WALLET_CACHE_FILE:-/tmp/pet-me-master-bankr-wallet.txt}"
BANKR_WALLET_CACHE_MAX_AGE="${PET_ME_BANKR_WALLET_CACHE_MAX_AGE:-21600}"

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function resolves a Bankr API key not only from this skill's environment but also from systemd user environment and other Bankr skill configuration files. Cross-skill credential harvesting violates least privilege and creates secret sharing between unrelated components, so compromise or misuse of this skill could reuse credentials the user did not intend to expose here.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/send-reminder.js:76