1. A computer-implemented method performed by a computerized device, comprising: receiving a security policy associated with usage of an application by a user using a mobile device, the security policy comprising at least one vulnerability indication, wherein the security policy is determined based upon the application and an identity of a user of the mobile device; receiving at least partial code of the application; identifying at least one JavaScript instruction in the code, the at least one JavaScript instruction associated with the security vulnerability; and adding additional JavaScript instructions to the code for handling the security vulnerability, wherein adding the additional JavaScript instructions to the code is performed for the application prior to downloading the application to the mobile device.