Back to skill

Security audit

Bridge Cost Optimizer

Security checks for vulnerabilities and agentic risk

Overview

This skill does not appear to steal data or execute transactions, but it can give misleading crypto bridge recommendations because several advertised live quotes are actually local estimates.

Review carefully before installing or relying on this skill for crypto transfers. It does not access wallets or custody funds, but its recommendations may be based on estimates, incorrect token decimals, or Ethereum-only token addresses rather than verified live executable quotes. Treat output as informational only and verify any route directly with the bridge provider before signing a transaction.

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
scripts/bridge_optimizer.py:98
Finding

Simulated bridge estimates are misrepresented as live, executable recommendations

Content
View full analysis
dict | None: """Stargate public quote — LayerZero Scan API.""" try: # Stargate has no fully free quote API; we estimate via known fee structure. # The official path requires their router contract; this returns a structural estimate. # For real production use, integrate @stargatefinance/stargate or call the router. return { "bridge": "Stargate", "fee_usd": round((amount_raw / 1e18) * 0.0005, 4) if token_addr != TOKEN_ADDRESSES_ETH["USDC"] else round((amount_raw / 1e6) * 0.0005, 4), "eta_sec": 120, "hops": 1, "raw": {"note": "structural estimate, not a live quote"}, } except Exception as e: return {"bridge": "Stargate", "error": str(e)} def quote_hop(src: int, dst: int, token_addr: str, amount_raw: int) -> dict | None: try: return { "bridge": "Hop", "fee_usd": round((amount_raw / 1e18) * 0.0010, 4) if token_addr not in (TOKEN_ADDRESSES_ETH["USDC"], TOKEN_ADDRESSES_ETH["USDT"]) else round((amount_raw / 1e6) * 0.0010, 4), "eta_sec": 300, "hops": 2, "raw": {"note": "structural estimate, Hop's live quote requires their SDK"}, } except Exception as e: return {"bridge": "Hop", "error": str(e)} def quote_connext(src: int, dst: int, token_addr: str, amount_raw: int) -> dict | None: try: return { "bridge": "Connext", "fee_usd": round((amount_raw / 1e18) * 0.0003, 4) if token_addr ...[truncated 3459 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/bridge_optimizer.py:75
Finding

Incorrect token decimals, USD conversion, and chain-specific address handling corrupt quote rankings

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:32
Finding

Documentation requires installation of an unnecessary unpinned dependency

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (5)

Tainted flow: 'TIMEOUT' from os.environ.get (line 41, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/bridge_optimizer.py (reported line 46)May include surrounding context.

python
def http_get_json(url: str, headers: dict | None = None) -> dict | list:
    req = urllib.request.Request(url, headers=headers or {})
    with urllib.request.urlopen(req, timeout=TIMEOUT) as r:
        return json.loads(r.read().decode())

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description is packed with broad, generic bridge-related trigger phrases such as 'eth to base', 'USDC bridge', 'cross-chain transfer', and 'bridge aggregator', which can cause the platform to invoke this skill for a wide range of common user requests. Over-broad invocation increases the chance of unintended activation, causing the agent to route user tasks to this skill when another tool or a narrower skill would be more appropriate.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The top-level documentation says the tool will 'compare live bridge quotes and pick the best route' and mentions public quote endpoints. However, only Across and deBridge perform live HTTP quote retrieval, while Stargate, Hop, Connext, and Wormhole return hardcoded structural estimates with notes stating they are not live quotes. This is an active contradiction in the documented intent versus implemented behavior.

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/bridge_optimizer.py (reported line 54)May include surrounding context.

python
cg_id = {"USDC": "usd-coin", "USDT": "tether", "DAI": "dai",
             "ETH": "ethereum", "WETH": "ethereum"}.get(symbol.upper(), symbol.lower())
    try:
        data = http_get_json(f"https://api.coingecko.com/api/v3/simple/price?ids={cg_id}&vs_currencies=usd")
        return float(data[cg_id]["usd"])
    except Exception:
        # Fallback assumptions so the CLI still works offline

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code performs outbound HTTP requests to third-party APIs, and the requests include user-supplied asset, amount, and chain parameters in the URL. While the module docstring mentions public quote endpoints, it does not clearly disclose to the user at execution time that their query data is sent to external services.

Content

No source excerpt is available for this finding.