jernejfrank opened a new issue, #1043: URL: https://github.com/apache/burr/issues/1043
`Condition.safe_expr()` restricts Python syntax but does not bound evaluation cost. Its documentation recommends it for less-trusted expressions, such as dashboard rules and user input, so callers can mistake the syntax restrictions for protection against resource exhaustion. Jarek raised this as non-blocking observation (5) in the [0.43.0 RC0 review](https://lists.apache.org/thread/zorws18hwk59p1dpfz2rlyotx41yx3gd). The release cleanup adds a docstring warning; this issue tracks evaluating stronger protections separately from #901 and #1037. Examples currently accepted at construction time include `2 ** 2 ** 30` and `'a' * 10 ** 9`. These were checked for acceptance only, not evaluated, during the investigation. Proposed scope: - Define the supported threat model and what safety guarantees `safe_expr` provides. - Evaluate configurable limits on expression size/depth, operands, intermediate values, and collection/string sizes. - Consider evaluation budgets and whether process isolation with time/memory limits must remain a caller responsibility. - Account for operations on values supplied through state, not just literal expressions. - Preserve reasonable existing expressions and fail predictably when a limit is exceeded. - Add bounded regression tests that exercise limit enforcement without exhausting resources, plus documentation and migration guidance. The goal is an explicit, enforceable resource-safety model. The docstring warning is an immediate clarification, not a substitute for this design work. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
