freerasp-react-native 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +423 -413
  3. package/android/build.gradle +90 -87
  4. package/android/gradle.properties +4 -4
  5. package/android/src/main/AndroidManifest.xml +4 -4
  6. package/android/src/main/java/com/freeraspreactnative/FreeraspDeviceStateListener.kt +25 -0
  7. package/android/src/main/java/com/freeraspreactnative/FreeraspReactNativeModule.kt +125 -108
  8. package/android/src/main/java/com/freeraspreactnative/FreeraspReactNativePackage.kt +17 -17
  9. package/example/Gemfile +6 -6
  10. package/example/android/app/_BUCK +55 -55
  11. package/example/android/app/build.gradle +313 -313
  12. package/example/android/app/build_defs.bzl +19 -19
  13. package/example/android/app/proguard-rules.pro +10 -10
  14. package/example/android/app/src/debug/AndroidManifest.xml +13 -13
  15. package/example/android/app/src/debug/java/com/freeraspreactnativeexample/ReactNativeFlipper.java +73 -73
  16. package/example/android/app/src/main/AndroidManifest.xml +26 -26
  17. package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainActivity.java +48 -48
  18. package/example/android/app/src/main/java/com/freeraspreactnativeexample/MainApplication.java +91 -91
  19. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/MainApplicationReactNativeHost.java +116 -116
  20. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/components/MainComponentsRegistry.java +36 -36
  21. package/example/android/app/src/main/java/com/freeraspreactnativeexample/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -48
  22. package/example/android/app/src/main/jni/CMakeLists.txt +7 -7
  23. package/example/android/app/src/main/jni/MainApplicationModuleProvider.cpp +32 -32
  24. package/example/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -16
  25. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -45
  26. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -38
  27. package/example/android/app/src/main/jni/MainComponentsRegistry.cpp +65 -65
  28. package/example/android/app/src/main/jni/MainComponentsRegistry.h +32 -32
  29. package/example/android/app/src/main/jni/OnLoad.cpp +11 -11
  30. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -36
  31. package/example/android/app/src/main/res/values/strings.xml +3 -3
  32. package/example/android/app/src/main/res/values/styles.xml +9 -9
  33. package/example/android/build.gradle +50 -53
  34. package/example/android/gradle/wrapper/gradle-wrapper.properties +5 -5
  35. package/example/android/gradle.properties +40 -40
  36. package/example/android/gradlew +234 -234
  37. package/example/android/settings.gradle +11 -11
  38. package/example/app.json +3 -3
  39. package/example/assets/checkmark-circle-outline.png +0 -0
  40. package/example/assets/checkmark-circle-outline.svg +1 -0
  41. package/example/assets/close-circle-outline.png +0 -0
  42. package/example/assets/close-circle-outline.svg +1 -0
  43. package/example/assets/talsec-logo.png +0 -0
  44. package/example/babel.config.js +17 -17
  45. package/example/index.js +5 -5
  46. package/example/ios/File.swift +6 -6
  47. package/example/ios/FreeraspReactNativeExample/AppDelegate.h +8 -8
  48. package/example/ios/FreeraspReactNativeExample/AppDelegate.mm +133 -133
  49. package/example/ios/FreeraspReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json +53 -53
  50. package/example/ios/FreeraspReactNativeExample/Images.xcassets/Contents.json +6 -6
  51. package/example/ios/FreeraspReactNativeExample/Info.plist +55 -55
  52. package/example/ios/FreeraspReactNativeExample/LaunchScreen.storyboard +47 -47
  53. package/example/ios/FreeraspReactNativeExample/main.m +10 -10
  54. package/example/ios/FreeraspReactNativeExample-Bridging-Header.h +3 -3
  55. package/example/ios/FreeraspReactNativeExample.xcodeproj/project.pbxproj +4 -2
  56. package/example/ios/FreeraspReactNativeExample.xcodeproj/xcshareddata/xcschemes/FreeraspReactNativeExample.xcscheme +88 -106
  57. package/example/ios/FreeraspReactNativeExample.xcworkspace/contents.xcworkspacedata +10 -10
  58. package/example/ios/FreeraspReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
  59. package/example/ios/FreeraspReactNativeExampleTests/FreeraspReactNativeExampleTests.m +66 -66
  60. package/example/ios/FreeraspReactNativeExampleTests/Info.plist +24 -24
  61. package/example/ios/Podfile +43 -43
  62. package/example/ios/Podfile.lock +590 -584
  63. package/example/metro.config.js +40 -40
  64. package/example/package.json +24 -21
  65. package/example/react-native.config.js +10 -10
  66. package/example/src/App.tsx +136 -89
  67. package/example/src/DemoApp.tsx +89 -0
  68. package/example/src/checks.ts +16 -0
  69. package/example/src/styles.ts +7 -0
  70. package/example/yarn.lock +4644 -4154
  71. package/freerasp-react-native.podspec +36 -36
  72. package/ios/FreeraspReactNative-Bridging-Header.h +3 -3
  73. package/ios/FreeraspReactNative.m +14 -14
  74. package/ios/FreeraspReactNative.swift +62 -53
  75. package/ios/FreeraspReactNative.xcodeproj/xcshareddata/xcschemes/FreeraspReactNative.xcscheme +67 -67
  76. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/Info.plist +40 -40
  77. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -14
  78. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator → TalsecRuntime.xcframework/ios-arm64}/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -25
  79. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +222 -222
  80. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -23
  81. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/curl.h +3029 -3029
  82. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +77 -77
  83. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator → TalsecRuntime.xcframework/ios-arm64}/TalsecRuntime.framework/Headers/easy.h +123 -123
  84. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator → TalsecRuntime.xcframework/ios-arm64}/TalsecRuntime.framework/Headers/mprintf.h +50 -50
  85. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/multi.h +456 -456
  86. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/options.h +68 -68
  87. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/stdcheaders.h +33 -33
  88. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/system.h +504 -504
  89. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +125 -125
  90. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
  91. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +52 -51
  92. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +17 -17
  93. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
  94. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/cacert.pem +3154 -3154
  95. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/module.modulemap +12 -12
  96. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +14 -14
  97. package/ios/{Release/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/CurlWrapper.h +25 -25
  98. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +450 -450
  99. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +23 -23
  100. package/ios/{Release/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/curl.h +3029 -3029
  101. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +77 -77
  102. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/easy.h +123 -123
  103. package/ios/{Release/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/mprintf.h +50 -50
  104. package/ios/{Release/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/multi.h +456 -456
  105. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +68 -68
  106. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/stdcheaders.h +33 -33
  107. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/Headers/system.h +504 -504
  108. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +125 -125
  109. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
  110. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +52 -51
  111. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +52 -51
  112. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +17 -17
  113. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
  114. package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +344 -344
  115. package/ios/{Debug/TalsecRuntime.xcframework/ios-arm64 → TalsecRuntime.xcframework/ios-arm64_x86_64-simulator}/TalsecRuntime.framework/cacert.pem +3154 -3154
  116. package/ios/{Release/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/module.modulemap +12 -12
  117. package/lib/commonjs/index.js.map +1 -1
  118. package/lib/module/index.js.map +1 -1
  119. package/lib/typescript/index.d.ts +36 -35
  120. package/lib/typescript/index.d.ts.map +1 -1
  121. package/package.json +161 -161
  122. package/src/index.tsx +91 -90
  123. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +0 -25
  124. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +0 -222
  125. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/mprintf.h +0 -50
  126. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +0 -68
  127. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/stdcheaders.h +0 -33
  128. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +0 -125
  129. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
  130. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +0 -17
  131. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
  132. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/module.modulemap +0 -12
  133. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +0 -14
  134. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +0 -450
  135. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +0 -3029
  136. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +0 -456
  137. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +0 -504
  138. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
  139. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +0 -51
  140. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
  141. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +0 -3154
  142. package/ios/Debug/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/module.modulemap +0 -12
  143. package/ios/Release/TalsecRuntime.xcframework/Info.plist +0 -40
  144. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +0 -23
  145. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +0 -77
  146. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/easy.h +0 -123
  147. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  148. package/ios/Release/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +0 -51
  149. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CryptoBridgingHeader.h +0 -14
  150. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +0 -25
  151. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime_iOS.h +0 -23
  152. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +0 -3029
  153. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +0 -77
  154. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/easy.h +0 -123
  155. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/mprintf.h +0 -50
  156. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +0 -456
  157. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +0 -68
  158. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/stdcheaders.h +0 -33
  159. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +0 -504
  160. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +0 -125
  161. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  162. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  163. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +0 -51
  164. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +0 -17
  165. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +0 -344
  166. package/ios/Release/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +0 -3154
  167. package/ios/TalsecRuntime.xcframework +0 -1
  168. /package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  169. /package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  170. /package/ios/{Debug/TalsecRuntime.xcframework → TalsecRuntime.xcframework}/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
package/README.md CHANGED
@@ -1,413 +1,423 @@
1
-
2
-
3
- ![FreeRasp](https://raw.githubusercontent.com/talsec/Free-RASP-Community/master/visuals/freeRASPforRN.png)
4
-
5
- ![GitHub Repo stars](https://img.shields.io/github/stars/talsec/Free-RASP-Community?color=green) ![GitHub](https://img.shields.io/github/license/talsec/Free-RASP-Community) ![GitHub](https://img.shields.io/github/last-commit/talsec/Free-RASP-Community) ![Publisher](https://img.shields.io/pub/publisher/freerasp)
6
- # freeRASP for React Native
7
-
8
- freeRASP for React Native is a mobile in-app protection and security monitoring plugin. It aims to cover the main aspects of RASP (Runtime App Self Protection) and application shielding.
9
-
10
- # :notebook_with_decorative_cover: Table of contents
11
-
12
- - [Overview](#overview)
13
- - [Usage](#usage)
14
- * [(Optional) Create a new React Native demo application](#optional-create-a-new-react-native-demo-application)
15
- * [Step 1: Install the plugin](#step-1-install-the-plugin)
16
- * [Step 2: Set up the dependencies](#step-2-set-up-the-dependencies)
17
- * [Step 3: Dev vs Release version](#step-3-dev-vs-release-version)
18
- * [Step 4: Import freeRASP into the app](#step-4-import-freerasp-into-the-app)
19
- * [Step 5: Setup the configuration, callbacks and initialize freeRASP](#step-5-setup-the-configuration-callbacks-and-initialize-freerasp)
20
- * [Step 6: User Data Policies](#step-6-user-data-policies)
21
- - [Security Report](#security-report)
22
- - [Enterprise Services](#bar_chart-enterprise-services)
23
- * [Plans Comparison](#plans-comparison)
24
-
25
- # Overview
26
-
27
- The freeRASP is available for Flutter, Cordova, React Native, Android, and iOS developers. We encourage community contributions, investigations of attack cases, joint data research, and other activities aiming to make better app security and app safety for end-users.
28
-
29
- freeRASP plugin is designed to combat
30
-
31
- * Reverse engineering attempts
32
- * Re-publishing or tampering with the apps
33
- * Running application in a compromised OS environment
34
- * Malware, fraudsters, and cybercriminal activities
35
-
36
- Key features are the detection and prevention of
37
-
38
- * Root/Jailbreak (e.g., unc0ver, check1rain)
39
- * Hooking framework (e.g., Frida, Shadow)
40
- * Untrusted installation method
41
- * App/Device (un)binding
42
-
43
- Additional freeRASP features include low latency, easy integration and a weekly [Security Report](#security-report) containing detailed information about detected incidents and potential threats, summarizing the state of your app security.
44
-
45
- The commercial version provides a top-notch protection level, extra features, support and maintenance. One of the most valued commercial features is AppiCrypt® - App Integrity Cryptogram.
46
-
47
- It allows easy to implement API protection and App Integrity verification on the backend to prevent API abuse:
48
-
49
- * Bruteforce attacks
50
- * Botnets
51
- * Session-hijacking
52
- * DDoS
53
-
54
- It is a unified solution that works across all mobile platforms without dependency on external web services (i.e., without extra latency, an additional point of failure, and maintenance costs).
55
-
56
- Learn more about commercial features at [https://talsec.app](https://talsec.app).
57
-
58
- Learn more about freemium freeRASP features at [GitHub main repository](https://github.com/talsec/Free-RASP-Community).
59
-
60
- # Usage
61
-
62
- We will guide you step-by-step, but you can always check the expected result in the example.
63
-
64
-
65
- ## (Optional) Create a new React Native demo application
66
- Create a new React Native project:
67
-
68
- $ npx react-native init AwesomeProject
69
-
70
- ## Step 1: Install the plugin
71
-
72
- $ npm install https://github.com/talsec/Free-RASP-ReactNative.git
73
-
74
- or
75
-
76
- $ yarn add https://github.com/talsec/Free-RASP-ReactNative.git
77
-
78
- ## Step 2: Set up the dependencies
79
- ### Android
80
- freeRASP needs to have access to the maven repository containing freeRASP. Add following lines into the `android/build.gradle` file, in the `allprojects.repositories` section:
81
- ```gradle
82
- allprojects {
83
- repositories {
84
- google()
85
- mavenCentral()
86
- ... your repositories
87
- maven{url = uri("https://nexus3-public.monetplus.cz/repository/ahead-talsec-free-rasp")}
88
- maven{url = uri("https://developer.huawei.com/repo/")}
89
- maven{url = uri("https://jitpack.io")}
90
- }
91
- }
92
- ```
93
-
94
- ### iOS
95
- freeRASP React Native plugin uses Pods. Navigate to the `ios` folder and run:
96
-
97
- $ pod install
98
-
99
-
100
- ## Step 3: Dev vs Release version
101
- The Dev version is used to not complicate the development process of the application, e.g. if you would implement killing of the application on the debugger callback. It disables some checks which won't be triggered during the development process:
102
-
103
- * Emulator-usage (simulator)
104
- * Debugging (debug)
105
- * Signing (appIntegrity)
106
- * Unofficial store (unofficialStore)
107
-
108
- Which version of freeRASP is used is tied to the application's development stage - more precisely, how the application is compiled.
109
-
110
- ### Android
111
- Android implementation of the React Native plugin detects selected development stage and automatically applies the suitable version of the library.
112
-
113
- * `npx react-native run-android` (debug) -> uses dev version of freeRASP
114
- * `npx react-native run-android --variant release` (release) -> uses release version of freeRASP
115
-
116
- ### iOS
117
- For the iOS implemtation, it's neccesary to add script into the Xcode environment, that automatically switches between the library dev/release versions according to selected development stage. Then, it is necessary to embedd a symlink to correct TalsecRuntime.xcframework.
118
-
119
- 1. Add pre-built script for changing the Debug and Release versions of the framework:
120
- * Open up the **.xcworkspace** file
121
- * Go to **Product** -> **Scheme** -> **Edit Scheme...** -> **Build (dropdown arrow)** -> **Pre-actions**
122
- * Hit **+** and then **New Run Script Action**
123
- * Set **Provide build setting from** to your application
124
- * Copy-paste following script:
125
- ```shell
126
- cd "${SRCROOT}/../node_modules/freerasp-react-native/ios"
127
- if [ "${CONFIGURATION}" = "Release" ]; then
128
- rm -rf ./TalsecRuntime.xcframework
129
- ln -s ./Release/TalsecRuntime.xcframework/ TalsecRuntime.xcframework
130
- else
131
- rm -rf ./TalsecRuntime.xcframework
132
- ln -s ./Debug/TalsecRuntime.xcframework/ TalsecRuntime.xcframework
133
- fi
134
- ```
135
- * **Close**
136
- 3. Add dependency on the symlink
137
- * Go to your **Target** -> **Build Phases** -> **Link Binary With Libraries**
138
- * Add dependency (drag & drop right after **libPods**) on the symlink on the following location:
139
- *AwesomeProject/node_modules/freerasp-react-native/ios/TalsecRuntime.xcframework*
140
- * If there is no symlink, try to create it manually in that folder by the following command:
141
- * $ ln -s ./Debug/TalsecRuntime.xcframework/ TalsecRuntime.xcframework
142
-
143
-
144
- Followingly:
145
- * `npx react-native run-ios` (debug) -> uses dev version of freeRASP
146
- * `npx react-native run-ios --configuration Release` (release) -> uses release version of freeRASP
147
-
148
- ## Step 4: Import freeRASP into the app
149
-
150
- We provide a custom hook that handles all required logic as registration of freeRASP, mounting and unmounting of listeners for you. Import the hook into your app:
151
-
152
- ```ts
153
- import { useFreeRasp } from 'freerasp-react-native';
154
- ```
155
-
156
- ## Step 5: Setup the configuration, callbacks and initialize freeRASP
157
- First, the configuration and callbacks will be explained. Then the **Initialization** chapter shows the implementation.
158
- ### Configuration
159
- You need to provide configuration for freeRASP to work properly and initialize it. The freeRASP configuration contains configs for both Android and iOS. You must fill all the required values for the plugin to work.
160
-
161
- For Android:
162
- - `packageName` - package name of your app you chose when you created it
163
- - `certificateHashes` - hash of the certificate of the key which was used to sign the application. **Hash which is passed here must be encoded in Base64 form.** If you are not sure how to get your certificate hash, you can check out the guide on our [Github wiki](https://github.com/talsec/Free-RASP-Community/wiki/Getting-your-signing-certificate-hash-of-app). Multiple hashes are supported, e.g. if you are using a different one for the Huawei App Gallery.
164
- - `supportedAlternativeStores` _(optional)_ - If you publish on the Google Play Store and/or Huawei AppGallery, you **don't have to assign anything** there as those are supported out of the box.
165
-
166
- For iOS similarly to Android, `appBundleId` and `appTeamId` are required.
167
-
168
- Lastly, pass a mail address to `watcherMail` to be able to get reports. Mail has a strict form `name@domain.com` which is passed as String.
169
-
170
- ### Callbacks
171
-
172
- freeRASP executes periodical checks when the application is running. Handle the detected threats in the **listeners**. For example, you can log the event, show a window to the user or kill the application. Visit our [wiki](https://github.com/talsec/Free-RASP-Community/wiki/Threat-detection) to learn more details about the performed checks and their importance for app security.
173
-
174
- ### Initialization
175
-
176
- You should initialize the freeRASP in the entry point to your app, which is usually in `App.jsx` or `App.tsx`. Just copy & paste this code inside your root component / function, then setup the configuration and reactions to listeners:
177
-
178
- ```ts
179
- // app configuration
180
- const config = {
181
- androidConfig: {
182
- packageName: 'com.awesomeproject',
183
- certificateHashes: ['your_signing_certificate_hash_base64'],
184
- // supportedAlternativeStores: ['storeOne', 'storeTwo'],
185
- },
186
- iosConfig: {
187
- appBundleId: 'com.awesomeproject',
188
- appTeamId: 'your_team_ID',
189
- },
190
- watcherMail: 'your_email_address@example.com',
191
- };
192
-
193
- // reactions for detected threats
194
- const actions = {
195
- // Android & iOS
196
- 'privilegedAccess': () => {
197
- console.log('privilegedAccess');
198
- },
199
- // Android & iOS
200
- 'debug': () => {
201
- console.log('debug');
202
- },
203
- // Android & iOS
204
- 'simulator': () => {
205
- console.log('simulator');
206
- },
207
- // Android & iOS
208
- 'appIntegrity': () => {
209
- console.log('appIntegrity');
210
- },
211
- // Android & iOS
212
- 'unofficialStore': () => {
213
- console.log('unofficialStore');
214
- },
215
- // Android & iOS
216
- 'hooks': () => {
217
- console.log('hooks');
218
- },
219
- // Android & iOS
220
- 'device binding': () => {
221
- console.log('device binding');
222
- },
223
- // iOS only
224
- 'deviceID': () => {
225
- console.log('deviceID');
226
- },
227
- // iOS only
228
- 'missingSecureEnclave': () => {
229
- console.log('missingSecureEnclave');
230
- },
231
- // iOS only
232
- 'passcodeChange': () => {
233
- console.log('passcodeChange');
234
- },
235
- // iOS only
236
- 'passcode': () => {
237
- console.log('passcode');
238
- },
239
- };
240
-
241
- useFreeRasp(config, actions);
242
- ```
243
-
244
- When freeRASP initializes correctly, you should see `freeRASP initialized` message in logs. Otherwise, you'll see warning with description of what went wrong.
245
-
246
- _You can override this default behavior by extending the `actions` object with `'started'` key (to change action after successful initialization), and `'initializationError'` key (to set up action after unsuccessful initialization)_
247
-
248
- ## Step 6: User Data Policies
249
-
250
- Google Play [requires](https://support.google.com/googleplay/android-developer/answer/10787469?hl=en) all app publishers to declare how they collect and handle user data for the apps they publish on Google Play. They should inform users properly of the data collected by the apps and how the data is shared and processed. Therefore, Google will reject the apps which do not comply with the policy.
251
-
252
- Apple has a [similar approach](https://developer.apple.com/app-store/app-privacy-details/) and specifies the types of collected data.
253
-
254
- You should also visit our [Android](https://github.com/talsec/Free-RASP-Android) and [iOS](https://github.com/talsec/Free-RASP-iOS) submodules to learn more about their respective data policies.
255
-
256
- And you're done 🎉!
257
-
258
- If you encounter any other issues, you can see the list of solved issues [here](https://github.com/talsec/Free-RASP-ReactNative/issues?q=is%3Aissue+is%3Aclosed), or open up a [new one](https://github.com/talsec/Free-RASP-ReactNative/issues?q=is%3Aissue+is%3Aopen).
259
-
260
- # Security Report
261
-
262
- The Security Report is a weekly summary describing the application's security state and characteristics of the devices it runs on in a practical and easy-to-understand way.
263
-
264
- The report provides a quick overview of the security incidents, their dynamics, app integrity, and reverse engineering attempts. It contains info about the security of devices, such as OS version or the ratio of devices with screen locks and biometrics. Each visualization also comes with a concise explanation.
265
-
266
- To receive Security Reports, fill out the _watcherMail_ field in [config](#step-3-setup-the-configuration-for-your-app).
267
-
268
- ![dashboard](https://raw.githubusercontent.com/talsec/Free-RASP-Community/master/visuals/dashboard.png)
269
-
270
- # :bar_chart: Enterprise Services
271
- We provide app security hardening SDK: i.e. AppiCrypt®, Customer Data Encryption (local storage), End-to-end encryption, Strings protection (e.g. API keys) and Dynamic Certificate Pinning to our commercial customers as well. To get the most advanced protection compliant with PSD2 RT and eIDAS and support from our experts, contact us at [talsec.app](https://talsec.app).
272
-
273
- ## Commercial version
274
- The commercial version provides a top-notch protection level, extra features, support, and maintenance. One of the most valued commercial features is [AppiCrypt®](https://www.talsec.app/appicrypt) - App Integrity Cryptogram.
275
-
276
- It allows easy to implement API protection and App Integrity verification on the backend to prevent API abuse:
277
-
278
- - Bruteforce attacks
279
- - Botnets
280
- - Session-hijacking
281
- - DDoS
282
-
283
- It is a unified solution that works across all mobile platforms without dependency on external web services (i.e., without extra latency, an additional point of failure, and maintenance costs).
284
-
285
- Learn more about commercial features at [https://talsec.app](https://talsec.app/).
286
-
287
- **TIP:** You can try freeRASP and then upgrade easily to an enterprise service.
288
-
289
-
290
- ## Plans Comparison
291
-
292
- <table>
293
- <thead>
294
- <tr>
295
- <th></th>
296
- <th>freeRASP</th>
297
- <th>Business RASP+</th>
298
- </tr>
299
- </thead>
300
- <tbody>
301
- <tr>
302
- <td colspan=5><strong>Runtime App Self Protection (RASP, app shielding)</strong></td>
303
- </tr>
304
- <tr>
305
- <td>Advanced root/jailbreak protections</td>
306
- <td>basic</td>
307
- <td>advanced</td>
308
- </tr>
309
- <tr>
310
- <td>Runtime reverse engineering controls
311
- <ul>
312
- <li>Debug</li>
313
- <li>Emulator</li>
314
- <li>Hooking protections (e.g. Frida)</li>
315
- </ul>
316
- </td>
317
- <td>basic</td>
318
- <td>advanced</td>
319
- </tr>
320
- <tr>
321
- <td>Runtime integrity controls
322
- <ul>
323
- <li>Tamper protection</li>
324
- <li>Repackaging / Cloning protection</li>
325
- <li>Device binding protection</li>
326
- <li>Unofficial store detection</li>
327
- </ul>
328
- </td>
329
- <td>basic</td>
330
- <td>advanced</td>
331
- </tr>
332
- <tr>
333
- <td>Device OS security status check
334
- <ul>
335
- <li>HW security module control</li>
336
- <li>Screen lock control</li>
337
- </ul>
338
- </td>
339
- <td>yes</td>
340
- <td>yes</td>
341
- </tr>
342
- <tr>
343
- <td>UI protection
344
- <ul>
345
- <li>Overlay protection</li>
346
- <li>Accessibility services protection</li>
347
- </ul>
348
- </td>
349
- <td>no</td>
350
- <td>yes</td>
351
- </tr>
352
- <tr>
353
- <td colspan=5><strong>Hardening suite</strong></td>
354
- </tr>
355
- <tr>
356
- <td>Security hardening suite
357
- <ul>
358
- <li>Customer Data Encryption (local storage)</li>
359
- <li>End-to-end encryption</li>
360
- <li>Strings protection (e.g. API keys)</li>
361
- <li>Dynamic certificate pinning</li>
362
- </ul>
363
- </td>
364
- <td>no</td>
365
- <td>yes</td>
366
- </tr>
367
- <tr>
368
- <td colspan=5><strong>AppiCrypt® - App Integrity Cryptogram</strong></td>
369
- </tr>
370
- <tr>
371
- <td>API protection by mobile client integrity check, online risk scoring, online fraud prevention, client App integrity check. The cryptographic proof of app & device integrity.</td>
372
- <td>no</td>
373
- <td>yes</td>
374
- </tr>
375
- <tr>
376
- <td colspan=5><strong>Monitoring</strong></td>
377
- </tr>
378
- <tr>
379
- <td>AppSec regular email reporting</td>
380
- <td>yes (up to 100k devices)</td>
381
- <td>yes</td>
382
- </tr>
383
- <tr>
384
- <td>Data insights and auditing portal</td>
385
- <td>no</td>
386
- <td>yes</td>
387
- </tr>
388
- <tr>
389
- <td>Embed code to integrate with portal</td>
390
- <td>no</td>
391
- <td>yes</td>
392
- </tr>
393
- <tr>
394
- <td>API data access</td>
395
- <td>no</td>
396
- <td>yes</td>
397
- </tr>
398
- <td colspan=5><strong>Fair usage policy</strong></td>
399
- </tr>
400
- <tr>
401
- <td>Mentioning of the app name in Talsec marketing communication (e.g. "Trusted by Talsec section" on social media)</td>
402
- <td>over 100k downloads</td>
403
- <td>no</td>
404
- </tr>
405
- <tr>
406
- <td>Threat signals data collection to Talsec database for processing and product improvement</td>
407
- <td>yes</td>
408
- <td>no</td>
409
- </tr>
410
- </tbody>
411
- </table>
412
-
413
- For further comparison details (and planned features), follow our [discussion](https://github.com/talsec/Free-RASP-Community/discussions/5).
1
+ ![FreeRasp](https://raw.githubusercontent.com/talsec/Free-RASP-Community/master/visuals/freeRASPforRN.png)
2
+
3
+ ![GitHub Repo stars](https://img.shields.io/github/stars/talsec/Free-RASP-Community?color=green) ![GitHub](https://img.shields.io/github/license/talsec/Free-RASP-Community) ![GitHub](https://img.shields.io/github/last-commit/talsec/Free-RASP-Community) ![Publisher](https://img.shields.io/pub/publisher/freerasp)
4
+
5
+ # freeRASP for React Native
6
+
7
+ freeRASP for React Native is a mobile in-app protection and security monitoring plugin. It aims to cover the main aspects of RASP (Runtime App Self Protection) and application shielding.
8
+
9
+ # :notebook_with_decorative_cover: Table of contents
10
+
11
+ - [Overview](#overview)
12
+ - [Requirements](#requirements)
13
+ - [Usage](#usage)
14
+ - [(Optional) Create a new React Native demo application](#optional-create-a-new-react-native-demo-application)
15
+ - [Step 1: Install the plugin](#step-1-install-the-plugin)
16
+ - [Step 2: Set up the dependencies](#step-2-set-up-the-dependencies)
17
+ - [Step 3: Import freeRASP into the app](#step-3-import-freerasp-into-the-app)
18
+ - [Step 4: Setup the configuration, callbacks and initialize freeRASP](#step-4-setup-the-configuration-callbacks-and-initialize-freerasp)
19
+ - [Step 5: Additional note about obfuscation](#step-5-additional-note-about-obfuscation)
20
+ - [Step 6: User Data Policies](#step-6-user-data-policies)
21
+ - [Security Report](#security-report)
22
+ - [Enterprise Services](#bar_chart-enterprise-services)
23
+ - [Commercial version](#commercial-version)
24
+ - [Plans Comparison](#plans-comparison)
25
+
26
+ # Overview
27
+
28
+ The freeRASP is available for Flutter, Cordova, React Native, Android, and iOS developers. We encourage community contributions, investigations of attack cases, joint data research, and other activities aiming to make better app security and app safety for end-users.
29
+
30
+ freeRASP plugin is designed to combat
31
+
32
+ - Reverse engineering attempts
33
+ - Re-publishing or tampering with the apps
34
+ - Running application in a compromised OS environment
35
+ - Malware, fraudsters, and cybercriminal activities
36
+
37
+ Key features are the detection and prevention of
38
+
39
+ - Root/Jailbreak (e.g., unc0ver, check1rain)
40
+ - Hooking framework (e.g., Frida, Shadow)
41
+ - Untrusted installation method
42
+ - App/Device (un)binding
43
+
44
+ Additional freeRASP features include low latency, easy integration and a weekly [Security Report](#security-report) containing detailed information about detected incidents and potential threats, summarizing the state of your app security.
45
+
46
+ The commercial version provides a top-notch protection level, extra features, support and maintenance. One of the most valued commercial features is AppiCrypt® - App Integrity Cryptogram.
47
+
48
+ It allows easy to implement API protection and App Integrity verification on the backend to prevent API abuse:
49
+
50
+ - Bruteforce attacks
51
+ - Botnets
52
+ - Session-hijacking
53
+ - DDoS
54
+
55
+ It is a unified solution that works across all mobile platforms without dependency on external web services (i.e., without extra latency, an additional point of failure, and maintenance costs).
56
+
57
+ Learn more about commercial features at [https://talsec.app](https://talsec.app).
58
+
59
+ Learn more about freemium freeRASP features at [GitHub main repository](https://github.com/talsec/Free-RASP-Community).
60
+
61
+ # Requirements
62
+
63
+ Following minimal version requirements has to be met
64
+ in order to run freeRASP in your app:
65
+
66
+ - `react-native` >= `0.65.3`
67
+
68
+ # Usage
69
+
70
+ We will guide you step-by-step, but you can always check the expected result in the example.
71
+
72
+ ## (Optional) Create a new React Native demo application
73
+
74
+ Create a new React Native project:
75
+
76
+ $ npx react-native init AwesomeProject
77
+
78
+ ## Step 1: Install the plugin
79
+
80
+ $ npm install https://github.com/talsec/Free-RASP-ReactNative.git
81
+
82
+ or
83
+
84
+ $ yarn add https://github.com/talsec/Free-RASP-ReactNative.git
85
+
86
+ ## Step 2: Set up the dependencies
87
+
88
+ ### Android
89
+
90
+ _All dependencies of freeRASP for Android are resolved automatically._
91
+
92
+ ### iOS
93
+
94
+ freeRASP React Native plugin uses Pods. Navigate to the `ios` folder and run:
95
+
96
+ $ pod install
97
+
98
+ ## Step 3: Import freeRASP into the app
99
+
100
+ We provide a custom hook that handles all required logic as registration of freeRASP, mounting and unmounting of listeners for you. Import the hook into your app:
101
+
102
+ ```ts
103
+ import { useFreeRasp } from 'freerasp-react-native';
104
+ ```
105
+
106
+ ## Step 4: Setup the configuration, callbacks and initialize freeRASP
107
+
108
+ First, the configuration and callbacks will be explained. Then the [Initialization](#initialization) chapter shows the implementation.
109
+
110
+ ### Configuration
111
+
112
+ You need to provide configuration for freeRASP to work properly and initialize it. The freeRASP configuration is an JavaScript object that contains configs for both Android and iOS, as well as common configuration. You must fill all the required values for the plugin to work. Use the following template to provide configuration to the Talsec plugin. You can find detailed description of the configuration below.
113
+
114
+ ```ts
115
+ // app configuration
116
+ const config = {
117
+ androidConfig: {
118
+ packageName: 'com.awesomeproject',
119
+ certificateHashes: ['your_signing_certificate_hash_base64'],
120
+ // supportedAlternativeStores: ['storeOne', 'storeTwo'],
121
+ },
122
+ iosConfig: {
123
+ appBundleId: 'com.awesomeproject',
124
+ appTeamId: 'your_team_ID',
125
+ },
126
+ watcherMail: 'your_email_address@example.com',
127
+ isProd: true,
128
+ };
129
+ ```
130
+
131
+ #### The configuration object should consist of:
132
+
133
+ 1. `androidConfig` _: object | undefined_ - required for Android devices, has following keys:
134
+
135
+ - `packageName` _: string_ - package name of your app you chose when you created it
136
+ - `certificateHashes` _: string[]_ - hash of the certificate of the key which was used to sign the application. **Hash which is passed here must be encoded in Base64 form.** If you are not sure how to get your certificate hash, you can check out the guide on our [Github wiki](https://github.com/talsec/Free-RASP-Community/wiki/Getting-your-signing-certificate-hash-of-app). Multiple hashes are supported, e.g. if you are using a different one for the Huawei App Gallery.
137
+ - `supportedAlternativeStores` _: string[] | undefined_ - If you publish on the Google Play Store and/or Huawei AppGallery, you **don't have to assign anything** there as those are supported out of the box.
138
+
139
+ 1. `iosConfig` _: object | undefined_ - required for iOS devices, has following keys:
140
+ - `appBundleId` _: string_ - Bundle ID of your app
141
+ - `appTeamId` _: string_ - the Apple Team ID
142
+ 1. `watcherMail` _: string_ - your mail address where you wish to receive reports. Mail has a strict form `name@domain.com` which is passed as String.
143
+ 1. `isProd` _: boolean | undefined_ - defaults to `true` when undefined. If you want to use the Dev version to disable checks described [in the chapter below](#dev-vs-release-version), set the parameter to `false`. Make sure that you have the Release version in the production (i.e. isProd set to true)!
144
+
145
+ If you are developing only for one of the platforms, you can skip the configuration part for the other one, i.e., delete the unused configuration.
146
+
147
+ #### Dev vs Release version
148
+
149
+ The Dev version is used to not complicate the development process of the application, e.g. if you would implement killing of the application on the debugger callback. It disables some checks which won't be triggered during the development process:
150
+
151
+ - Emulator-usage (simulator)
152
+ - Debugging (debug)
153
+ - Signing (appIntegrity)
154
+ - Unofficial store (unofficialStore)
155
+
156
+ ### Callbacks
157
+
158
+ freeRASP executes periodical checks when the application is running. Handle the detected threats in the **listeners**. For example, you can log the event, show a window to the user or kill the application. [Visit our wiki](https://github.com/talsec/Free-RASP-Community/wiki/Threat-detection) to learn more details about the performed checks and their importance for app security.
159
+
160
+ ### Initialization
161
+
162
+ You should initialize the freeRASP in the entry point to your app, which is usually in `App.jsx` or `App.tsx`. Just copy & paste this code inside your root component / function, then setup the configuration and reactions to listeners:
163
+
164
+ ```ts
165
+ // reactions for detected threats
166
+ const actions = {
167
+ // Android & iOS
168
+ privilegedAccess: () => {
169
+ console.log('privilegedAccess');
170
+ },
171
+ // Android & iOS
172
+ debug: () => {
173
+ console.log('debug');
174
+ },
175
+ // Android & iOS
176
+ simulator: () => {
177
+ console.log('simulator');
178
+ },
179
+ // Android & iOS
180
+ appIntegrity: () => {
181
+ console.log('appIntegrity');
182
+ },
183
+ // Android & iOS
184
+ unofficialStore: () => {
185
+ console.log('unofficialStore');
186
+ },
187
+ // Android & iOS
188
+ hooks: () => {
189
+ console.log('hooks');
190
+ },
191
+ // Android & iOS
192
+ deviceBinding: () => {
193
+ console.log('deviceBinding');
194
+ },
195
+ // Android & iOS
196
+ secureHardwareNotAvailable: () => {
197
+ console.log('secureHardwareNotAvailable');
198
+ },
199
+ // Android & iOS
200
+ passcode: () => {
201
+ console.log('passcode');
202
+ },
203
+ // iOS only
204
+ deviceID: () => {
205
+ console.log('deviceID');
206
+ },
207
+ // iOS only
208
+ passcodeChange: () => {
209
+ console.log('passcodeChange');
210
+ },
211
+ };
212
+
213
+ useFreeRasp(config, actions);
214
+ ```
215
+
216
+ When freeRASP initializes correctly, you should see `freeRASP initialized` message in logs. Otherwise, you'll see warning with description of what went wrong.
217
+
218
+ _You can override this default behavior by extending the `actions` object with `started` key (to change action after successful initialization), and `initializationError` key (to set up action after unsuccessful initialization)_
219
+
220
+ ## Step 5: Additional note about obfuscation
221
+
222
+ The freeRASP contains public API, so the integration process is as simple as possible. Unfortunately, this public API also creates opportunities for the attacker to use publicly available information to interrupt freeRASP operations or modify your custom reaction implementation in threat callbacks. In order for freeRASP to be as effective as possible, it is highly recommended to apply obfuscation to the final package/application, making the public API more difficult to find and also partially randomized for each application so it cannot be automatically abused by generic hooking scripts.
223
+
224
+ ### Android
225
+
226
+ The majority of Android projects support code shrinking and obfuscation without any additional need for setup. The owner of the project can define the set of rules that are usually automatically used when the application is built in the release mode. For more information, please visit the official documentation
227
+
228
+ - https://developer.android.com/studio/build/shrink-code
229
+ - https://www.guardsquare.com/manual/configuration/usage
230
+
231
+ You can make sure, that the obfuscation is enabled by checking the value of **minifyEnabled** property in your **module's build.gradle** file.
232
+
233
+ ```gradle
234
+ android {
235
+ ...
236
+
237
+ buildTypes {
238
+ release {
239
+ minifyEnabled true
240
+ shrinkResources true
241
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
242
+ }
243
+ }
244
+ }
245
+ ```
246
+
247
+ ## Step 6: User Data Policies
248
+
249
+ Google Play [requires](https://support.google.com/googleplay/android-developer/answer/10787469?hl=en) all app publishers to declare how they collect and handle user data for the apps they publish on Google Play. They should inform users properly of the data collected by the apps and how the data is shared and processed. Therefore, Google will reject the apps which do not comply with the policy.
250
+
251
+ Apple has a [similar approach](https://developer.apple.com/app-store/app-privacy-details/) and specifies the types of collected data.
252
+
253
+ You should also visit our [Android](https://github.com/talsec/Free-RASP-Android) and [iOS](https://github.com/talsec/Free-RASP-iOS) submodules to learn more about their respective data policies.
254
+
255
+ And you're done 🎉!
256
+
257
+ If you encounter any other issues, you can see the list of solved issues [here](https://github.com/talsec/Free-RASP-ReactNative/issues?q=is%3Aissue+is%3Aclosed), or open up a [new one](https://github.com/talsec/Free-RASP-ReactNative/issues?q=is%3Aissue+is%3Aopen).
258
+
259
+ # Troubleshooting
260
+
261
+ ### Could not determine the dependencies of task `':freerasp-react-native:compileDebugAidl'`
262
+
263
+ **Solution:**
264
+
265
+ - In `package.json`, update `react-native` to a higher patch version and run `npm install` (or `yarn install`).
266
+ - [See this issue to find out which patch version is relevant for you.](https://github.com/facebook/react-native/issues/35210)
267
+
268
+ # Security Report
269
+
270
+ The Security Report is a weekly summary describing the application's security state and characteristics of the devices it runs on in a practical and easy-to-understand way.
271
+
272
+ The report provides a quick overview of the security incidents, their dynamics, app integrity, and reverse engineering attempts. It contains info about the security of devices, such as OS version or the ratio of devices with screen locks and biometrics. Each visualization also comes with a concise explanation.
273
+
274
+ To receive Security Reports, fill out the _watcherMail_ field in [config](#configuration).
275
+
276
+ ![dashboard](https://raw.githubusercontent.com/talsec/Free-RASP-Community/master/visuals/dashboard.png)
277
+
278
+ # :bar_chart: Enterprise Services
279
+
280
+ We provide app security hardening SDK: i.e. AppiCrypt®, Customer Data Encryption (local storage), End-to-end encryption, Strings protection (e.g. API keys) and Dynamic Certificate Pinning to our commercial customers as well. To get the most advanced protection compliant with PSD2 RT and eIDAS and support from our experts, contact us at [talsec.app](https://talsec.app).
281
+
282
+ ## Commercial version
283
+
284
+ The commercial version provides a top-notch protection level, extra features, support, and maintenance. One of the most valued commercial features is [AppiCrypt®](https://www.talsec.app/appicrypt) - App Integrity Cryptogram.
285
+
286
+ It allows easy to implement API protection and App Integrity verification on the backend to prevent API abuse:
287
+
288
+ - Bruteforce attacks
289
+ - Botnets
290
+ - Session-hijacking
291
+ - DDoS
292
+
293
+ It is a unified solution that works across all mobile platforms without dependency on external web services (i.e., without extra latency, an additional point of failure, and maintenance costs).
294
+
295
+ Learn more about commercial features at [https://talsec.app](https://talsec.app/).
296
+
297
+ **TIP:** You can try freeRASP and then upgrade easily to an enterprise service.
298
+
299
+ ## Plans Comparison
300
+
301
+ <table>
302
+ <thead>
303
+ <tr>
304
+ <th></th>
305
+ <th>freeRASP</th>
306
+ <th>Business RASP+</th>
307
+ </tr>
308
+ </thead>
309
+ <tbody>
310
+ <tr>
311
+ <td colspan=5><strong>Runtime App Self Protection (RASP, app shielding)</strong></td>
312
+ </tr>
313
+ <tr>
314
+ <td>Advanced root/jailbreak protections</td>
315
+ <td>basic</td>
316
+ <td>advanced</td>
317
+ </tr>
318
+ <tr>
319
+ <td>Runtime reverse engineering controls
320
+ <ul>
321
+ <li>Debug</li>
322
+ <li>Emulator</li>
323
+ <li>Hooking protections (e.g. Frida)</li>
324
+ </ul>
325
+ </td>
326
+ <td>basic</td>
327
+ <td>advanced</td>
328
+ </tr>
329
+ <tr>
330
+ <td>Runtime integrity controls
331
+ <ul>
332
+ <li>Tamper protection</li>
333
+ <li>Repackaging / Cloning protection</li>
334
+ <li>Device binding protection</li>
335
+ <li>Unofficial store detection</li>
336
+ </ul>
337
+ </td>
338
+ <td>basic</td>
339
+ <td>advanced</td>
340
+ </tr>
341
+ <tr>
342
+ <td>Device OS security status check
343
+ <ul>
344
+ <li>HW security module control</li>
345
+ <li>Screen lock control</li>
346
+ </ul>
347
+ </td>
348
+ <td>yes</td>
349
+ <td>yes</td>
350
+ </tr>
351
+ <tr>
352
+ <td>UI protection
353
+ <ul>
354
+ <li>Overlay protection</li>
355
+ <li>Accessibility services protection</li>
356
+ </ul>
357
+ </td>
358
+ <td>no</td>
359
+ <td>yes</td>
360
+ </tr>
361
+ <tr>
362
+ <td colspan=5><strong>Hardening suite</strong></td>
363
+ </tr>
364
+ <tr>
365
+ <td>Security hardening suite
366
+ <ul>
367
+ <li>Customer Data Encryption (local storage)</li>
368
+ <li>End-to-end encryption</li>
369
+ <li>Strings protection (e.g. API keys)</li>
370
+ <li>Dynamic certificate pinning</li>
371
+ </ul>
372
+ </td>
373
+ <td>no</td>
374
+ <td>yes</td>
375
+ </tr>
376
+ <tr>
377
+ <td colspan=5><strong>AppiCrypt® - App Integrity Cryptogram</strong></td>
378
+ </tr>
379
+ <tr>
380
+ <td>API protection by mobile client integrity check, online risk scoring, online fraud prevention, client App integrity check. The cryptographic proof of app & device integrity.</td>
381
+ <td>no</td>
382
+ <td>yes</td>
383
+ </tr>
384
+ <tr>
385
+ <td colspan=5><strong>Monitoring</strong></td>
386
+ </tr>
387
+ <tr>
388
+ <td>AppSec regular email reporting</td>
389
+ <td>yes (up to 100k devices)</td>
390
+ <td>yes</td>
391
+ </tr>
392
+ <tr>
393
+ <td>Data insights and auditing portal</td>
394
+ <td>no</td>
395
+ <td>yes</td>
396
+ </tr>
397
+ <tr>
398
+ <td>Embed code to integrate with portal</td>
399
+ <td>no</td>
400
+ <td>yes</td>
401
+ </tr>
402
+ <tr>
403
+ <td>API data access</td>
404
+ <td>no</td>
405
+ <td>yes</td>
406
+ </tr>
407
+ <tr>
408
+ <td colspan=5><strong>Fair usage policy</strong></td>
409
+ </tr>
410
+ <tr>
411
+ <td>Mentioning of the App name and logo in the marketing communications of Talsec (e.g. "Trusted by" section of the Talsec web or in the social media).</td>
412
+ <td>over 100k downloads</td>
413
+ <td>no</td>
414
+ </tr>
415
+ <tr>
416
+ <td>Threat signals data collection to Talsec database for processing and product improvement</td>
417
+ <td>yes</td>
418
+ <td>no</td>
419
+ </tr>
420
+ </tbody>
421
+ </table>
422
+
423
+ For further comparison details (and planned features), follow our [discussion](https://github.com/talsec/Free-RASP-Community/discussions/5).