Tried three different ways to sandbox today, succeeded with RestrictedPython.
The beautiful part is that this just added 4 lines to my exec_proc_agent() function.
This is doing several layers of processing. Sandboxing, forced recompiling or caching functions for speed. And that single try catch loop makes it unnecessary for most proc agents from having to use try catch. Also the status is logging, so they don't need to do it themselves either, just return how the function worked.
This was the override for open in the framework, when a proc agent calls open in their code, this is the open that gets called instead, you can intercept anything in a function and override it.
And this is the setup for the function that I showed you that executes the proc agent in a sand box.
No comments:
Post a Comment