Back to skill

Security audit

00001 Grid Trading Bot

Security checks for vulnerabilities and agentic risk

Overview

This is a local demo-only trading bot skill with sensitive inputs, but the artifacts clearly scope it to sandbox use and avoid storing or returning secrets.

Install only if you intend to run a local sandbox trading lab. Use demo or sandbox API credentials only, keep the service on 127.0.0.1, do not expose it through tunnels or port forwarding, and rotate any credentials if you accidentally enter live keys.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (8)

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The page collects exchange API credentials and posts them to /api/config for storage without a clear, prominent warning that secrets will be transmitted to and persisted by the backend. In the context of a trading bot, API keys and secrets are highly sensitive; silent persistence materially increases the risk of credential theft, misuse, or accidental retention beyond user expectations.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The UI retrieves previously stored apiKey, apiSecret, and passphrase from the backend and repopulates the form fields automatically, again without a warning that sensitive credentials are being fetched from storage. This expands exposure to shoulder surfing, browser compromise, XSS in any part of the app, and user misunderstanding about where secrets reside.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"test": "node tests/security.test.js"
  },
  "dependencies": {
    "ccxt": "^4.2.0",
    "dotenv": "^16.3.1",
    "express": "^4.18.2",
    "undici": "^6.23.0"
Confidence
90% confidence
Finding
The dependency uses a caret range, which allows npm to install newer minor or patch releases than the version reviewed. This weakens build reproducibility and can unexpectedly introduce vulnerable or incompatible code through the supply chain, though by itself it is not evidence of exploitation.

Unpinned Dependencies

Low
Category
Supply Chain
Content
},
  "dependencies": {
    "ccxt": "^4.2.0",
    "dotenv": "^16.3.1",
    "express": "^4.18.2",
    "undici": "^6.23.0"
  }
Confidence
90% confidence
Finding
The dotenv package is specified with a caret range, so future installs may resolve to a different version than originally tested. This creates supply-chain and reproducibility risk because a later release could contain a security issue or breaking behavior.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"dependencies": {
    "ccxt": "^4.2.0",
    "dotenv": "^16.3.1",
    "express": "^4.18.2",
    "undici": "^6.23.0"
  }
}
Confidence
95% confidence
Finding
Express is referenced with a caret version, which permits silent upgrades within the major version line. In this file that risk is more meaningful because the currently referenced base version is also flagged with known advisories, so installs may be inconsistent and security posture harder to reason about.

Unpinned Dependencies

Low
Category
Supply Chain
Content
"ccxt": "^4.2.0",
    "dotenv": "^16.3.1",
    "express": "^4.18.2",
    "undici": "^6.23.0"
  }
}
Confidence
95% confidence
Finding
Undici is specified with a caret range, which allows different resolved versions across environments. Given the package is separately flagged for multiple known advisories, leaving it unpinned increases uncertainty and may expose consumers to vulnerable transitive behavior or inconsistent fixes.

Known Vulnerable Dependency: express==4.18.2 — 2 advisory(ies): CVE-2024-43796 (express vulnerable to XSS via response.redirect()); CVE-2024-29041 (Express.js Open Redirect in malformed URLs)

Low
Category
Supply Chain
Confidence
86% confidence
Finding
The project declares express 4.18.2, which has published advisories including XSS via response.redirect and open redirect handling in malformed URLs. Whether the issue is exploitable depends on server.js usage, but keeping a dependency with known web-routing flaws in an Express-based bot service creates a real attack surface if redirects or user-influenced URLs are used.

Known Vulnerable Dependency: undici==6.23.0 — 9 advisory(ies): CVE-2026-1525 (Undici has an HTTP Request/Response Smuggling issue); CVE-2026-6733 (undici vulnerable to HTTP response queue poisoning via keep-alive socket reuse); CVE-2026-1527 (Undici has CRLF Injection in undici via `upgrade` option) +6 more

High
Category
Supply Chain
Confidence
97% confidence
Finding
The project declares undici 6.23.0, which is associated with multiple HTTP parsing and smuggling-related advisories. Because this bot likely performs outbound API communication and may expose a local service, flaws in a core HTTP client can enable request smuggling, header injection, or response handling attacks that could affect integrity and confidentiality in network interactions.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access, suspicious.exposed_secret_literal

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
bot/tests/security.test.js:35

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
bot/tests/security.test.js:37

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
bot/public/index.html:795

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
bot/tests/security.test.js:62