Abstract: A method in a computer system for enforcing a security policy, the method comprising; providing a security policy; compiling the security policy in to security program based on an instruction set of a security virtual machine; loading the security program into an instruction store of the security virtual machine; and upon occurrence of a security enforcement event, executing the instructions of the instruction store based on data of the security enforcement event to enforce the security policy.