security/fix-mcp-oauth-deserialization
main
- Replace pickle with JSON + HMAC-SHA256 state serialization - Add constant-time signature verification - Implement replay attack protection with nonce expiration - Add comprehensive security test suite (54 tests) - Harden token storage with integrity verification Resolves: V-006 (CVSS 8.8)
Add atomic_write.py with temp file + rename pattern to prevent Time-of-Check to Time-of-Use race conditions in file operations. CVSS: 7.4 (High) Refs: V-015 CWE-367: TOCTOU Race Condition