Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Sandboxing eval #3

Open
jtrakk opened this issue Mar 11, 2021 · 7 comments
Open

Sandboxing eval #3

jtrakk opened this issue Mar 11, 2021 · 7 comments

Comments

@jtrakk
Copy link

jtrakk commented Mar 11, 2021

I see there are some caveats here:

"if the user imports any code with anything other than using X: something_safe. Users will need to be cautious of eval available on most module objects, for example."

Is it possible to prevent these threats too?

@cmcaine
Copy link
Owner

cmcaine commented Mar 11, 2021 via email

@cmcaine
Copy link
Owner

cmcaine commented Mar 11, 2021 via email

@jtrakk
Copy link
Author

jtrakk commented Mar 11, 2021

This is entirely speculative, I don't have any investment in this kind of project, but: I think it would be very cool to have an object-capability system in julia. So I can restrict the capabilities of functions I call, and they can restrict the functions they call, etc.

@cmcaine
Copy link
Owner

cmcaine commented Mar 12, 2021 via email

@jtrakk
Copy link
Author

jtrakk commented Mar 12, 2021

I wonder what other restrictions can be applied from within julia. Like all the cgroupsv2 and nsjail things: network access, filesystem access, memory limits, etc.

@cmcaine
Copy link
Owner

cmcaine commented Mar 12, 2021

Yep, that's on the cards. Tho, as far as I know, all of those restrictions apply at the process level, but Julia can start new processes with OS-level restrictions like those, so long as it has the permission to do so.

@jtrakk
Copy link
Author

jtrakk commented Apr 30, 2021

I don't exactly understand this but maybe it's possible to have different permissions for different threads?
https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#threads

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants