T09 · Insecure Skill Coding Practices
- Location
scripts/src/trading/auto-trader.ts:286- Finding
Live execution can leave an unhedged Drift position
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real Solana arbitrage tool, but its live-trading code and scheduled runner have safety gaps that could put a wallet's funds at risk.
Install only after careful review. Keep it in scan or dry-run mode unless the live-trading paths are audited and fixed, use a dedicated low-balance wallet, avoid unattended cron with wallet secrets, and do not rely on the advertised risk controls as complete protection against loss.
scripts/src/trading/auto-trader.ts:286Live execution can leave an unhedged Drift position
scripts/src/trading/drift-client.ts:97Hard-coded fallback market data can trigger live orders
scripts/src/trading/position-manager.ts:398Stop-loss and drawdown controls operate on stale zero-valued PnL
scripts/src/dex/jupiter.ts:124Remote API transactions are signed without instruction validation
scripts/cron-runner.sh:15Scheduled runner executes the secret environment file as shell code and uses unsafe npx resolution
A complete absence of funding-rate-specific arbitrage logic, combined with broader spot-arbitrage infrastructure, indicates that the skill may be fundamentally misrepresented. Misrepresentation is especially dangerous in financial automation because users may trust strategy claims when deciding to provide wallet access and enable scheduling.
A complete absence of funding-rate-specific arbitrage logic, combined with broader spot-arbitrage infrastructure, indicates that the skill may be fundamentally misrepresented. Misrepresentation is especially dangerous in financial automation because users may trust strategy claims when deciding to provide wallet access and enable scheduling.
A complete absence of funding-rate-specific arbitrage logic, combined with broader spot-arbitrage infrastructure, indicates that the skill may be fundamentally misrepresented. Misrepresentation is especially dangerous in financial automation because users may trust strategy claims when deciding to provide wallet access and enable scheduling.
A complete absence of funding-rate-specific arbitrage logic, combined with broader spot-arbitrage infrastructure, indicates that the skill may be fundamentally misrepresented. Misrepresentation is especially dangerous in financial automation because users may trust strategy claims when deciding to provide wallet access and enable scheduling.
A complete absence of funding-rate-specific arbitrage logic, combined with broader spot-arbitrage infrastructure, indicates that the skill may be fundamentally misrepresented. Misrepresentation is especially dangerous in financial automation because users may trust strategy claims when deciding to provide wallet access and enable scheduling.
A complete absence of funding-rate-specific arbitrage logic, combined with broader spot-arbitrage infrastructure, indicates that the skill may be fundamentally misrepresented. Misrepresentation is especially dangerous in financial automation because users may trust strategy claims when deciding to provide wallet access and enable scheduling.
A complete absence of funding-rate-specific arbitrage logic, combined with broader spot-arbitrage infrastructure, indicates that the skill may be fundamentally misrepresented. Misrepresentation is especially dangerous in financial automation because users may trust strategy claims when deciding to provide wallet access and enable scheduling.
A complete absence of funding-rate-specific arbitrage logic, combined with broader spot-arbitrage infrastructure, indicates that the skill may be fundamentally misrepresented. Misrepresentation is especially dangerous in financial automation because users may trust strategy claims when deciding to provide wallet access and enable scheduling.
A complete absence of funding-rate-specific arbitrage logic, combined with broader spot-arbitrage infrastructure, indicates that the skill may be fundamentally misrepresented. Misrepresentation is especially dangerous in financial automation because users may trust strategy claims when deciding to provide wallet access and enable scheduling.
The README presents live trading commands alongside scan and dry-run commands without a sufficiently prominent warning that live mode can place real trades using real funds. In a financial automation context, this omission is dangerous because a user can move from exploration to irreversible execution with a single command and limited friction.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
cp .env.example .env
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
cp .env.example .env
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
│ ├── dashboard/ # Web UI │ └── execution/ # Trade execution (future) ├── package.json └── .env
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
mkdir -p "$LOG_DIR"
# Load environment
if [ -f "$HOME/.secrets/.env" ]; then
source "$HOME/.secrets/.env"
fi
source "$HOME/.secrets/.env" executes the contents of the file as shell code, not just environment assignments. If that file is modified by an attacker, replaced via symlink, or populated with malicious shell syntax, the cron job will execute arbitrary commands with the privileges of the user running it, which is especially sensitive in an automated trading context that likely has access to wallet or API secrets.
# Load environment
if [ -f "$HOME/.secrets/.env" ]; then
source "$HOME/.secrets/.env"
fi
# Set defaults
This lockfile pins @solana/web3.js 1.73.2 in a transitive dependency chain, and the cited advisory indicates untrusted input can trigger a crash. In a Solana arbitrage skill that consumes on-chain/network data continuously, an availability bug in a core blockchain client is a real operational risk because malformed RPC or market data can halt monitoring or execution.
axios 1.1.2 is explicitly present as a transitive dependency and has multiple advisories including SSRF/proxy bypass and prototype-pollution-related request handling issues. For a trading/arbitrage skill that fetches remote pricing, funding, and exchange data, unsafe HTTP client behavior can expose internal services, credentials, or allow manipulated outbound requests.
ws 7.5.10 is flagged for memory-exhaustion DoS from fragmented frames, and it is present in the dependency tree. Because this skill likely relies on websocket feeds for Solana market or funding-rate updates, a malformed or hostile websocket peer could degrade or crash the process through resource exhaustion.
@grpc/grpc-js 1.14.3 is included and the advisories describe malformed message/request crashes affecting client or server availability. Since Solana/trading integrations may interact with relays or data services over gRPC, this can create a reachable denial-of-service condition if untrusted or compromised peers send crafted traffic.
@solana/web3.js 1.87.6 appears elsewhere in the dependency graph and is also covered by the same crash-on-untrusted-input advisory. Given this skill's Solana-specific trading role, repeated exposure to external RPC/websocket data makes this more dangerous than in a purely offline package because availability is central to safe arbitrage execution.
axios 1.13.4 is directly locked at the top level and is reported with multiple advisories. While some advisories may depend on specific usage patterns, a network-heavy arbitrage service using axios against external APIs makes at least the request-manipulation, redirect, proxy-bypass, or SSRF classes materially relevant.
bigint-buffer 1.1.5 is present and flagged for a buffer overflow in toBigIntLE(). In blockchain tooling, binary parsing helpers are often used on untrusted serialized data, so a malformed input causing memory corruption or crashes can threaten service stability even if exposure depends on specific call paths.
brace-expansion 1.1.12 is vulnerable to expansion-based DoS, but it is usually only exploitable when attacker-controlled glob or brace patterns are processed. In this package-lock context it is transitive and likely part of tooling rather than runtime request handling, so it is a real dependency weakness with lower practical risk here.
form-data 4.0.5 has a CRLF injection issue in multipart field names/filenames, which can alter outbound multipart requests when untrusted input is embedded. If this skill uploads data or forwards externally supplied filenames/fields to APIs, the bug could enable request smuggling or header/body manipulation against downstream services.
The file implements an automated cross-DEX spot arbitrage engine that signs and submits live Solana transactions, while the skill metadata describes funding-rate arbitrage monitoring/execution. This capability mismatch is dangerous because users may invoke or trust the skill under a lower-risk mental model, but the code can immediately trade on-chain and expose funds to market, execution, and custody risk.
Detected: suspicious.env_credential_access