Repository navigation
v0.5.0
This release improves the interpreter's resource accounting and error normalization. It is the result of a security review by Claude Fable 5 and Claude Opus 4.8. The sandbox boundary (no access to filesystem, network, or subprocesses and no introspection escape) was also reviewed. The review found no problems with it.
-
Fixes:
- Limited integer magnitude. Starlark integers are now capped at
MAX_INT_BITS = 2^19bits (approximately 158k decimal digits). - Large integers are now charged against the heap counter by bit length.
float,bool, andNoneremain uncharged. - Narrowed the error handler for argument binding so a genuine internal
TypeErrorraised inside a builtin is no longer mislabeled as an argument error. - Replaced leaked Python exceptions with
EvalError:- Added a guard for the
%cstring-format conversion:'%c' % 1114112and oversized values now raise anEvalErrorinstead of leaking a PythonValueError/OverflowError. This matches thechr()builtin. - Limited structural recursion in value comparison. Code like
x == x,x in [x], andsorted([x, x])on a deeply nested value constructed at runtime will now raise anEvalErrorinstead of leaking aRecursionError. - Stringifying an oversized integer (via
str,repr,%s,%d, orfoo.format()) now raises anEvalErrorinstead of leaking CPython'sValueErroroverint_max_str_digits. - Changed builtin dispatch to normalize unexpected Python exceptions to
EvalError. Resource-limit exceptions still propagate as-is.MemoryErroris deliberately re-raised because it is an error of the host environment.
- Added a guard for the
- Limited integer magnitude. Starlark integers are now capped at
-
Documentation:
- Documented the new limits in
security/threat-model.mdand the README. - Marked the two 2026-05-05 security reviews superseded. They predate resource limiting.
- Documented the new limits in