-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README.md to mention removal of policy support
- Loading branch information
Showing
1 changed file
with
3 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
# java-sandbox-agent [![Build Status](https://github.com/DMOJ/java-sandbox-agent/workflows/build/badge.svg)](https://github.com/DMOJ/java-sandbox-agent/actions/) | ||
Policy-based Java sandbox with instrumentation support for online judges. | ||
Java class sandbox with instrumentation support for online judges. | ||
|
||
It implements: | ||
|
||
* [**security policy-based sandboxing**](https://docs.oracle.com/javase/7/docs/technotes/guides/security/PolicyFiles.html) (see [**DMOJ/judge**](https://github.com/DMOJ/judge) for [example policy](https://github.com/DMOJ/judge/blob/master/dmoj/executors/java-security.policy)) | ||
* a much faster, [unsynchronized ASCII-only `System.out` stream](https://github.com/DMOJ/java-sandbox-agent/blob/master/src/main/java/ca/dmoj/java/UnsafePrintStream.java) that's suitable for single-threaded online-judging scenarios | ||
* support for **disallowing particular classes from being loaded**, to force certain solutions trivialized by the standard library | ||
* optional **unbuffering of standard output**, for interactive problems without requiring users to flush manually | ||
* logging of exceptional exits to a state file | ||
|
||
## Usage | ||
|
||
To run a class `Submission` with agent and policy stored in `/code`, the following suffices: | ||
To run a class `Submission` with agent the following suffices: | ||
|
||
``` | ||
$ java -client -javaagent:/code/java-sandbox-agent.jar=policy:/code/policy[,option ...] Submission | ||
$ java -client -javaagent:/code/java-sandbox-agent.jar=[option, ...] Submission | ||
``` | ||
|
||
Supported fields for the `option` list are: | ||
|
||
* `nobigmath` — disables `BigInteger` and `BigDecimal`, raising [appropriate exceptions](https://github.com/DMOJ/java-sandbox-agent/blob/master/src/main/java/ca/dmoj/java/BigIntegerDisallowedException.java) if they are used | ||
* `unicode` — encodes `System.out` as UTF-8 instead of ASCII, sacrificing performance for Unicode support | ||
* `nobuf` — sets `System.out` as being line-buffered, for interactive problems | ||
|