wiremod / wire-cpu

Legacy CPU/GPU/SPU as a separate addon.
Apache License 2.0
8 stars 6 forks source link

Sandboxes the ZVM #48

Closed DerelictDrone closed 9 months ago

DerelictDrone commented 9 months ago

Every compiled function from an emitted block is now wrapped in a stripped down environment containing only the necessary libraries, and the VM's contents

Platforms that require extra libraries or outside variables add them to VM.Env to allow the VM to access them

thegrb93 commented 9 months ago

You'd need to make a list of the library functions to give access to. Giving access to the _G libs themselves allows them to be modified. Also some functions can return Vector or Angle types which can then be manipulated to crash/sandbox break

DerelictDrone commented 9 months ago

You'd need to make a list of the library functions to give access to. Giving access to the _G libs themselves allows them to be modified. Also some functions can return Vector or Angle types which can then be manipulated to crash/sandbox break

Fair point, have done that now.