Back to skill

Security audit

b402 Private DeFi

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-aligned for private DeFi, but it asks users to run mutable third-party install code and grants fund-moving wallet authority with limited safety disclosure.

Review this carefully before installing. Use only a reviewed pinned package version, keep wallet funds limited, protect or isolate `WORKER_PRIVATE_KEY` and `~/.b402/wallet.json`, and require manual review of every transaction route, amount, destination, and chain before signing.

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

Error
Location
SKILL.md:28
Finding

Unpinned Third-Party npm Package Is Downloaded and Executed

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (3)

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The install command uses npx b402-mcp@latest, which fetches and executes whatever code is current at install time rather than a reviewed, immutable version. In a skill that patches local config, registers an MCP server, and handles a private key for fund-moving operations, a compromised or malicious package update could immediately lead to code execution, credential theft, or unauthorized transactions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill states that installation generates a wallet at ~/.b402/wallet.json, but it does not clearly warn users that this creates sensitive key material on disk. For a financial skill managing private DeFi activity, undocumented local key storage increases the risk of accidental exposure through weak file permissions, backups, logs, malware, or multi-user systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill exposes tools for shielding, swapping, lending, redeeming, bridging, and executing multi-step strategies, but it does not present a prominent warning that these actions can transfer funds across multiple protocols and chains with irreversible outcomes. In this context, the omission is especially dangerous because the skill is explicitly designed to move assets privately and 'gaslessly,' which may reduce user friction and encourage high-trust execution without understanding bridge, routing, slippage, smart contract, or destination-address risks.

Content

No source excerpt is available for this finding.