T09 · Insecure Skill Coding Practices
- Location
scripts/tron_api.mjs:62- Finding
TronGrid API Key Disclosed to Unrelated Third-Party Services
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This TRON wallet skill is mostly read-only, but it installs and exposes a much broader persistent tool suite than the wallet-only skill describes, and it can leak configured API keys to non-TronGrid services.
Review carefully before installing. Prefer running the specific wallet commands locally from a reviewed copy instead of the one-command installer. Do not set TRONGRID_API_KEY or TRONSCAN_API_KEY unless the credential handling is fixed, and avoid global MCP or agent integrations unless you want all TRON suite tools available across sessions and projects.
scripts/tron_api.mjs:62TronGrid API Key Disclosed to Unrelated Third-Party Services
scripts/tron_api.mjs:71TronScan API Key Embedded in Request URLs
README.md:13Mutable Remote Installation and Uninstallation Scripts Piped Directly into a Shell
install.sh:66Installer Activates Unpinned Remote Code as Persistent Agent and MCP Configuration
README.md:34Installation Documentation Executes an Unpinned Third-Party Package Through npx
README.md:53Agent Is Directed to Fetch and Follow Mutable Remote Instructions
The manifest explicitly says this skill must not be used for swap/trading and directs swap requests to a different skill, yet the server exposes a swap-quote tool. Even if it only returns quotes, it materially enables trading workflows and undermines policy-based tool separation, allowing an agent to bypass intended routing and user safety boundaries.
The manifest explicitly excludes staking and says to use tron-staking instead, but this server exposes staking list, staking info, and staking APY tools. This breaks capability isolation and lets an agent access staking operations through a skill that users and higher-level routing logic would reasonably trust as wallet-view-only.
The | sh shell-chaining pattern removes the user's opportunity to review downloaded content before execution and turns a remote fetch into immediate code execution. In the context of an AI-agent skill README, this is especially risky because users may copy-paste commands with elevated trust, increasing the chance of silent compromise.
curl -sSL https://raw.githubusercontent.com/TronLink/tronlink-skills/main/install.sh | sh
This automatically detects Claude Code, Cursor, Codex, OpenCode, or Windsurf and configures everything.
The uninstall flow also uses | sh, preserving the same arbitrary code execution risk while encouraging users to run it during cleanup without scrutiny. The skill context does not mitigate this risk; if anything, wallet-related branding may increase user trust and make unsafe execution more likely.
sh uninstall.sh
curl -sSL https://raw.githubusercontent.com/TronLink/tronlink-skills/main/uninstall.sh | sh
Removes MCP registrations, symlinks, copied config files, and `~/.tronlink-skills`.
The declared purpose is narrowly about a wallet-viewing skill for TRON balances, holdings, transaction history, and account info. The actual code does not implement wallet-checking behavior at all; it is an integration-guide shell/documentation file for installing and running the broader TronLink skills suite. It also references unrelated capabilities such as security audits, energy price checks, swaps, representative lists, and resource optimization. This is a materially different primary purpose from the declared wallet-information skill, so it should be flagged as a mismatch.
The description presents a runtime skill for viewing TRON wallet balances, token holdings, and transaction history, with explicit exclusions for swapping and staking. The actual code chunk does not perform wallet/account queries at all. Instead, it is an installation/setup script for the entire TronLink skills package. It modifies the local environment, integrates with multiple AI tools, and advertises broader capabilities including swap and staking. This is a materially different primary purpose and includes undeclared system-modifying capabilities, so the description does not accurately represent the code.
The declared description says this skill should help users inspect TRON wallet balances, token holdings, transaction history, and related account information. The supplied code does none of that. It does not connect to TRON, inspect wallets, read balances, query transaction history, or manage TronLink wallet state. Instead, its primary purpose is uninstalling the TronLink Skills package and related local integrations by deleting files and deregistering tooling. That is a materially different purpose and involves undeclared destructive local system actions, so this is a clear description-behavior mismatch.
Referenced artifact was not completely inspected
node scripts/tron_api.mjs wallet-balance --address <TRON_ADDRESS>
Referenced artifact was not completely inspected
node scripts/tron_api.mjs wallet-balance --address <TRON_ADDRESS>
Referenced artifact was not completely inspected
node scripts/tron_api.mjs wallet-balance --address <TRON_ADDRESS>
Referenced artifact was not completely inspected
node scripts/tron_api.mjs wallet-balance --address <TRON_ADDRESS>
Referenced artifact was not completely inspected
node scripts/tron_api.mjs wallet-balance --address <TRON_ADDRESS>
Referenced artifact was not completely inspected
node scripts/tron_api.mjs wallet-balance --address <TRON_ADDRESS>
The guide exposes swap- and staking-related tools in the same integration surface even though the tron-wallet skill metadata explicitly says not to use this skill for swap/trading or staking. This scope mismatch can cause an agent to over-select this skill or assume authority beyond its declared purpose, increasing the chance of unintended tool use and policy bypass through ambiguous routing.
The explicit use of a pipe into sh chains remote retrieval directly into command execution, eliminating any review barrier and making compromise of the source or delivery path immediately actionable on the host. In an installer that also writes to home-directory agent/plugin locations and modifies project files, this pattern substantially increases the blast radius of a bad update.
# TronLink Skills — One-Command Installer
#
# Usage:
# curl -sSL https://raw.githubusercontent.com/TronLink/tronlink-skills/main/install.sh | sh
#
# Local development (no GitHub needed):
# sh install.sh --local /path/to/tronlink-skills
The manifest for this skill limits scope to TRON wallet balance, holdings, and transaction history, explicitly excluding swap and staking. This installer registers '25 TRON tools' globally and elsewhere describes the package as 'Wallet · Market · Swap · Energy · Stake', indicating installation/integration of a much broader capability set than the wallet skill claims.
The manifest says this skill is for checking TRON wallet information and explicitly says not to use it for swap or staking. The installer banner presents the installed capability set as 'Wallet · Market · Swap · Energy · Stake', which materially exceeds the declared wallet-only scope.
The lockfile pins axios 1.13.5, which is flagged with multiple advisories including SSRF-related proxy handling and prototype-pollution/MITM-style issues. Even though this file is only a dependency manifest, the skill is a TRON wallet/account skill that will likely make outbound RPC/API requests to blockchain infrastructure, so flaws in the HTTP client are security-relevant and can affect request routing, credential handling, or response trust.
form-data 4.0.5 is flagged for CRLF injection via unescaped multipart field names and filenames. This becomes exploitable when attacker-controlled values are inserted into multipart requests; while a wallet balance skill may not heavily rely on multipart uploads, the vulnerable package is still present transitively and could be abused if such request paths exist now or are added later.
ws 8.17.1 is flagged for memory disclosure and memory-exhaustion denial of service issues. Wallet and blockchain tooling commonly use WebSocket connections for subscriptions or live account/transaction updates, so a vulnerable ws version can expose the process to remote instability or data leakage if it connects to malicious or compromised endpoints.
The manifested skill is scoped to wallet balance, holdings, and transaction history, but the MCP server exposes a much broader set of token analytics and market-intelligence tools. This violates least-privilege and creates a capability-expansion path where an agent selecting this wallet skill can perform unrelated market analysis actions the user and orchestrator did not intend.
The module header advertises DEX swap and TRX staking support even though the manifest explicitly excludes those functions. This contradiction is dangerous because operators and automated tooling may trust the manifest while the implementation and documentation quietly encourage higher-risk capabilities.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
trx_24h_volume: trx.usd_24h_vol || 0,
latest_block: sysData.database?.block || sysData.full?.block || 0,
confirmed_block: sysData.database?.confirmedBlock || sysData.solidity?.block || 0,
network_env: sysData.network?.env || "unknown",
},
}));
}
The skill manifest explicitly says this skill must not be used for swap/trading, yet the file exposes swap quote and routing commands and wires them into the CLI. This scope mismatch is dangerous because an orchestrator or downstream agent may invoke trading-related functionality through a wallet-inspection skill, bypassing intended policy separation and increasing the chance of unauthorized or misleading financial actions.
The manifest states staking belongs to another skill, but this file includes staking discovery and reward-related commands. Even if these commands are informational, embedding staking capabilities in the wrong skill undermines least-privilege and can cause an agent to use the wrong tool for sensitive financial workflows.