To improve the ability of an application to process sensitive data, a trusted execution environment (TEE) can be used to store and compute sensitive sources (e.g., variables) from a set of sensitive sources. To make the TEE application language independent, a process can transform specific statements from the application code to a
remote function call that can access the TEE. To identify these statements to transform, a forward and backward taint analysis can be performed to identify the statements to be transformed. The identified statements can be transformed into enclave instructions. At runtime, a
cloak enclave environment within the TEE can execute the enclave instructions as called by the remote call in the application code. The sensitive sources in the identified statements are maintained and computed in the
cloak enclave, grouped by a function runtime instance, which is uniquely identified by uuids.