title: How can I create a secure Lua sandbox?
body: <p>So Lua seems ideal for implementing secure "user scripts" inside my application.</p>
  
  <p>However, most examples of embedding lua seem to include loading all the standard libraries, including "io" and "package".</p>
  
  <p>So I can exclude those libs from my interpreter, but even the base library includes the functions "dofile" and "loadfile" which access the filesystem.</p>
  
  <p>How can I remove/block any unsafe functions like these, without just ending up with an interpreter that doesn't even have basic stuff like the "ipairs" function?</p>