Questions tagged [sandbox]

Sandbox is a security mechanism for containing untrusted programs. Such programs could contain malicious code, which would harm the user's system.

Filter by
Sorted by
Tagged with
4
votes
0answers
45 views

Sandbox file system for Java

I've recently started work on a hobby project that's basically a sandbox file system written in Java, slightly inspired by PhysicsFS. The point of the project is to separate what files a user can read/...
0
votes
0answers
58 views

Sandboxing untrusted JavaScript execution by redeclaring variables

Suppose, via AJAX, I downloaded a string jsCode containing JavaScript code from a (potentially malicious) third-party website. I want to allow the code to implement ...
0
votes
0answers
2k views

Python script to execute Bash code inside of a Docker container

Motivation I like using so-called online judges and competitive programming sites to practice coding (e.g. CodeWars, Exercism, HackerRank, etc.). I was thinking that it would be nice to try write my ...
4
votes
1answer
63 views

modifying globals, “window”, “global” and other objects, in a restorable way

Primary Concerns As long as the stash is not within scope, globals such as window/global would effectively be sanitized of any risky methods, such as eval The API feels complete, am I missing ...
25
votes
3answers
10k views

Sandbox or safely execute eval

In a large project of mine, I've run into a situation where a client might need to run evaluated JavaScript code. I know, it makes me cringe too. One option is to manually parse it, but for future ...
6
votes
1answer
2k views

JavaScript Sandbox Pattern

Based on this Stack Overflow question I came up with the following code. I'd like your general thoughts about it. Code style, functional, logical, disadvantages, just anything you can come up based ...