# Risk map — harry0703/MoneyPrinterTurbo

> Canonical page: https://codevetter.com/unpack/moneyprinterturbo/risk-map

# Risk map — harry0703/MoneyPrinterTurbo

Scanned commit 3d5f4e421927d61f3eac729cf4b711ac0b69d688 (2026-09-21). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

The largest risk is the default-open posture: empty api_key means no authentication while listen_host defaults to 0.0.0.0, exposing task creation, file uploads, and artifact downloads to the LAN. Redis state uses ast.literal_eval on stored values inside a documented trust boundary. Several code paths shell out (ffmpeg probing of uploaded media, the claude_code provider spawning the local claude CLI). Paid text-to-video providers create billable remote tasks — guarded by CLI confirm flags but only a config/api-key check on the API path. The 8k-line webui/Main.py and duplicated requirements.txt are maintainability hotspots.
- Authentication is opt-in: when app.api_key is empty verify_token returns immediately and every /api/v1 route plus /tasks downloads are open; combined with listen_host='0.0.0.0' default, an unconfigured instance is LAN-exposed (the code only logs a warning at startup). — [app/controllers/base.py#L47-98](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/controllers/base.py#L47-L98) [config.example.toml#L10-26](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/config.example.toml#L10-L26) [app/asgi.py#L26-37](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/asgi.py#L26-L37)
- RedisState._convert_to_original_type applies ast.literal_eval to values read from Redis; the class docstring explicitly documents Redis as a trust boundary — a Redis DB writable by other tenants could inject crafted task records. — [app/services/state.py#L98-107](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/services/state.py#L98-L107) [app/services/state.py#L208-228](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/services/state.py#L208-L228)
- Uploaded media is probed by FFmpeg/ffprobe subprocesses (MATERIAL_VALIDATION_TIMEOUT_SECONDS=120) and PIL for images — attacker-controlled files reach the media toolchain; mitigations are extension whitelist, size caps (200MB video/20MB image), UUID storage names, and filename character sanitization. — [app/services/material_upload.py#L15-80](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/services/material_upload.py#L15-L80) [app/controllers/v1/video.py#L419-455](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/controllers/v1/video.py#L419-L455)
- The claude_code LLM provider shells out to the locally installed `claude` CLI; build_claude_code_env scrubs conflicting ANTHROPIC_*/CLAUDE_CODE_USE_* env vars and Docker deployment requires injecting CLAUDE_CODE_OAUTH_TOKEN — a subscription credential — into the container environment. — [app/services/llm.py#L84-161](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/services/llm.py#L84-L161) [docker-compose.claude.yml](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/docker-compose.claude.yml) [config.example.toml#L379-393](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/config.example.toml#L379-L393)
- Paid material sources (wavespeed, volcengine_seedance, ofox, muapi, metaso_minimax, loomloom) create billable remote tasks; the CLI requires --confirm-*-charge flags and WebUI requires confirmation, but the HTTP API path only checks is_enabled() — an unauthenticated caller could spend money if api_key is unset. — [cli.py#L365-404](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/cli.py#L365-L404) [app/services/task.py#L1390-1447](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/services/task.py#L1390-L1447) [app/services/material.py#L1724-1782](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/services/material.py#L1724-L1782)
- config.toml persists all provider API keys in plaintext at repo root and is rewritten atomically by save_config on WebUI interactions; config.example.toml warns not to commit it, and logs deliberately avoid printing keys (material._redact_secret, llm._sanitize_error_message). — [app/config/config.py#L476-546](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/config/config.py#L476-L546) [config.example.toml#L1-3](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/config.example.toml#L1-L3) [app/services/material.py#L193-226](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/services/material.py#L193-L226)
- webui/Main.py is a single 8,262-line module mixing i18n, settings persistence, task history, upload handling, and generation orchestration — a high blast-radius file where any edit risks regressions across many features. — [webui/Main.py](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/webui/Main.py)
- Duplicate dependency manifests: requirements.txt mirrors pyproject.toml 'for legacy pip' while Docker builds use requirements.txt and CI uses uv.lock — version drift between the two lists would produce different runtime vs tested environments. — [requirements.txt](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/requirements.txt) [pyproject.toml#L15-37](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/pyproject.toml#L15-L37) [Dockerfile#L83-92](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/Dockerfile#L83-L92)
- Dockerfile runs `chmod 777 /MoneyPrinterTurbo` and mounts the whole repo into containers; combined with Streamlit's --server.enableCORS=True in the launch command, container posture is more permissive than the API's own Origin checks. — [Dockerfile#L8](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/Dockerfile#L8) [Dockerfile#L102](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/Dockerfile#L102) [docker-compose.yml](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/docker-compose.yml)
- VideoParams field defaults (subtitle_position, custom_position, subtitle display/animation) read config.ui at class-definition/import time — a stale or invalid config.toml value is frozen into the pydantic model before validation can run; cli.py documents this and keeps its own fallback constants. — [app/models/schema.py#L140-149](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/models/schema.py#L140-L149) [cli.py#L24-32](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/cli.py#L24-L32)
- Cross-post process-liveness detection uses os.kill(pid, 0) on POSIX and a Win32 OpenProcess/GetExitCodeProcess path — best-effort heuristics where a PID reuse could keep a dead task marked busy; foreign-host owners are conservatively treated as alive. — [app/services/task.py#L148-240](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/services/task.py#L148-L240)
- save_config has an EBUSY fallback that writes config.toml in place when atomic replace fails (Docker bind-mounted single file) — a crash mid-write there could leave a truncated config. — [app/config/config.py#L476-546](https://github.com/harry0703/MoneyPrinterTurbo/blob/3d5f4e421927d61f3eac729cf4b711ac0b69d688/app/config/config.py#L476-L546)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
