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; 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.