Skip to content

Commit f5e21ac

Browse files
authored
docs: Add Limitations section to README (#233)
Warn operators about areas where they will need to take extra care.
1 parent 5751cc8 commit f5e21ac

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,25 @@ Python code, and runs it using jail_code, modifying the globals dictionary as a
257257
side-effect. safe_exec does this by serializing the globals into and out of
258258
the subprocess as JSON.
259259

260+
Limitations
261+
-----------
262+
263+
* If codejail or AppArmor is not configured properly, codejail will default to
264+
running code insecurely (no sandboxing). It is not secure by default.
265+
* Sandbox isolation is achieved via AppArmor confinement. Codejail facilitates
266+
this, but cannot isolate execution without the use of AppArmor.
267+
* Resource limits can only be constrained using the mechanisms that Linux's
268+
rlimit makes available. While rlimit can limit the size of any one file that
269+
a process can create, and can limit the number of files it has open at any
270+
one time, it cannot limit the total number of files written, and therefore
271+
cannot limit the total number of bytes written across *all* files.
272+
A partial mitigation is to constrain the max execution time. (All files
273+
written in the sandbox will be deleted at end of execution, in any case.)
274+
* Sandboxes do not have strong isolation from each other. Under proper
275+
configuration, untrusted code should not be able to discover other actively
276+
running code executions, but if this assumption is violated then one sandbox
277+
could theoretically interfere with another one.
278+
260279
Reporting Security Issues
261280
-------------------------
262281

0 commit comments

Comments
 (0)