Back to skill

Security audit

Olambdao Dev

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its Clawland game purpose, but it automatically installs mutable npm dependencies and uses local wallet/API credentials for value-bearing devnet betting actions, so it needs user review before installation.

Review this before installing if you are not comfortable with a skill creating and storing a local Solana devnet private key, reading a Clawland API key, installing npm packages on first run, and signing repeated devnet game transactions. Use only devnet funds, keep wallet.json and credentials.json private, avoid unattended autoplay, and prefer a version with pinned dependencies and explicit spend limits.

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/common.js:24
Finding

Runtime Installation of Mutable Dependencies in a Wallet-Signing Process

Content
View full analysis

Vulnerability Details

File Location: scripts/common.js, lines 24–36
Vulnerability Type: Unsafe runtime dependency installation and supply-chain exposure
Risk Level: Medium

Complete Code Snippet:

js
// Ensure dependencies
function ensureDeps() {
  const deps = ['@solana/web3.js', 'tweetnacl', 'bs58', '@solana/spl-token'];
  const missing = deps.some(d => { try { require.resolve(d, { paths: [__dirname] }); return false; } catch { return true; } });
  if (missing) {
    console.log('📦 Installing Solana dependencies (first run, ~15s)...');
    const { execSync } = require('child_process');
    execSync('npm init -y 2>/dev/null && npm install --silent @solana/web3.js@1 @coral-xyz/anchor @solana/spl-token bs58 tweetnacl', {
      cwd: __dirname,
      stdio: ['pipe', 'pipe', 'inherit'],
    });
    console.log('✅ Dependencies installed.\n');
  }
}

Technical Analysis

Every script calls ensureDeps(). When any required module is missing, the function invokes npm at runtime to retrieve and install executable third-party code. Most direct dependencies are not pinned to exact versions, while @solana/web3.js@1 allows updates throughout the major version. The project also does not provide a reviewed lockfile or fixed integrity metadata in the audited artifact.

This means the effective code executed by the Skill can change after the Skill itself has been reviewed. npm may also execute package lifecycle scripts unless they are explicitly disabled. The exposure is especially significant because the resulting modules run in the same Node.js process and under the same operating-system account as code that reads the API credential and the Solana secret key from ~/.config/clawland.

The shell command is static and does not interpolate user-controlled input, so no direct command-injection issue was identified. The vulnerability is the mutable, runtime-resolved dependency trust boundary.

...[truncated 1576 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove automatic dependency installation from runtime paths, particularly from processes that load or use wallet secrets.
  2. Add a reviewed package.json and lockfile, and pin every direct dependency to an exact version.
  3. Install dependencies as a separate, explicit deployment step using npm ci rather than npm install.
  4. Use lockfile integrity hashes and periodically verify them in CI.
  5. Disable lifecycle scripts with npm ci --ignore-scripts where package compatibility permits; explicitly review any dependency that requires lifecycle execution.
  6. Run dependency installation in a restricted build environment without wallet files, API credentials, or other user secrets.
  7. Package or vendor reviewed dependencies when reproducible offline installation is practical.
  8. Add automated dependency scanning, provenance verification, and controlled update review.
  9. Run transaction-signing scripts under a constrained operating-system account with access only to the minimum required wallet and configuration files.
Vulnerability Patterns
  • 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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (25)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documented behavior overstates or mismatches what parts of the skill apparently do, including claims around wallet setup, airdrop behavior, and broader gameplay automation. Security reviewers and users rely on accurate descriptions to assess risk; mismatches can conceal sensitive actions like local key storage or lead users to execute steps under false assumptions.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
88% confidence
Finding

A documented DELETE endpoint that unlinks a wallet is a sensitive operation that can be dangerous if exposed through agent tooling without strict confirmation and authorization controls. In the context of a wallet-linked gambling/crypto skill, destructive parameterized actions are higher risk because a prompt-injected or mistaken tool invocation could sever account-wallet linkage and disrupt access or downstream financial operations.

Content

Scanner excerpt · references/API.md (reported line 68)May include surrounding context.

md
## Wallet
`GET /agents/me/wallet/challenge` — Get signing challenge
`POST /agents/me/wallet` — Link wallet (pubkey + signed message + signature)
`DELETE /agents/me/wallet` — Unlink wallet

## Response format
Success: `{"success": true, "data": {...}}`

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/common.js (reported line 86)May include surrounding context.

js
#!/usr/bin/env node
/**
 * Link your Solana wallet to your Clawland profile.
 * Requires: CLAWLAND_API_KEY env var (or credentials.json) and wallet.json
 */
const { loadWallet, getApiKey, ensureDeps } = require('./common');

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/common.js (reported line 91)May include surrounding context.

js
#!/usr/bin/env node
/**
 * Link your Solana wallet to your Clawland profile.
 * Requires: CLAWLAND_API_KEY env var (or credentials.json) and wallet.json
 */
const { loadWallet, getApiKey, ensureDeps } = require('./common');

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/link-wallet.js (reported line 4)May include surrounding context.

js
#!/usr/bin/env node
/**
 * Link your Solana wallet to your Clawland profile.
 * Requires: CLAWLAND_API_KEY env var (or credentials.json) and wallet.json
 */
const { loadWallet, getApiKey, ensureDeps } = require('./common');

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill documents use of environment secrets and outbound network access, but it does not declare an explicit tool scope such as allowed-tools or permissions. That creates a governance gap: a host may grant broader capabilities than intended, making secret access and remote calls less constrained and harder to review.

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 · SKILL.md (reported line 30)May include surrounding context.

1. Register on Clawland

bash
curl -X POST https://api.clawlands.xyz/v1/agents/register \
  -H "Content-Type: application/json" \
  -d '{"name": "YourAgentName", "description": "What you do"}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill promotes continuous autoplay betting without a prominent warning about repeated-loss risk, burn mechanics, or the speed at which funds can be depleted. In an automated agent context, this increases the chance of unintended repeated wagering and resource loss.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
71% confidence
Finding

This example sends a bearer API key to a remote endpoint to place off-chain bets. While that is functionally necessary, it is still a security-sensitive external transmission because compromise, misconfiguration, or overly broad host permissions could expose credentials and enable unauthorized wagering.

Content

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

bash
# Odd/even (off-chain)
curl -X POST https://api.clawlands.xyz/v1/games/odd_even/play \
  -H "Authorization: Bearer $CLAWLAND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"choice": "odd", "bet_amount": 1}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
76% confidence
Finding

This authenticated chat request sends a bearer token and user-provided message content to an external service. That creates risk of secret misuse and possible transmission of sensitive or prompt-derived content if an agent populates messages automatically or without clear boundaries.

Content

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

bash
# Chat
curl -X POST https://api.clawlands.xyz/v1/chat \
  -H "Authorization: Bearer $CLAWLAND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Just won on-chain! 🎉"}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation describes API key regeneration that immediately invalidates the old key, but it does not emphasize the destructive operational effect or require explicit confirmation guidance. In an agent ecosystem, unclear presentation of credential-rotation behavior can trigger accidental lockouts, automation failure, or social-engineering abuse where a user is induced to rotate a working key unexpectedly.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest says the skill plays on-chain odd/even games on Solana devnet and mints GEM from SOL or USDC. This reference instead describes an explicit "Odd or Even (off-chain)" HTTP endpoint with balance-based play semantics, which materially differs from the stated blockchain-based behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The wallet unlink operation is destructive because it removes the wallet association, yet the reference gives no warning about consequences such as loss of linked functionality or need to relink/sign again. In a crypto-adjacent skill, underdocumented destructive actions are more dangerous because users may misunderstand wallet state and disrupt access or automated flows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The documentation describes deposits, betting losses via token burning, and a 5% redemption fee without prominent warnings about irreversible asset loss, gambling risk, and charges. In this skill's context—automating on-chain odd/even betting—missing risk disclosure is more dangerous because users may execute transactions with real economic consequences while assuming the flow is safe or reversible.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The utility automatically executes shell commands to initialize an npm project and install packages at runtime, without any explicit user approval or integrity pinning beyond broad package names. This creates a supply-chain and unexpected code-execution risk because running the skill causes arbitrary package install scripts and dependency resolution to occur on the host machine.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code invokes npm commands via execSync automatically on first run, which means shell/package-manager operations occur without user confirmation. Even though the command string is static, this still expands the trust boundary to npm registry content and install-time scripts, making simple skill execution trigger local command execution and network retrieval.

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 · SKILL.md (reported line 30)May include surrounding context.

md
const bs58 = require('bs58');
  const wallet = loadWallet();
  const apiKey = getApiKey();
  const base = 'https://api.clawlands.xyz/v1';

  // Step 1: Get challenge
  console.log('Getting signing challenge...');

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 · SKILL.md (reported line 123)May include surrounding context.

md
const bs58 = require('bs58');
  const wallet = loadWallet();
  const apiKey = getApiKey();
  const base = 'https://api.clawlands.xyz/v1';

  // Step 1: Get challenge
  console.log('Getting signing challenge...');

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 · SKILL.md (reported line 138)May include surrounding context.

md
const bs58 = require('bs58');
  const wallet = loadWallet();
  const apiKey = getApiKey();
  const base = 'https://api.clawlands.xyz/v1';

  // Step 1: Get challenge
  console.log('Getting signing challenge...');

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 · references/API.md (reported line 3)May include surrounding context.

md
const bs58 = require('bs58');
  const wallet = loadWallet();
  const apiKey = getApiKey();
  const base = 'https://api.clawlands.xyz/v1';

  // Step 1: Get challenge
  console.log('Getting signing challenge...');

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 · references/API.md (reported line 35)May include surrounding context.

md
const bs58 = require('bs58');
  const wallet = loadWallet();
  const apiKey = getApiKey();
  const base = 'https://api.clawlands.xyz/v1';

  // Step 1: Get challenge
  console.log('Getting signing challenge...');

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/link-wallet.js (reported line 15)May include surrounding context.

js
const bs58 = require('bs58');
  const wallet = loadWallet();
  const apiKey = getApiKey();
  const base = 'https://api.clawlands.xyz/v1';

  // Step 1: Get challenge
  console.log('Getting signing challenge...');

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes wallet setup, minting GEM, and autoplay for odd/even betting. This file documents additional product capabilities—math quiz gameplay, chat messaging, and leaderboard access—that are not part of the stated skill purpose and suggest broader behavior than advertised.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The GEM token section states GEM is minted by the program from USDC deposits, implying USDC is the minting source. Later, the instruction list documents mint_gems_with_sol(sol_amount: u64) as a recommended path that mints GEM from SOL deposits instead, so the earlier description understates actual supported behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation explicitly presents a non-cryptographic randomness source as 'fair' for a betting game, which is dangerous because slot hash, timestamp, and transaction timing can often be influenced or predicted enough to bias outcomes. In a wagering context, weak randomness can let validators, bots, or sophisticated players exploit the game or create a false sense of fairness for users risking assets.

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/common.js:30