Skip to content

Security: mocasus/trade-agent

Security

SECURITY.md

Security Policy

πŸ›‘οΈ Supported Versions

Version Supported
1.0.x βœ… Active
< 1.0 ❌ Pre-release, no security backports

🚨 Reporting a Vulnerability

Do not open a public GitHub issue for security vulnerabilities.

If you discover a vulnerability β€” especially one that could leak API keys, drain funds, or compromise a deployed instance β€” please report it privately:

Include:

  1. Description of the issue and its impact
  2. Steps to reproduce β€” minimal config / commands
  3. Affected versions if known
  4. Your suggested fix if you have one (optional)

Response time

  • Initial acknowledgement: within 48 hours
  • Severity triage: within 7 days
  • Patch + disclosure: depends on severity (see below)

Disclosure timeline

  • Critical (key leak, RCE, fund drain) β€” patch in < 7 days, coordinated disclosure
  • High (privilege escalation, denial of service) β€” patch in < 14 days
  • Medium / Low β€” patch in next minor release

⚠️ Known Risk Surfaces

These are inherent to the project's design β€” keep them in mind when deploying:

API keys

  • All exchange + LLM keys live in .env β€” never commit this file
  • .gitignore excludes .env by default
  • Rotate keys after any suspected leak

Paper mode default

  • The agent ships in paper mode to prevent accidental real-money trades
  • Switching to live mode requires an explicit config flag β€” review before deploying
  • Always run paper for at least 1 week on a new strategy before going live

LLM prompt injection

  • News + sentiment plugins fetch external text and pass it to the LLM
  • A malicious news article could attempt to override the system prompt
  • Mitigations: prompt isolation, rate limits, decision sanity checks (built-in)
  • Don't trust LLM output blindly β€” risk guards must always run after the LLM decision

Notifier plugins

  • Telegram / Discord webhooks can leak trade data if URLs are exposed
  • Treat webhook URLs as secrets β€” store in .env, never in code

Dependency vulnerabilities

  • Run pip audit periodically β€” we don't have automated CVE scanning yet
  • Pin versions in production (pip freeze > requirements.lock.txt)

πŸ”’ Best Practices for Operators

If you deploy trade-agent on a VPS:

  • βœ… Run as non-root user (the systemd unit ships with User=tradeagent)
  • βœ… Restrict outbound network to known exchange + LLM endpoints
  • βœ… Enable 2FA on every exchange account
  • βœ… Use API keys with trading-only scope β€” no withdrawal, no transfer
  • βœ… IP-whitelist API keys at the exchange where possible
  • βœ… Set daily loss limits in both the agent config AND the exchange
  • βœ… Monitor journalctl -u trade-agent β€” set up Telegram alerts for crashes

πŸ“œ Disclosure Hall of Fame

Researchers who responsibly disclose will be credited here (with your permission).

No reports yet.


Thank you for helping keep trade-agent users safe. πŸ™

There aren't any published security advisories