Files
20260512-skg-tk/api/requirements.txt
kang 3ed3f721eb fix(api): harden subprocess/SSRF/concurrency and add db pool
- run(): add timeout (download 600s via DOWNLOAD_TIMEOUT_SECONDS, else 300s);
  TimeoutExpired now kills the child and fails the job instead of hanging forever
- create_job: validate_source_url() rejects file://, private/loopback/link-local
  IPs and off-allowlist hosts (SOURCE_URL_ALLOWED_HOSTS) — closes SSRF/local-read
- per-job RLock guards save_state/update/update_generated_video and the retry
  check-and-set so concurrent video workers can't clobber state.json
- db: psycopg_pool connection pool (graceful fallback if unavailable); write
  failures surfaced via logging.error instead of silent print
- read-only media GET routes use job_path() (no mkdir) to stop empty-dir spam
- wrap remaining Image.open() in with-blocks to avoid fd leaks

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 02:04:59 +08:00

16 lines
275 B
Plaintext

fastapi==0.115.4
uvicorn[standard]==0.32.0
pydantic==2.9.2
python-multipart==0.0.12
python-dotenv==1.0.1
yt-dlp==2026.3.17
openai==1.55.3
httpx==0.27.2
requests==2.32.5
psycopg[binary]==3.2.3
psycopg-pool==3.2.4
imagehash==4.3.1
Pillow>=11.0
numpy>=2.0
faster-whisper==1.1.1