Securing a script such as grade.sh is difficult, as
it requires balancing functional and security requirements.
To begin with, it is a priori unclear what authority
grade.sh needs to execute correctly. While the
author of the script may know, the user must examine
the code to try to determine what authority it requires.
If the user can identify the required resources,
she can use existing tools for sandboxing program execution
(e.g., [20, 3, 15, 14]) to achieve the coarse-grained
security requirements. However, it is difficult to use the
same tools to enforce the fine-grained security requirements
described above. This is because achieving these
requirements requires that each invocation of grade.sh
is given different privileges, i.e., it must be executed in a
differently configured sandbox. Configuring all of these
sandboxes correctly is error prone, so users often forgo