Expand description
Recursion limits configuration for sqry.
This module enforces recursion depth limits to prevent resource exhaustion and stack overflow attacks from deeply nested code structures.
§Security Model
Defense-in-depth approach with multiple layers:
- Default limits: Conservative defaults (100 file ops, 1000 expr fuel)
- Configurable limits: Users can adjust based on their needs
- Hard caps: Absolute maximums that cannot be bypassed (200 file ops, 10,000 expr fuel)
- Validation: All values validated against hard caps to prevent config injection
§Attack Vectors Mitigated
- Stack overflow: Deep recursion exhausting call stack
- Resource exhaustion: Unbounded recursion consuming CPU/memory
- Config injection: Malicious config files setting extreme limits
- AST bombs: Pathological inputs with extreme nesting depth
Structs§
- Recursion
Limits - Recursion limits configuration