dylink.r2py is RepyV2's functional replacement for Python's import statement and lets Repy code import libraries at runtime. encasementlib.r2py provides means for security layers to override, extend or limit the API that is exposed to sandboxed code. Both modules perform important tasks, but their current implementation does not assign features distinctly (so that e.g. dylink offers its own dispatch call).
We should document the required and desired behavior for both modules, and then sort out where and how to best draw the line, and also how to ensure that the features are compatible. For instance, dylink should behave identical to Python's import whenever possible, but pre- and post-seclayer dy_imports must be separated and not refer to cached modules, just like encasementlib separates the last sandbox from every preceding sandbox.
dylink.r2pyis RepyV2's functional replacement for Python'simportstatement and lets Repy code import libraries at runtime.encasementlib.r2pyprovides means for security layers to override, extend or limit the API that is exposed to sandboxed code. Both modules perform important tasks, but their current implementation does not assign features distinctly (so that e.g.dylinkoffers its owndispatchcall).We should document the required and desired behavior for both modules, and then sort out where and how to best draw the line, and also how to ensure that the features are compatible. For instance,
dylinkshould behave identical to Python'simportwhenever possible, but pre- and post-seclayerdy_imports must be separated and not refer to cached modules, just likeencasementlibseparates the last sandbox from every preceding sandbox.