BriskVM 2 let's you decide what to expose to the scripts. There is a special file (the "command set" file) in which you list all the functions, types and global variables exposed to the scripts (using pretty much the same syntax as in scripts). Nothing else is exposed, so scrips cannot access anything that they are not supposed to. And there is no pointer arithmetic either so scripts cannot forge bad pointers and access random memory.
Concerning infinite loops, there is no language on earth that I am aware of that can prevent them. However, if you're really afraid of potential lockups, it is possible to run scripts with a timeout, so if say after 1 second a script has not returned yet (and was supposed to return quickly), then you can be pretty sure something is wrong and the script is automatically interrupted.
As for stack overflows, they are reported as an execution error.
So yes, I think BriskVM 2 definitely fits the needs you expose.
As always, the best thing to do is to test it and check by yourself. There is an older public beta available on my site, and the new one will be vailable soon.
Concerning infinite loops, there is no language on earth that I am aware of that can prevent them. However, if you're really afraid of potential lockups, it is possible to run scripts with a timeout, so if say after 1 second a script has not returned yet (and was supposed to return quickly), then you can be pretty sure something is wrong and the script is automatically interrupted.
As for stack overflows, they are reported as an execution error.
So yes, I think BriskVM 2 definitely fits the needs you expose.
As always, the best thing to do is to test it and check by yourself. There is an older public beta available on my site, and the new one will be vailable soon.