react-native-device-defense 1.0.2 → 1.0.4
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.
package/android/build.gradle
CHANGED
|
@@ -20,10 +20,12 @@ buildscript {
|
|
|
20
20
|
}
|
|
21
21
|
dependencies {
|
|
22
22
|
classpath('com.android.tools.build:gradle:7.4.2')
|
|
23
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.8.0')}")
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
apply plugin: 'com.android.library'
|
|
28
|
+
apply plugin: 'kotlin-android'
|
|
27
29
|
apply plugin: 'com.facebook.react'
|
|
28
30
|
|
|
29
31
|
android {
|
|
@@ -81,6 +83,7 @@ android {
|
|
|
81
83
|
|
|
82
84
|
dependencies {
|
|
83
85
|
implementation 'com.facebook.react:react-native:+'
|
|
86
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:${safeExtGet('kotlinVersion', '1.8.0')}"
|
|
84
87
|
|
|
85
88
|
// RootBeer for root detection
|
|
86
89
|
implementation 'com.scottyab:rootbeer-lib:0.1.1'
|
|
@@ -1,28 +1,34 @@
|
|
|
1
|
-
# React Native Device
|
|
1
|
+
# React Native Device Defense - ProGuard/R8 Rules
|
|
2
2
|
|
|
3
3
|
# Keep all native methods
|
|
4
|
-
-keepclassmembers class
|
|
4
|
+
-keepclassmembers class com.devicedefense.** {
|
|
5
5
|
native <methods>;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
# Keep the entire module
|
|
9
|
-
-keep class
|
|
10
|
-
-keep interface
|
|
9
|
+
-keep class com.devicedefense.** { *; }
|
|
10
|
+
-keep interface com.devicedefense.** { *; }
|
|
11
11
|
|
|
12
12
|
# Keep enum classes
|
|
13
|
-
-keepclassmembers enum
|
|
13
|
+
-keepclassmembers enum com.devicedefense.** {
|
|
14
14
|
*[];
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
# Don't warn about missing classes
|
|
18
|
-
-dontwarn
|
|
18
|
+
-dontwarn com.devicedefense.**
|
|
19
19
|
|
|
20
20
|
# Obfuscate but keep critical method names for native calls
|
|
21
|
-
-keep class
|
|
21
|
+
-keep class com.devicedefense.NativeSecurityCheck {
|
|
22
22
|
public static boolean isRooted();
|
|
23
23
|
public static boolean hasDangerousBinaries();
|
|
24
24
|
public static boolean hasSuspiciousSystemProperties();
|
|
25
25
|
public static boolean hasHookFramework();
|
|
26
26
|
public static boolean isDebuggerAttached();
|
|
27
|
+
public static boolean hasSSLValidationBypass();
|
|
28
|
+
public static boolean hasSSLPinningBypass();
|
|
29
|
+
public static boolean hasProxyConfiguration();
|
|
30
|
+
public static boolean hasModifiedSSLLibraries();
|
|
31
|
+
public static boolean hasCertificateTampering();
|
|
32
|
+
public static boolean hasSSLSecurityIssue();
|
|
27
33
|
public static java.lang.String getSecurityStatus();
|
|
28
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-device-defense",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Multi-layer device security detection for React Native (root, hook, debugger, emulator detection)",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|