What's New
Patch release with security hardening fixes from code review of v0.24.2.
Security Fixes
- SSRF hardening: Chat proxy now uses
ipaddress.is_loopbackinstead of string allowlist — blocks192.168.x.x,10.x.x.x,::ffff:127.0.0.1while correctly allowing127.x.x.xrange - XSS prevention: All server-supplied values (run IDs, model names, error messages, PIDs, eval results) escaped via
escapeHtml()beforeinnerHTMLinjection - Input validation:
Last-Event-IDheader validated withisdigit()beforeint()parse (prevents ValueError 500) - Type safety:
ChatRequest.messagestyped aslist[ChatMessage]withrole+contentPydantic model (prevents arbitrary payload forwarding) - Race condition:
_train_processglobal reads now protected with_train_lock - Error handling:
form_to_yamlexception narrowed toValueError/TypeError(no raw traceback leak) - Schema fix:
Optional[Literal[...]]detection filtersNoneTypefrom args
Tests
- 2 new SSRF tests (reject private IP, allow 127.0.0.2 loopback)
- 2130 total tests, 78 files, 67% coverage
Install / Upgrade
pip install --upgrade soup-cli