What’s the best way to safely run user-submitted code on a website?

0
7
Asked By CuriousCoder92 On

I'm developing a website where users can write or upload code to be executed, somewhat like platforms such as Leetcode or Codeforces. I'm seeking advice on how to implement this safely and cost-effectively. Is it possible to use a hosting service that can provide a secure environment, like a sandbox, to run this kind of user-generated code? Any insights or recommendations would be greatly appreciated!

3 Answers

Answered By OpenSourceAdvocate On

Instead of trying to build your own system from scratch, consider using an open-source solution to navigate the security challenges of running user code. Judge0 is a solid option that you can self-host or access via their API, and then there's also Piston, which might fit your needs.

Answered By CodeWizard123 On

As someone who's fairly new, I'd say this project might be a bit beyond the typical beginner level. It's a complex task that even experienced developers might struggle with, so proceed with caution.

Answered By DevHackerman On

Are we aiming high here? Writing your own interpreter for a secure user code execution environment is definitely not a starter project—it can get very complicated. You're better off using pre-built solutions or focusing on simpler projects to gain experience first.

CuriousCoder92 -

You're right, I should stick to existing resources rather than trying to create everything myself!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.