4 Scripting Go: Putting Lua Behind Bars

vilkeliskis.com posted by tadasv 2555 days ago  

In the previous article I showed you how we can run lua scripts inside Go applications. In real world scenarios you'd want to put in more effort to make sure that we are guarded against rogue scripts.

A rogue is a script that:

Runs some commands that should not be allowed.

Or it steals resources from the main application.

For example, if we're allowing third parties to pass arbitrary scripts to our application, we may want to ensure that this script has no access to networking or system libraries.

Another example of a malicious script, is a script that runs indefinitely. There could be an error in a loop causing the script to never finish. We may also want to ensure that we're having more control around how much memory can be allocated in the VM.

These are the topics I am going to cover in this post.

Register to comment or vote on this story