in reply to Re^2: Extending a perl program with Scheme, Lua, or JS
in thread Extending a perl program with Scheme, Lua, or JS

Thanks, I've redone the code as you suggested: https://github.com/bcrowell/opengrade/blob/master/Extension.pm

However, Scheme is a general-purpose programming language, and as I've pointed out previously, this feature is designed to run user-defined scheme code. So there's no need to do injection or quoting. If you're a malicious person writing a Trojan horse, the thing to do would be simply to put the malicious code in there, and if you can get someone to open your file, it will run. Nothing else can fix this unless Guile can be sandboxed. Protecting against injection and quoting would become helpful only if there was also sandboxing. I've asked in a couple of places for suggestions on how to sandbox Guile:

http://lists.gnu.org/archive/html/guile-user/2019-02/threads.html#00025

https://stackoverflow.com/questions/54640307/sandboxing-guile-by-deleting-unwanted-libraries

No replies yet. It may just be necessary to turn off the extension mechanism by default, and let users know that if they activate it, they will be running arbitrary code from any person who gives them a file to open.

  • Comment on Re^3: Extending a perl program with Scheme, Lua, or JS