WithSecureLabs / needle

The iOS Security Testing Framework
https://mobiletools.mwrinfosecurity.com/
Other
1.33k stars 283 forks source link

Fix logic issue in "code_checks.py" #240

Closed Yogehi closed 6 years ago

Yogehi commented 6 years ago

Currently, line 171 of "code_checks.py" instructs Needle to carry out "add_issue" within "/needle/core/framework/module.py". This function requires the following info:

self.APP_METADATA['bundle_id']
self.meta['path']

The issue is that "self.APP_METADATA['bundle_id']" requires the user to have obtained the metadata of an application on their iPhone. One way to obtain this information is to run the module "binary/info/metadata".

The proposed fix tells Needle to not run "add_issue" within "module.py". This allows the static code check to complete without having to rely on "self.APP_METADATA['bundle_id']" not being NULL.

HenryHoggard commented 6 years ago

If we can I want to fix this not by disabling functionality, but instead fixing the core issue. Possible solutions are to present the app picker for this module so the user can choose an app and set the bundle id, or alternatively we can set the bundle_id as an argument, but I think plan A is better.

marco-lancini commented 6 years ago

Agree with @HenryHoggard