[Mod] Security [security]

prestidigitator
Member
 
Posts: 640
Joined: Thu Feb 21, 2013 23:54

[Mod] Security [security]

by prestidigitator » Sat Apr 11, 2015 23:45

Note: This thread contains only a brief description and release announcements. For more details, see the wiki page: http://wiki.minetest.net/Mods/Security

Creates a transparent sandboxed Lua environment for Minetest, restricting other mods' access to the OS, filesystem, and debug capabilities.

In order to use this mod, it must load before all other mods, including those in the Minetest game being loaded. To ensure this, make sure every mod has the depends.txt file in its base directory and that one of the lines in the file reads "security?". If this isn't done, not only will it break the security guarantees, but mods that load before this one may not be able to correctly access global variables.

This mod has no dependencies and provides no external API.

Comments and criticisms are welcome and encouraged. In fact, community support is essential for improving security. Try this with other mods and see if anything crashes. Report incompatibilities. Review the code, try to find holes and break the rules, and please report when you succeed.

Virtual Filesystem

Code: Select all
/
|- tmp/
|- world/
|- mods/
   |- mod1/
   |- mod2/
   |- mod3/
   .
   .


Mod Details

Required Minetest Version: 0.4.12 (likely to work in other versions, but not tested)

Dependencies: (none)

Reverse Dependencies: (all installed mods)

Copyright and Licensing

Author: Prestidigitator

License: WTFPL

Change History

Version 1.0

  • Released 2015-04-11
  • First working version, tested against luacmd, minetest_game, moretrees, and the plantslife modpack.

Version 1.1

  • Whitelisted some extra LuaJIT and Minetest utility functions.
  • Fixed io.flush typo.
Last edited by prestidigitator on Mon Jun 01, 2015 22:29, edited 1 time in total.
 

prestidigitator
Member
 
Posts: 640
Joined: Thu Feb 21, 2013 23:54

Re: [Mod] Security [security]

by prestidigitator » Sat Apr 11, 2015 23:47

Apparently there's built-in Lua sandboxing being introduced for Minetest 0.5. Nevertheless, this mod may be useful for people before then or as a reference implementation for comparing security measures.
 

prestidigitator
Member
 
Posts: 640
Joined: Thu Feb 21, 2013 23:54

Re: [Mod] Security [security]

by prestidigitator » Mon Jun 01, 2015 22:30

Released version 1.1 with minor fixes and API additions (for LuaJIT and Minetest—still 0.4.12).
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 3 guests