1. A computer-implemented method for generating security permissions for computer applications, the method comprising: carrying out static analysis on an application to determine security exceptions and to determine components of the application responsible for the security exceptions; analysing the determined security exceptions to calculate permissions required for each of the components; formatting a security policy file including a hierarchy of required permissions, the formatting based on a type of the application; and applying the security policy file to the application to provide a security enabled application.