You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(security): prevent panics and add internal error handling
- Fix date builtin to validate strftime format strings before formatting,
preventing chrono panic on invalid specifiers like %Q
- Add Internal error variant for unexpected failures with safe messaging
- Update threat model with TM-INT-xxx category for internal error handling:
- TM-INT-001: Builtin panic recovery via catch_unwind
- TM-INT-002: Panic info leak prevention (sanitized errors)
- TM-INT-003: Date format validation
- TM-INT-004/005/006: Error message safety
- Add comprehensive tests for date format validation and error handling
- Update interpreter comment to clarify panic catching applies to all builtins
The implementation ensures that:
1. Invalid inputs produce human-readable error messages
2. Panics are caught and converted to safe error responses
3. No internal details (paths, addresses, stack traces) are exposed
4. Scripts continue execution after recoverable errors
https://claude.ai/code/session_01XjPeQtrNSz8tEaRXgFuHnx
0 commit comments