serenity-chokepoint-analysis

Fail

Audited by Gen Agent Trust Hub on Aug 15, 2026

Risk Level: HIGHCREDENTIALS_UNSAFEPROMPT_INJECTIONEXTERNAL_DOWNLOADSCOMMAND_EXECUTIONREMOTE_CODE_EXECUTION
Full Analysis
  • [CREDENTIALS_UNSAFE]: The file backend/activate_live.py contains hardcoded Alpaca API credentials: API Key AKFXJMHJMY5FGIQ6BOHFMNV277 and Secret Key EYMG9LGMZk7Ch15y4qepy2smzodsQZzpFeNx2aFeza5J. Storing secrets in plain text within scripts is a major security vulnerability.
  • [PROMPT_INJECTION]: The system implements a 'super-prompt' architecture in backend/deepseek_ai.py that ingests untrusted data from over 27 RSS feeds and Exa semantic search results. These headlines and summaries are interpolated directly into prompts for trading decisions without sanitization, escaping, or strict boundary markers. This creates a significant surface for indirect prompt injection attacks where malicious headlines could influence financial execution.
  • [EXTERNAL_DOWNLOADS]: The installation script install-trader-stack.sh performs multiple unversioned clones of external GitHub repositories (e.g., ai-berkshire, serenity-skill, financial-services). README.md also instructs users to install Ollama via a curl | sh pipe, which is a risky installation method.
  • [COMMAND_EXECUTION]: Many management and background scripts (e.g., backend/rl_pipeline.py, backend/weekly_focus_review.py, backend/news_watch.py) use the subprocess module to execute shell commands and other Python processes. While functional for a trading bot, this increases the risk of command injection if any user-influenced data reaches these calls.
  • [REMOTE_CODE_EXECUTION]: The model management logic in backend/rl_policy_model.py uses pickle.load() to deserialize XGBoost models. If an attacker manages to write a malicious pickle file to the rl_models/ directory, it could lead to arbitrary code execution when the model is loaded.
Recommendations
  • HIGH: Downloads and executes remote code from: https://data.alpaca.markets/v2/stocks/{symbol}/trades/latest, https://ollama.com/install.sh - DO NOT USE without thorough review
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Aug 15, 2026, 06:09 PM
Security Audit — agent-trust-hub — serenity-chokepoint-analysis