Security Issues for iOS

Security Issues

2.1.1 (User refresh token located in manifest.json)

All the sensitive data have to be stored in secure manner, for example using encrypted SQL storages, keychain or Secure Enclave.
done in React Native.

2.1.2 (Authentication response cached in database in plain text)

All the sensitive data have to be stored in secure manner, for example using encrypted SQL storages, keychain or Secure Enclave.

not done

2.1.3 (SSL pinning is not implemented)

done

2.1.4 (App screenshot information disclosure)

To protect sensitive data, block caching of application snapshots using API configuration or code.

done

2.1.5 (App Transport Security (ATS) is disabled)


done

2.1.6 Application does not clear cached data after logout

Caching functionality helps to operate application with data more reliable in terms of performance, but have to clear it in certain scenarios, one of them is logout.

done

2.1.7 (Application permissions have to be reviewed)
2.1.8 (Application contains DEV setting plist)

should be done when EXPO is removed

2.1.9 (No source code obfuscation)
2.1.10 (can run on jailbroken phones)

not sure

Remove data in your Cache folder

First let’s look at the contents of your cache folder. Notice the use of NSCachesDirectory macro.

[0] [15:12:53] fsCachedData
[0] [15:12:53] Users
[0] [15:12:53] Cache.db-shm
[0] [15:12:53] Cache.db-wal
[0] [15:12:53] Cache.db

and they are located in:

/Users/rickytsao/Library/Developer/CoreSimulator/Devices/F19D977F-B37C-4DA5-98DA-6C1B2ADCD500/data/Containers/Data/Application/44CF2644-6491-4A4A-9A5C-9DA0F405A45E/Library/Caches/com.rocktree.app/

source code to do this:

Device.h

Device.m

Call the code in React Native

ProfilesDetailsScreen/index.js

Import NativeModules from react native

In the log out handler, call the bridge function.

Thus, when you log out, it bridges to the iOS module. the iOS module manages to access its cached data and remove whatever was saved there.

Snapshots

snapshots:
https://stackoverflow.com/questions/7520076/prevent-ios-from-taking-screen-capture-of-app-before-going-into-background

place overlay image when the app is about to resign. and remove this overlay when its about to become active.