feat: sandbox Lua script VMs (ADR-0027 amendment, tech-debt #25) #120

Closed
akadmin wants to merge 0 commits from feat/lua-sandbox into main
Owner

Scene scripts are untrusted code. VMs are now created via new_sandboxed_vm:
stdlib whitelisted to MATH|STRING|TABLE|COROUTINE (base-lib dofile/loadfile
nilled), 64 MiB memory limit, and a per-tick 5M-instruction count hook so
'while true do end' disables the one script instead of hanging the fixed
tick. An engine-provided print (tagged with the entity) replaces the stdlib
one. mlua's send feature enabled (Lua: Send + Sync, ADR-0055 thread rule 1).

Roadmap item 35 (Tier 1), first sub-item.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

Scene scripts are untrusted code. VMs are now created via new_sandboxed_vm: stdlib whitelisted to MATH|STRING|TABLE|COROUTINE (base-lib dofile/loadfile nilled), 64 MiB memory limit, and a per-tick 5M-instruction count hook so 'while true do end' disables the one script instead of hanging the fixed tick. An engine-provided print (tagged with the entity) replaces the stdlib one. mlua's send feature enabled (Lua: Send + Sync, ADR-0055 thread rule 1). Roadmap item 35 (Tier 1), first sub-item. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
feat: sandbox Lua script VMs (ADR-0027 amendment, tech-debt #25)
All checks were successful
CI / build (pull_request) Successful in 4m21s
c7f4e1bd8f
Scene scripts are untrusted code. VMs are now created via new_sandboxed_vm:
stdlib whitelisted to MATH|STRING|TABLE|COROUTINE (base-lib dofile/loadfile
nilled), 64 MiB memory limit, and a per-tick 5M-instruction count hook so
'while true do end' disables the one script instead of hanging the fixed
tick. An engine-provided print (tagged with the entity) replaces the stdlib
one. mlua's send feature enabled (Lua: Send + Sync, ADR-0055 thread rule 1).

Roadmap item 35 (Tier 1), first sub-item.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
akadmin closed this pull request 2026-07-13 01:22:23 +00:00
All checks were successful
CI / build (pull_request) Successful in 4m21s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
akadmin/NemesisEngine!120
No description provided.