How much has phonegap been hardened against attackers? Especially XSS flaws in our own pages, where the PhoneGap API is exposed to an unknown attacker.
For example, is the PhoneGap.exec() command secure on the iPhone?
From JavaScript, the PhoneGap.exec
command worries me e.g. PhoneGap.exec(successCB, errorCB, "com.phonegap.contacts","search", [{"fields":fields, "findOptions":options}]);
(JavaScript for iPhone target copied from here). The exec command should in theory be restricted, and should only be able to access PhoneGap API classes (com.phonegap.contacts in this example) and methods (e.g. search in this example).
If there is an XSS vunerability in our app then any attacker has an expanded attack surface compared with running in just the browser sandbox. The end user's phone is exposed to to any vulnerabilities in PhoneGap that could allow an attacker to gain access to privileged ObjectiveC code/api's. The only documentation I could find on PhoneGap security was this.