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.pycontains hardcoded Alpaca API credentials: API KeyAKFXJMHJMY5FGIQ6BOHFMNV277and Secret KeyEYMG9LGMZk7Ch15y4qepy2smzodsQZzpFeNx2aFeza5J. 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.pythat 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.shperforms multiple unversioned clones of external GitHub repositories (e.g.,ai-berkshire,serenity-skill,financial-services).README.mdalso instructs users to install Ollama via acurl | shpipe, 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 thesubprocessmodule 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.pyusespickle.load()to deserialize XGBoost models. If an attacker manages to write a malicious pickle file to therl_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