Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to remove RestrictedPython evaluator in secure environments #1709

Open
LucasTrg opened this issue May 28, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@LucasTrg
Copy link
Contributor

I think custom code evaluators are one of the nicest feature we have in agenta. It allows much more flexibility and allows to check for specific business rules, computing bleeding edge metrics, etc... However, developing them with the limitations of RestrictedPython turns an exciting opportunity into a chore and severly restrict what could be achieved.

It would be really nice to have the option to opt out from RestrictedPython during the init process (or a developper mode in the UI). In my case, being a solo dev working on agenta on a machine i set up myself, there is no real benefit from trying to sandbox (which I'm not sure restrictedpython even does.). We're simply writing tests against some string inputs in a docker container.

I understand however the celery-worker running the evaluations mounts the docker.sock, which is a big security risk if we begin arbitrary code on it. An even better solution, could be to properly sandbox the code evaluation in its own dedicated docker, but that's more work and potentially more resource usage and latency.

Let me know what you think !

@dosubot dosubot bot added the enhancement New feature or request label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant