Back to skill

Security audit

nadfun

Security checks for vulnerabilities and agentic risk

Overview

This is a legitimate NadFun blockchain integration, but it needs review because its examples can expose wallet secrets, grant unlimited token approvals, and replace installed skill files from mutable remote URLs.

Review this skill carefully before installing. Use testnet first, never paste real private keys into examples, never print private keys or API keys, prefer exact token approvals over unlimited approvals, verify every contract address and network before signing, and avoid the curl-based remote skill update flow unless you can verify the downloaded files.

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)

T09 · Insecure Skill Coding Practices

Error
Location
WALLET.md:18
Finding

Generated Wallet Private Keys Are Exposed Through Application Logs

Content
View full analysis
'0x...' (64 hex characters) // Derive account from private key const account = privateKeyToAccount(privateKey) console.log("Private Key:", privateKey) console.log("Address:", account.address) ``` The complete example repeats the unsafe behavior: ```typescript // Generate new wallet const privateKey = generatePrivateKey() const account = privateKeyToAccount(privateKey) console.log("=== New Wallet Generated ===") console.log("Private Key:", privateKey) console.log("Address:", account.address) ``` ### Technical Analysis A blockchain private key provides complete signing authority over its corresponding wallet. Printing it to standard output exposes it to every system that captures application output, including terminal scrollback, shell-session recordings, CI/CD logs, centralized logging platforms, agent transcripts, support bundles, and monitoring tools. The later security note advising users not to print private keys does not neutralize the issue because the primary wallet-generation examples remain directly copyable and executable. Development logs are also frequently retained or uploaded, so limiting this pattern to development environments would not provide adequate protection. ### Attack Path 1. A user or AI agent copies and runs the documented wallet-generation example. 2. The generated private key is written to standard output. 3. The output is retained in terminal history, an AI-agent transcript, CI output, or centralized logs. 4. An attacker, administrator, compromised logging service, or unauthorized support user obtains the output. 5. The attacker imports the private key into another ...[truncated 712 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
TOKEN.md:229
Finding

Unlimited ERC-20 Allowances Exceed the Privileges Required for Documented Operations

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:47
Finding

Mutable Remote Skill Instructions Are Installed Without Integrity Verification

Content
View full analysis
~/.nadfun/skills/SKILL.md curl -s https://nad.fun/abi.md > ~/.nadfun/skills/ABI.md curl -s https://nad.fun/agent-api.md > ~/.nadfun/skills/AGENT-API.md curl -s https://nad.fun/create.md > ~/.nadfun/skills/CREATE.md curl -s https://nad.fun/indexer.md > ~/.nadfun/skills/INDEXER.md curl -s https://nad.fun/quote.md > ~/.nadfun/skills/QUOTE.md curl -s https://nad.fun/token.md > ~/.nadfun/skills/TOKEN.md curl -s https://nad.fun/trading.md > ~/.nadfun/skills/TRADING.md curl -s https://nad.fun/wallet.md > ~/.nadfun/skills/WALLET.md ``` ### Technical Analysis These commands replace local Skill instructions with mutable remote content without checking a cryptographic digest, signature, immutable version, or trusted release manifest. The downloads are not directly piped into a shell, but Skill Markdown controls subsequent agent behavior and can contain operational instructions that an agent may follow. The use of silent `curl` also lacks explicit failure handling. An HTTP or network failure may leave empty, partial, or inconsistent files. Downloading modules individually creates an additional version-consistency risk if the remote files change during installation. This is a supply-chain trust issue rather than evidence that the currently reviewed files are malicious. No malicious remote payload was found in the supplied artifact. ### Attack Path 1. The NadFun publishing account, web server, DNS configuration, TLS termination point, or content-delivery environment is compromised. 2. An attacker modifies one or more remotely hosted Skill Markdown files. 3. A user executes the documented installation commands. 4. The commands overwrite the locally reviewed Skill files with attacker-controlled content. 5. The agent ...[truncated 880 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (24)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · AGENT-API.md (reported line 22)May include surrounding context.

md
| **API Key Management** |                                        |                                         |
| Create API Key         | `POST /api-key`                        | Generate new API key (session required) |
| List API Keys          | `GET /api-key`                         | List your API keys (session required)   |
| Revoke API Key         | `DELETE /api-key/:id`                  | Deactivate API key (session required)   |

## Authentication

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · AGENT-API.md (reported line 136)May include surrounding context.

md
---

### 3. Revoke API Key (`DELETE /api-key/:id`)

Deactivate an API key. Requires session cookie.

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

Generate a new API key. Requires session cookie (login).

bash
curl -X POST https://api.nadapp.net/api-key \
  -H "Content-Type: application/json" \
  -H "Cookie: session=<your_session_cookie>" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · AGENT-API.md (reported line 55)May include surrounding context.

Generate a new API key. Requires session cookie (login).

bash
curl -X POST https://api.nadapp.net/api-key \
  -H "Content-Type: application/json" \
  -H "Cookie: session=<your_session_cookie>" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · AGENT-API.md (reported line 108)May include surrounding context.

Generate a new API key. Requires session cookie (login).

bash
curl -X POST https://api.nadapp.net/api-key \
  -H "Content-Type: application/json" \
  -H "Cookie: session=<your_session_cookie>" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · AGENT-API.md (reported line 141)May include surrounding context.

Generate a new API key. Requires session cookie (login).

bash
curl -X POST https://api.nadapp.net/api-key \
  -H "Content-Type: application/json" \
  -H "Cookie: session=<your_session_cookie>" \
  -d '{

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide instructs users to upload images and metadata to third-party API endpoints that then publish content to IPFS, but it does not clearly warn that this transmits data externally and can make it permanently public. Users may unintentionally disclose proprietary, personal, or sensitive information under the mistaken assumption that the process is local or reversible.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

This example explicitly transmits a local image file and API key to an external service. In the context of this skill, that behavior is expected, but it remains security-relevant because it can expose user-provided content and credentials to third-party infrastructure if users are not clearly informed.

Content

Scanner excerpt · CREATE.md (reported line 96)May include surrounding context.

md
API_URL="https://dev-api.nad.fun"  # testnet
# API_URL="https://api.nadapp.net"  # mainnet

curl -X POST "${API_URL}/agent/token/image" \
  -H "Content-Type: image/png" \
  -H "X-API-Key: nadfun_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  --data-binary @my-token.png

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The create step sends a signed on-chain transaction with attached value, spending wallet funds for deployment fees, optional initial buy, and gas, yet the guide does not prominently warn that this is irreversible. A user following the instructions may authorize a real blockchain transaction without fully understanding the financial consequences.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document is introduced as a 'Token Creation Skill' and the earlier sections are scoped to the 4-step token creation flow. However, the later section adds a separate capability to query claimable rewards and submit on-chain reward claims via the CreatorTreasury contract, which is distinct from token creation.

Content

No source excerpt is available for this finding.

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

md
| TRADING.md   | https://nad.fun/trading.md   |
| WALLET.md    | https://nad.fun/wallet.md    |

mkdir -p ~/.nadfun/skills
curl -s https://nad.fun/skill.md > ~/.nadfun/skills/SKILL.md
curl -s https://nad.fun/abi.md > ~/.nadfun/skills/ABI.md
curl -s https://nad.fun/agent-api.md > ~/.nadfun/skills/AGENT-API.md

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The authentication examples retrieve a session cookie and API key, then show them being reused in subsequent requests, but the guidance only says to store the API key securely and does not provide equally clear handling requirements for the session cookie or broader secret-management precautions. In an agent skill context, developers may copy this flow verbatim into logs, traces, notebooks, or shared automation, causing credential leakage and unauthorized account access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs loading a raw private key from an environment variable and immediately deriving a signing account, but it does not warn about secret-handling risks or safer alternatives. In agent or automation environments, this can normalize unsafe credential practices, increasing the risk of key leakage through logs, misconfiguration, prompt exposure, or insecure runtime environments, leading to full wallet compromise.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill includes direct approve and transfer operations that move assets or delegate spending rights, but it does not place an explicit safety warning near those sections about irreversible token movement, spender trust, and approval risk. In an agent skill context, copy-paste-ready transaction code without prominent warnings increases the chance that users or autonomous systems execute harmful transactions without understanding the consequences.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill’s written guidance says approvals should be limited to what is needed, but elsewhere it provides copy-paste examples and a full workflow that perform unlimited ERC-20 approvals. This inconsistency is dangerous because users or downstream agents may follow the executable examples rather than the prose, granting a spender indefinite access to drain tokens later if that spender is compromised, upgraded, or malicious.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The guide explicitly encourages mainnet trading and includes complete transaction-building examples, but it does not prominently warn users that mainnet actions use real funds, are irreversible, and can result in financial loss from slippage, bad token selection, approvals, or router misuse. In a skill intended to help automate trades, omission of such warnings increases the chance that a user will run examples against mainnet without understanding the risk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The example explicitly prints a freshly generated private key to the console, which can expose wallet secrets through terminal history, CI logs, cloud logging, screen sharing, or copied output. Although the document later warns against printing private keys, the earlier runnable example normalizes unsafe handling and is likely to be copied directly by users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Logging the generated private key at the point of creation exposes the most sensitive wallet credential without any immediate warning or guardrail. In skill/documentation context, this is especially risky because readers often copy snippets verbatim, causing accidental secret disclosure in local logs or shared execution environments.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The import example uses a hardcoded private key literal placeholder in code, which can encourage developers to embed real secrets directly in source files. Even if shown as a placeholder, this pattern is commonly copied into production code and contradicts the later guidance to use environment variables or a secret manager.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The complete example again prints the private key, and complete examples are the most likely to be reused wholesale by developers. This increases the chance of real secret leakage into logs, screenshots, debugging tools, or hosted runner output, especially because the wallet is immediately connected to a client for transaction signing.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file-level introduction presents ABI exports as a comprehensive reference, and the Lens section specifically frames this content as read-only queries. However, the same exported ABI file contains many nonpayable/payable functions for trading, token creation, approvals, burns, claims, and configuration changes. This creates an intent/documentation mismatch for readers treating the file's documented section purpose as representative of the exported interfaces.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation includes code snippets that hardcode an API key variable directly in source examples. Even though the value is a placeholder, this normalizes insecure developer behavior and increases the chance that users will paste real secrets into code, commit them to repositories, or expose them in logs and client bundles.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The complete example hardcodes an API key in executable sample code without an immediate warning, which can lead users to copy the pattern into production integrations. This is especially risky in agent ecosystems where sample code is often reused verbatim, causing credential leakage through source control, prompts, telemetry, or frontend exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The rewards-claim flow culminates in an on-chain claim transaction that changes contract state and incurs gas costs, but the documentation does not clearly flag that this is an irreversible wallet action. While claiming usually benefits the user, the omission can still cause uninformed signing behavior.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
AGENT-API.md:236

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
CREATE.md:32

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
WALLET.md:21