Back to skill

Security audit

Defi Scout

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it claims, but it reads a shared .env file and writes cache data outside the skill directory, which is broader access than its DeFi lookup purpose needs.

Review before installing. Use it only if you are comfortable sending wallet addresses and query details to public blockchain and market-data APIs. Avoid placing unrelated secrets in the shared .env reachable by this skill, and prefer a version that reads only CMC_API_KEY and stores cache data in a skill-local or explicitly configured cache directory.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/cmc-sentiment.js:8
Finding

Overbroad loading of a project-external secrets file

Content
View full analysis
{ const headers = { 'X-CMC_PRO_API_KEY': CMC_API_KEY, 'Accept': 'application/json', 'User-Agent': 'defi-scout/1.0' }; ``` ### Technical Analysis The script explicitly traverses three directories above the Skill directory and asks `dotenv` to parse a shared `.env` file. Loading that file imports all variables contained in it into the script's process environment, even though the declared functionality requires only `CMC_API_KEY`. This exceeds the minimum filesystem and secret-access scope necessary for retrieving CoinMarketCap sentiment data. The API key could instead be obtained directly from the environment using `process.env.CMC_API_KEY`, without granting the Skill access to a shared secrets file. The current implementation uses the selected key only in the `X-CMC_PRO_API_KEY` header sent over HTTPS to the fixed, declared `pro-api.coinmarketcap.com` host. The reviewed code does not transmit unrelated environment variables, so this is not evidence of intentional secret exfiltration. The risk is the unnecessarily broad availability of secrets to this script and to any compromised dependency or future modification running in the same process. ### Attack Path 1. A user stores `CMC_API_KEY` and potentially unrelated credentials in the shared ...[truncated 1095 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/cmc-sentiment.js:54
Finding

Cache creation and overwrite outside the Skill directory

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is marketed as on-chain intelligence for Optimism and Base, but it also documents off-chain CoinMarketCap sentiment retrieval and local caching. That mismatch can mislead operators about what data leaves the environment, what third parties receive requests, and what data is written locally, creating privacy, trust, and review gaps.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill is marketed as on-chain intelligence for Optimism and Base, but it also documents off-chain CoinMarketCap sentiment retrieval and local caching. That mismatch can mislead operators about what data leaves the environment, what third parties receive requests, and what data is written locally, creating privacy, trust, and review gaps.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is marketed as on-chain intelligence for Optimism and Base, but it also documents off-chain CoinMarketCap sentiment retrieval and local caching. That mismatch can mislead operators about what data leaves the environment, what third parties receive requests, and what data is written locally, creating privacy, trust, and review gaps.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is marketed as on-chain intelligence for Optimism and Base, but it also documents off-chain CoinMarketCap sentiment retrieval and local caching. That mismatch can mislead operators about what data leaves the environment, what third parties receive requests, and what data is written locally, creating privacy, trust, and review gaps.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest description includes very broad trigger conditions such as 'any on-chain financial query,' wallet checks, prices, yields, gas, and protocol names. Overbroad invocation criteria increase the chance that an agent routes unrelated or higher-risk financial requests to this skill, causing unnecessary wallet/address disclosure to third-party endpoints, misleading financial guidance, or execution in contexts the skill was not narrowly designed to handle.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `token-price.js` | CoinGecko price for any token |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `aave-position.js` | Aave V3 health factor + collateral/debt on OP + Base |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `aave-position.js` | Aave V3 health factor + collateral/debt on OP + Base |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `aave-position.js` | Aave V3 health factor + collateral/debt on OP + Base |

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/cmc-sentiment.js (reported line 8)May include surrounding context.

js
* Cache for 24 hours (daily data, no need to hit API every heartbeat)
 */

require('dotenv').config({ path: require('path').join(__dirname, '../../../.env') });
const https = require('https');
const fs = require('fs');
const path = require('path');

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares no explicit tool scope even though its documented behavior requires network access and environment-variable access. In an agent runtime, missing scope declarations can cause the skill to run with broader-than-necessary privileges or make its effective capabilities opaque to reviewers, which weakens least-privilege controls.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest describes this skill as providing on-chain DeFi intelligence for wallet balances, DEX quotes, yields, TVL, gas, and airdrop farming on Optimism and Base. This script instead queries CoinMarketCap's Fear & Greed index and global market metrics such as BTC/ETH dominance and total crypto market cap, which are off-chain, market-wide sentiment data not tied to the stated chain-specific DeFi scope.

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 · scripts/gas.js (reported line 19)May include surrounding context.

js
function getEthPrice() {
  return new Promise((resolve, reject) => {
    https.get('https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd',
      res => { let d = ''; res.on('data', c => d += c);
        res.on('end', () => resolve(JSON.parse(d).ethereum?.usd || 2000)); })
      .on('error', () => resolve(2000));

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/swap-quote.js (reported line 89)May include surrounding context.

js
function getEthPrice() {
  return new Promise((resolve, reject) => {
    https.get('https://api.coingecko.com/api/v3/simple/price?ids=ethereum&vs_currencies=usd',
      res => { let d = ''; res.on('data', c => d += c);
        res.on('end', () => resolve(JSON.parse(d).ethereum?.usd || 2000)); })
      .on('error', () => resolve(2000));

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest describes wallet balances, token prices, DEX quotes, yield opportunities, protocol TVL, gas prices, and airdrop farming on Optimism and Base, but this script specifically queries Across Protocol for cross-chain bridge fees and fill times. Bridge quoting is adjacent to DeFi intelligence, yet it is not mentioned in the manifest description or trigger list, so the implemented behavior is broader than the declared scope.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.