See the most frequent issues occurring during integration.
The most frequent issues occurring during integration:
For more general issues or questions, visit FAQ page. You can also check out the Issues section of our GitHub repository, where you can report issues and view existing reports.
The freeRASP has the following prerequisites that must be met before starting.
The Android implementation uses Kotlin serialization plugin; following line has to be added to the plugins block in platforms/android/build.gradle
:
freeRASP requires minSdkVersion
level of >=23, targetSdkVersion
level of >=31 and Kotlin support. Add the following lines to the config.xml
file in your project root directory.
Then run the following command to apply the preferences:
freeRASP plugin uses Swift. Install the following plugin to support Swift in your project.
Install the plugin using Cordova CLI
To ensure freeRASP functions correctly, you need to provide the necessary configuration and initialize it. All required values must be filled in for the plugin to operate properly. Use the following template to configure the plugin. Detailed descriptions of the configuration options are provided on the API page.
For Android apps, you must get your expected signing certificate hashes in Base64 form. You can go through this manual to learn how to sign your app in more detail, including manual signing and using Google's Play app signing.
In the the entry point to your app, import freeRASP and add the code below.
freeRASP executes periodical checks when the application is running. You can handle the detected threats using listeners. For example, you can log the event, show a window to the user or kill the application. See the Threat detection in the wiki to learn more details about the performed checks and their importance for app security.
Threat reactions can be specified inside a JavaScript object, which is then passed into the initialization function:
freeRASP can be started after the Cordova initialization is completed, for example, inside the onDeviceReady
function in the index.js
.
For the version you’re integrating, you can find the specific dSYMs for debugging in Releases.
The easiest way to obfuscate your app is via code minification, a technique that reduces the size of the compiled code by removing unnecessary characters, whitespace, and renaming variables and functions to shorter names. It can be configured for Android devices in android/app/build.gradle
like so:
Additionally, create or extend proguard-rules.pro
in android/app
folder and exclude Cordova’s specific classes that rely on package names from being obfuscated:
Please note that some other modules in your app may rely on reflection, therefore it may be necessary to add corresponding keep rules into proguard-rules.pro file.
If there is a problem with the obfuscation, freeRASP will notify you about it via obfuscationIssues
callback.
Read more about why this is important in the wiki.
freeMalwareDetection is a powerful feature designed to enhance the security of your Android application by quickly and efficiently scanning for malicious or suspicious applications (e.g. Android malware) based on various blacklists and security policies.
It helps to detect apps with suspicious package names, hashes, or potentially dangerous permissions.
Visit the freeMalwareDetection repository to learn more about this feature! For the integration, refer to the integration guide for the Cordova platform.
Description of the freeRASP API
TalsecConfig
Specifies configuration for your app. See the table below for detailed description of the attributes.
field | type | description | sample value |
---|---|---|---|
AndroidConfig
Specifies configuration for instances of the app running on Android devices. See the table below for detailed description of the attributes.
field | type | description | sample value |
---|---|---|---|
IOSConfig
Specifies configuration for instances of the app running on Android devices. See the table below for detailed description of the attributes.
field | type | description | sample value |
---|---|---|---|
NativeEventEmitterActions
Specifies a set of callbacks that are used to notify the application when certain security threat is detected.
const start = async (config: FreeraspConfig,
eventListenerConfig: NativeEventEmitterActions): Promise<void>
Method is used to start freeRASP's audit and set up listeners for threats.
threat | type | Android | iOS |
---|---|---|---|
androidConfig
AndroidConfig?
Configuration for Android apps
any AndroidConfig instance
iosConfig
IOSConfig?
Configuration for iOS apps
any IOSConfig instance
watcherMail
string
The value is automatically used as the target address for your security reports. Mail has a strict form 'name@domain.com'
.
'john@example.com'
isProd
boolean?
Defaults to true
when undefined. If you want to use the Dev version to make the development process easier, set the parameter to false
. Make sure that you have the Release version in the production (i.e. isProd set to true)!. To simplify switching between debug and release version of freeRASP based on the build type, you can use BuildConfig.BUILD_TYPE.contains("Release", true)
as a value for isProd
.
true
packageName
string
Package name of the app.
'com.talsec.freerasp.demoapp'
certificateHashes
string[]
Certificate hashes of your app.
['mVr/qQLO8DKTwqlL+B1qigl9NoBnbiUs8b4c2Ewcz0k=']
supportedAlternativeStores
string[]
Package names of the alternative stores. If you publish on the Google Play Store and Huawei AppGallery, as these are already included internally. (You can assign just emptyArray()).
For more information, visit the Detecting Unofficial Installation wiki page.
[ 'com.sec.android.app.samsungapps']
appBundleId
string
Apple Bundle ID for the app
'com.talsec.freerasp.demoapp'
appTeamId
string
Apple Team ID used in the app
'M8AK35...'
privilegedAccess
() => any
debug
() => any
simulator
() => any
appIntegrity
() => any
unofficialStore
() => any
hooks
() => any
deviceBinding
() => any
deviceID
() => any
passcode
() => any
secureHardwareNotAvailable
() => any
obfuscationIssues
() => any
devMode
() => any
adbEnabled
() => any
systemVPN
() => any