Sandbox (computer science)
In computer science, a sandbox refers to an environment where software and potentially dangerous operations can be tested in isolation, thus reducing the chance of collateral damage to the primary system environment resulting from a poorly designed and/or malicious program.
Examples
Java
The Java runtime environment runs all compiled programs in a sandbox to prevent security breaches. The sandboxed environment creates very strict limitations on what resources a Java applet or program can access to prevent malicious programs from running successfully. Java does this using three key strategies:
- security manager - The security manager is a program that Java consults every time it runs a program or applet. The security manager has the option to stop any potentially dangerous operation by generating a security exception and passing it to the operating system.
- bytecode verifier - Before the Java runtime environment runs a compiled program, it verifies the compiled bytecode and flags any suspicious pieces of the code. This normally prevents malicious segments of code from completely executing.