🚀 Release Notes - v0.3.10¶
TaipanStack v0.3.10 is here! This release focus on security hardening, performance optimizations, and strict typing compliance. We've also crossed the 1000+ tests milestone, ensuring maximum reliability for your Python stack.
🔒 Security Hardening¶
- ReDoS Protection: Fixed a potential Regular Expression Denial of Service vulnerability by enforcing
\Zanchors instead of$in all string-based validators. This ensures pattern matching stops exactly at the end of the string, preventing backtrack-heavy evaluations. (#255) - Hashing Security: Internal utilities now restrict hashing algorithms to high-security variants (
sha256,sha512), explicitly disallowing weaker algorithms likemd5orsha1. (#181) - Filesystem Guards: Enhanced
guard_path_traversalwith stricter canonicalization logic and expanded test coverage for nested symlink edge cases. (#179) - Credential Protection: Implemented guards in
subprocesswrappers andstructlogprocessors to prevent accidental credential leakage in error message logs. (#175) - Secure Models: All internal user-related schemas now inherit from
SecureBaseModel, providing automatic field redaction for sensitive data during serialization. (#177)
⚡ Performance & Efficiency¶
- Regex Precompilation: Sanitization patterns in
sanitize_stringare now precompiled, resulting in a 20% performance improvement on high-frequency sanitization calls. (#245) - SSRF Optimization: Refactored the SSRF guard to leverage the Python
ipaddresslibrary for network range evaluations, significantly speeding up host resolution checks. (#178)
🛡️ Resilience & Reliability¶
- Clock-Jump Resistance: The
RateLimiternow usestime.monotonic()instead oftime.time(), making it immune to system clock jumps (e.g., NTP updates or manual adjustments). (#252) - Retry Logic Fix: Resolved a critical bug in the exponential backoff calculation that caused chaotic behavior when attempt counts were manually manipulated or negative. (#229)
🔧 Modernization & Refactoring¶
- Python 3.10+ Patterns: Embraced structural pattern matching (
match/case) inutils/cache.pyanddefault_encoderfor cleaner, more efficient branching logic. (#250, #227) - Cyclomatic Complexity: Reduced complexity across the security module, breaking down large guards into smaller, testable units. (#253)
- Strict Typing: Finalized renaming of unused variables with
_prefixes and removed hundreds of legacy# noqacomments, achieving full compliance with strict ruff/mypy rules. (#172, #174)
✅ Quality Assurance¶
- 1000+ Tests: We now have 1006 tests with 100% code coverage!
- Result Monad Migration: Migrated the entire internal codebase and test suite from
.ok()/.err()to the modern.ok_valueand.err_valueproperties. (#248)
📦 How to upgrade¶
pip install --upgrade taipanstack
# or with poetry
poetry add taipanstack@latest
Thank you to all contributors who helped make this release possible!