1. A computer implemented method for determining a security policy based on execution of application code, comprising: executing an application in a runtime module on a computer; dynamically logging runtime execution data for the application during the execution of the application in the runtime module; identifying one or more security related events generated during the execution of the application from the dynamically logged runtime execution data for the application; determining a minimal security policy for the application from the one or more security related events generated during the execution of the application; determining whether an existing security policy contained in a database coupled to the computer matches the minimal security policy determined for the application; suggesting the existing security policy for the application in response to determining that the existing security policy contained in the database matches the minimal security policy determined for the application; and creating a new security policy for the application in response to determining that the existing security policy contained in the database does not match the minimal security policy determined for the application.