Should extension scripts be run in a sandbox?

Posted by Cubic on Programmers See other posts from Programmers or by Cubic
Published on 2012-11-18T12:05:46Z Indexed on 2012/11/18 17:22 UTC
Read the original article Hit count: 300

Filed under:
|
|

In particular, this is about game extensions written in lua (luajit-2.0). I was contemplating whether I should restrict what these scripts can do, and arrived at the conclusion that I probably shouldn't:

  • It's hard to get right. Sounds silly, but chances are my sandbox is gonna end up leaky anyways.

  • The only benefit I could think of would be giving users some sense of security when running third party scripts.

  • The disadvantages would be that it's just incredibly annoying for extension writers. That is, for now, myself (game content will be mostly scripted).

The reason I'm asking this now before I actually have anything presentable is that adding a sandbox early on is easy, but would impose said annoying restrictions on myself too. However if I first go on with it and then later decide I do need a sandbox after all, I'm gonna run into problems (I'd either have to rewrite the scripts that are already there, or introduce some form of trust management system which seems to be more trouble than it's worth).

© Programmers or respective owner

Related posts about game-development

Related posts about scripting