The techniques and mechanisms described herein are directed to a scripting
security mechanism that minimizes security risks associated with
interpreting a script written with a scripting language. An interpreter
recognizes the scripting-language syntax within the script and processes
each line that is designated within a data block using a restrictive set
of operations. The restrictive set of operations are a subset of the
total operations available for processing. If one of the lines within the
data block attempts to perform an operation that is not within the
restrictive set of operations, the interpreter provides an indication,
such as an exception or message explaining the illegal operation. The
interpreter also recognizes a list of export variables associated with
the data block and exports only the variables identified in the list to
an external environment if the export variable meets a constraint
identified for it, if any.