Back to skill

Security audit

Tokenbroker

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly about token launch preparation, but it has credential, install, and production-network defaults that users should review carefully before installing.

Review this skill before installing. Use a pinned, verified installer; avoid exporting real GitHub tokens into installer commands; prefer testnet-only configuration; do not put wallet private keys in a plaintext .env unless you understand the risk; and require explicit confirmation before any nad.fun upload, mainnet preparation, or downstream token deployment.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T08 · Insecure Dependencies

Warning
Location
SETUP.md:8
Finding
Unpinned packages are downloaded and executed through npx<![CDATA[ ## Vulnerability Details **File Location**: `SETUP.md:8-10`, `SETUP.md:40-53`, and `SETUP.md:112-114` **Vulnerability Type**: Unverified third-party package execution **Risk Level**: Medium ### Vulnerable Code ```bash ## Quick Install ```bash npx clawhub install tokenbroker ``` ``` Additional affected commands include: ```bash npx clawhub install tokenbroker --github npx clawhub install tokenbroker --github --device npx clawhub install tokenbroker npx tokenbroker scan ./my-project ``` Related unpinned installation guidance also appears in `SKILL.md:163-165` and `SKILL.md:180-183`: ```bash npm install ``` ```bash npm install ethers ``` ### Technical Analysis The setup instructions recommend running packages through `npx` without an exact version, package integrity hash, lockfile, or other reproducibility control. `npx` may download and immediately execute the package version currently resolved by the configured npm registry. This creates a mutable supply-chain boundary: the code executed by users can differ from the code that was reviewed in this artifact. The project also lacks a package manifest and lockfile that would allow the effective dependency graph to be audited. The risk is elevated by the setup examples that export `GITHUB_TOKEN` before invoking the installer. Any compromised package executed in that process may inherit the caller's environment and filesystem permissions. ### Attack Path 1. An attacker compromises the `clawhub` or `tokenbroker` npm package, its publisher account, or the registry resolution path. 2. The attacker publishes a malicious version under the expected package name. 3. A user follows the documented unpinned `npx` command. 4. `npx` downloads and executes the malicious package. 5. The package reads environment variables, local project files, npm configuration, or other resources available to the invoking user. 6. The package exfiltrates data or modifies files with the user's privileges. Dependency confusio ...[truncated 776 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every executable package to an exact reviewed version: ```bash npx --yes clawhub@1.2.3 install tokenbroker npx --yes tokenbroker@1.0.0 scan ./my-project ``` 2. Publish and verify expected package integrity hashes before execution. 3. Include a complete `package.json` and lockfile in the reviewed artifact. 4. Use `npm ci` rather than unconstrained installation for reproducible dependency resolution. 5. Configure an explicitly trusted registry and prevent fallback to untrusted registries. 6. Run installers in a restricted environment without wallet secrets or unnecessary credentials. 7. Avoid exporting `GITHUB_TOKEN` into the environment of package installation processes. Inject it only into the specific runtime operation that requires GitHub access. 8. Add provenance verification, signed releases, and automated dependency auditing to the release process. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
src/generators/nadfun.ts:75
Finding
Caller-controlled fields are interpolated into SVG markup without escaping<![CDATA[ ## Vulnerability Details **File Location**: `src/generators/nadfun.ts:75-164` **Vulnerability Type**: SVG markup injection and potential stored active-content injection **Risk Level**: High ### Vulnerable Code ```ts export function generateTokenImage(params: ImageGenerationParams): string { const { name, ticker, color = '#6366f1', backgroundColor = '#1e1e2e', style = 'meme' } = params; // Clean name for display const displayName = name.toUpperCase(); const displayTicker = ticker.toUpperCase(); let svgContent: string; if (style === 'meme') { svgContent = ` <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"> <defs> <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%"> <stop offset="0%" style="stop-color:${backgroundColor}"/> <stop offset="100%" style="stop-color:#2d2d44"/> </linearGradient> <radialGradient id="glow" cx="50%" cy="50%" r="50%"> <stop offset="0%" style="stop-color:${color};stop-opacity:0.3"/> <stop offset="100%" style="stop-color:${color};stop-opacity:0"/> </radialGradient> </defs> <rect width="400" height="400" fill="url(#bg)"/> <circle cx="200" cy="200" r="180" fill="url(#glow)"/> <rect x="20" y="20" width="360" height="360" rx="20" fill="none" stroke="${color}" stroke-width="4"/> <text x="200" y="180" text-anchor="middle" fill="${color}" font-family="monospace" font-size="64" font-weight="bold"> ${displayTicker} </text> <text x="200" y="260" text-anchor="middle" fill="#ffffff" font-family="sans-serif" font-size="24"> ${dis ...[truncated 4197 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Escape all values inserted into XML text nodes: ```ts function escapeXmlText(value: string): string { return value .replace(/&/g, '&amp;') .replace(/</g, '&lt;') .replace(/>/g, '&gt;') .replace(/"/g, '&quot;') .replace(/'/g, '&apos;'); } ``` 2. Validate token names and tickers with strict allowlists and length limits: ```ts const SAFE_TOKEN_TEXT = /^[A-Z0-9 _.-]{1,32}$/; ``` 3. Validate colors as complete hex values rather than accepting arbitrary CSS: ```ts const SAFE_COLOR = /^#[0-9A-Fa-f]{6}$/; ``` 4. Reject control characters, markup delimiters, URLs, and unsupported Unicode formatting controls. 5. Build SVG through a trusted XML DOM or templating library that performs contextual escaping. 6. Pass the completed SVG through a maintained SVG sanitizer configured to remove scripts, event handlers, external references, foreign objects, animation-based abuse, and unsafe namespaces. 7. Configure the image host to serve uploads with restrictive headers, including a dedicated image origin, `Content-Security-Policy`, and `X-Content-Type-Options: nosniff`. 8. Add tests using malicious values in every interpolated field and verify that the resulting SVG remains structurally inert. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
src/generators/nadfun.ts:178
Finding
Production nad.fun endpoints are selected by default despite documented testnet safety default<![CDATA[ ## Vulnerability Details **File Location**: `src/generators/nadfun.ts:178-180`, `src/generators/nadfun.ts:208-210`, `src/generators/nadfun.ts:252-254`, `src/generators/nadfun.ts:280-282`, and `src/generators/nadfun.ts:315-318` **Vulnerability Type**: Unsafe production-network default and configuration inconsistency **Risk Level**: Medium ### Vulnerable Code ```ts export async function uploadImage( imageData: string, network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<UploadImageResult> { const baseUrl = NAD_API[network]; ``` The same default is repeated in the other exported network operations: ```ts export async function uploadMetadata( identity: IdentityOutput, imageUri: string, network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<UploadMetadataResult> { const baseUrl = NAD_API[network]; ``` ```ts export async function mineSalt( name: string, network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<MineSaltResult> { const baseUrl = NAD_API[network]; ``` ```ts export async function prepareLaunch( identity: IdentityOutput, network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<PreparedLaunch> { ``` ```ts export async function quickPrepare( identity: IdentityOutput, network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<PreparedLaunch> { return prepareLaunch(identity, network); } ``` This contradicts `SKILL.md:29-31`: ```md ### Testnet Mode - Default operation is on **testnet** for safety - Mainnet requires explicit configuration - Always review transactions before signing ``` It also conflicts with the default declared in `METADATA.md:19-22`: ```yaml - name: NETWORK description: Network to deploy to (mainnet or testnet) optional: false default: testnet ``` ### Technical Analysis All exported nad.fun operations use `mainnet` as the default when the caller omits the network argument. This violates the documented security model in which testnet is the default and mainnet ...[truncated 2114 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Change every exported network default to `testnet`: ```ts network: 'mainnet' | 'testnet' = 'testnet' ``` 2. Prefer requiring the caller to provide the network explicitly for any launch-related operation. 3. Require a separate explicit confirmation value before mainnet use, rather than relying only on a string argument: ```ts prepareLaunch(identity, { network: 'mainnet', mainnetConfirmed: true }); ``` 4. Display the selected API host and network before performing uploads. 5. Keep transaction signing behind a separate user-confirmation boundary that displays network, contract, fees, initial purchase amount, and destination addresses. 6. Add automated tests asserting that omitted configuration selects testnet and that mainnet cannot be selected implicitly. 7. Align `SKILL.md`, `METADATA.md`, examples, implementation defaults, and external deployment-skill configuration. 8. Attach the selected network to `PreparedLaunch` so downstream components can verify that preparation and deployment networks match. ]]>
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (31)

Credential Access

High
Category
Privilege Escalation
Content
```yaml
requiredEnvironmentVariables:
  - name: GITHUB_TOKEN
    description: GitHub Personal Access Token for repository scanning (stored locally in .env)
    optional: false
  - name: PRIVATE_KEY
    description: EVM private key for wallet operations (stored locally, never exposed externally)
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
```yaml
securityNotes:
  - All secrets stored locally in .env file
  - No external data transmission of credentials
  - Supports testnet mode for safe testing
  - Uses standard EVM wallet signing
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
npx clawhub install tokenbroker --github --device
```

**Option C: Personal Access Token**
```bash
export GITHUB_TOKEN=ghp_your_token_here
npx clawhub install tokenbroker
Confidence
90% confidence
Finding
The setup guide explicitly recommends use of a GitHub Personal Access Token via `export GITHUB_TOKEN=ghp_your_token_here`. PATs are highly sensitive credentials, and placing them in shell environment variables before running unpinned package code raises the risk of token exposure through process inspection, shell history mishandling, malicious child processes, or package compromise.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The description presents an end-to-end skill that analyzes repos, generates token branding/promotion, and launches on nad.fun. In the provided code, the main implemented behavior is orchestration of already-analyzed repo data into identity, reasoning, and promo outputs. The input requires a precomputed repoAnalysis object, so no GitHub analysis occurs here. Although nad.fun launch-related functions are imported and re-exported, generateAll does not call them, and no actual launch/upload/mining behavior is executed in this chunk. Therefore the code only partially matches the description and overstates the implemented capabilities in this specific supplied code chunk.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The supplied code is focused narrowly on nad.fun token launch preparation. It generates token artwork, uploads image and metadata to nad.fun endpoints, and requests salt mining. The header comment explicitly says on-chain deployment is handled elsewhere ('deploy.ts'), so this chunk does not itself launch a token on-chain. Also, nothing in the code analyzes GitHub projects or repositories, despite that being part of the declared description. Therefore the description overstates and misstates this chunk’s actual behavior in material ways.

Credential Access

High
Category
Privilege Escalation
Content
- No credentials are transmitted to external servers beyond their intended endpoints (GitHub API, nad.fun API, Monad RPC)
- The skill operates entirely within your local environment

### .env File Generation
- The Install Wizard generates a `.env` file on your local machine
- This file is **never committed** to version control (gitignored)
- You can review and edit it at any time
Confidence
84% confidence
Finding
The skill explicitly references local storage and generation of sensitive secrets in a .env file, including private keys and API tokens. Even though local storage is common, encouraging plaintext secret aggregation in a single file is risky in an agentic environment because compromise of the workspace, logs, backups, or accidental file exposure can leak credentials that enable wallet abuse and API misuse.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The file presents the skill as only generating metadata proposals, yet it declares sensitive operational secrets such as an EVM private key and nad.fun API credentials. That mismatch can mislead operators and downstream agents about the skill’s real capabilities and trust boundary, increasing the chance that high-risk credentials are provisioned unnecessarily or to the wrong component.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
The security note claims credentials are never exposed externally, but the described workflow includes authenticated API calls and blockchain signing for token launch. Even if raw secrets are not transmitted, authenticated operations derived from them are sent off-host, so the statement is materially misleading and may cause users to underestimate operational risk.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The activation phrases "scan this project" and "analyze this codebase" are very broad and likely to match common user requests outside the narrow token-launch workflow. This can cause the skill to activate in contexts where a user only wants generic repository analysis, unintentionally routing the agent into project-scanning and downstream token-generation behaviors.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The setup instructions execute `npx clawhub install tokenbroker` without pinning a specific package version. `npx` fetches the latest published package at runtime, so a compromised publisher account, dependency confusion, or malicious update could cause arbitrary code execution on the user's machine during installation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
This command invokes `npx clawhub install tokenbroker --github` without version pinning, which means users will execute whatever version is current at install time. In a security-sensitive setup flow that may later request GitHub authorization, this increases supply-chain risk because a malicious or hijacked release could harvest tokens or execute arbitrary code.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The device-code install path still relies on an unpinned `npx clawhub` invocation. Because `npx` resolves and runs remote code dynamically, an attacker controlling the package or its dependencies could compromise the workstation before or during authentication steps.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The Personal Access Token flow compounds the unpinned `npx clawhub` risk because it encourages setting `GITHUB_TOKEN` immediately before running remote package code. A malicious package version could read the environment variable and exfiltrate the token, making this context more dangerous than a generic unpinned install command.

External Transmission

Medium
Category
Data Exfiltration
Content
2. Verify GitHub access:
```bash
curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user
```

3. Test project scanning:
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
`npx tokenbroker scan ./my-project` is another unpinned runtime package execution. Even though this appears to be a post-install test command, it still creates a supply-chain execution point where a malicious or substituted package could run arbitrary code against the local repository and environment.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill documents network-capable behavior such as GitHub API access, nad.fun API calls, and RPC interaction, but it does not declare any explicit tool scope or allowed-tools restrictions. In an agent environment, missing capability boundaries can let the host grant broader network access than users expect, increasing the chance of unintended outbound requests or misuse of credentials.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill includes mainnet deployment instructions and contract invocation examples without a prominent warning that blockchain transactions are irreversible and may cause real financial loss. In the context of a token-launching skill, that omission is more dangerous because users may copy deployment steps directly and underestimate the operational and financial risk.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The meme-category description uses explicit promotional investment language such as 'moon-sized gains' and 'moonshots' without any qualification, risk disclosure, or neutrality. In this skill’s context, the generator is specifically used to create token branding and launch materials, so the text can directly encourage speculative investment behavior and expose users or operators to consumer-protection, platform-policy, and financial-promotion compliance risk.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
This code performs a network POST to the nad.fun API containing image data derived from user inputs, but the function has no confirmation prompt or user-facing warning about sending that content off-system. For code files, network calls that transmit user or system data should have some visible disclosure unless clearly covered elsewhere in the skill description.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The function sends token metadata including name, description, image URI, and symbol to a remote nad.fun endpoint, but there is no confirmation prompt or explicit warning that this data will be transmitted externally. Although the file comments describe the behavior for developers, that is not a clear user-facing disclosure for a safety-relevant network operation.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The code comments say category is detected from repository analysis, but generateXThread passes reasoning cast as RepoAnalysis into detectCategory. This type-confusion bypasses the intended data source and can misclassify projects or manufacture category-based marketing from arbitrary reasoning text, undermining analysis integrity and making deceptive output easier.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The promotional templates contain investment-style hype such as 'to the moon,' 'don't miss out,' and fairness/community claims without risk disclosure or substantiation. In a token-launch skill, this is more dangerous than ordinary marketing because it can facilitate misleading financial promotion, encourage reckless user behavior, and create compliance and fraud exposure.

Description-Behavior Mismatch

Medium
Confidence
90% confidence
Finding
The exported promo generator ignores the provided repoAnalysis input entirely, even though the skill claims repository analysis informs token and promotional content. In this context, that creates integrity and trust issues: users may believe output is grounded in actual project characteristics when it is instead generated from generic identity/reasoning fields, enabling misleading or fabricated promotion.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The module is explicitly designed to generate an 'Investment Thesis' but contains no warning that the resulting content may be speculative, promotional, or financially sensitive. In a token-launch workflow, omission of disclosure can facilitate users treating autogenerated marketing text as investment guidance, increasing consumer-harm and compliance risk.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
],
    ai: [
        "AI development and deployment remains centralized, with users unable to access or profit from valuable machine learning models.",
        "On-chain AI agents lack the infrastructure to autonomously execute complex strategies while maintaining transparency and trustlessness.",
        "The potential of AI in blockchain ecosystems remains largely untapped, with no robust framework for AI-powered governance or automation."
    ],
    nft: [
Confidence
80% 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.

Static analysis

No suspicious patterns detected.