Security fixes are applied to the latest minor release on the main branch.
| Version | Supported |
|---|---|
0.5.x (latest) |
✅ |
< 0.5.1 |
❌ (upgrade to >=0.5.1) |
RegimeLab is designed with defensive controls around model loading, local artifact storage, external volatility feeds, configuration parsing, and HTML report generation:
- Safe Model Serialization (
FittedRegime):.npzmodel bundles are loaded strictly withallow_pickle=Falseto prevent arbitrary code execution via NumPy object arrays, reject symlinks, enforce bounded metadata (10 MiB) and uncompressed ZIP archive limits (200 MiB), and validate array shapes, numeric dtypes, finiteness, positive scale, state mappings, and row-stochastic transition matrices. - Path-Traversal & Storage Hardening:
RunStore,ParquetProvider, andload_aligned_panelvalidate artifact names and ticker symbols against strict allow-lists, reject symlinks, directory escapes (is_relative_to), and Windows reserved device names, persist files atomically viaos.replace(), and redact home directory paths (~) in run manifests and provider identifiers. - External Data Ingestion: official volatility feeds (CBOE/FRED) enforce
https://-only URLs and redirects, bound downloaded CSV payloads (20 MiB), and fail closed on TLS verification errors (ssl.SSLError). Third-party market data feeds (yfinanceand upstream vendors) operate outside RegimeLab's trust boundary. - Configuration & Reporting:
--configTOML loading fails closed on missing or malformed files, blocks unknown keys and Pydantic settings keyword injection (_env_file,_secrets_dir), and rejects non-finite floats (NaN/Inf).HTMLReportescapes dynamic values withhtml.escape(..., quote=True)and defaults to offline embedded Plotly scripts rather than external CDN injection.
Important boundary: RegimeLab is a quantitative research, regime-detection, and backtesting library — not a brokerage gateway, order-execution engine, or investment advisor. Regime outputs and backtest metrics carry no guarantee of live trading performance, and upstream market-data vendor outages or corrupted quotes must be validated independently before live deployment.
Please do not open a public GitHub issue for suspected security vulnerabilities.
Instead, report vulnerabilities privately via GitHub Security Advisories:
Include a concise description of the issue, affected version, reproduction steps, and potential impact. We aim to acknowledge reports within 72 hours and coordinate a fix before public disclosure.