react-native-device-defense 1.0.1 → 1.0.2
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/README.md +92 -1
- package/android/build.gradle +1 -1
- package/android/src/main/cpp/device-security.cpp +281 -7
- package/android/src/main/java/com/devicedefense/DeviceSecurityModule.kt +126 -2
- package/android/src/main/java/com/devicedefense/EmulatorDetection.kt +29 -18
- package/android/src/main/java/com/devicedefense/NativeSecurityCheck.kt +43 -1
- package/android/test-gradle.gradle +3 -0
- package/lib/commonjs/NativeDeviceSecurity.js.map +1 -1
- package/lib/commonjs/api.js +137 -2
- package/lib/commonjs/api.js.map +1 -1
- package/lib/commonjs/components/SecurityBlockedScreen.js +12 -2
- package/lib/commonjs/components/SecurityBlockedScreen.js.map +1 -1
- package/lib/commonjs/hooks/useDeviceSecurity.js +13 -7
- package/lib/commonjs/hooks/useDeviceSecurity.js.map +1 -1
- package/lib/module/NativeDeviceSecurity.js.map +1 -1
- package/lib/module/api.js +137 -2
- package/lib/module/api.js.map +1 -1
- package/lib/module/components/SecurityBlockedScreen.js +12 -2
- package/lib/module/components/SecurityBlockedScreen.js.map +1 -1
- package/lib/module/hooks/useDeviceSecurity.js +14 -8
- package/lib/module/hooks/useDeviceSecurity.js.map +1 -1
- package/lib/typescript/NativeDeviceSecurity.d.ts +7 -0
- package/lib/typescript/NativeDeviceSecurity.d.ts.map +1 -1
- package/lib/typescript/api.d.ts +29 -1
- package/lib/typescript/api.d.ts.map +1 -1
- package/lib/typescript/components/SecurityBlockedScreen.d.ts.map +1 -1
- package/lib/typescript/hooks/useDeviceSecurity.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +30 -1
- package/lib/typescript/types.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/NativeDeviceSecurity.ts +9 -0
- package/src/api.ts +143 -0
- package/src/components/SecurityBlockedScreen.tsx +10 -0
- package/src/hooks/useDeviceSecurity.ts +14 -11
- package/src/types.ts +36 -1
package/src/types.ts
CHANGED
|
@@ -12,7 +12,30 @@ export type SecurityThreat =
|
|
|
12
12
|
| 'xposed_detected'
|
|
13
13
|
| 'magisk_detected'
|
|
14
14
|
| 'debugger_detected'
|
|
15
|
-
| 'emulator_detected'
|
|
15
|
+
| 'emulator_detected'
|
|
16
|
+
| 'ssl_validation_bypass'
|
|
17
|
+
| 'ssl_pinning_bypass'
|
|
18
|
+
| 'proxy_configuration'
|
|
19
|
+
| 'modified_ssl_libraries'
|
|
20
|
+
| 'certificate_tampering';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* SSL Security Status
|
|
24
|
+
*/
|
|
25
|
+
export interface SSLSecurityStatus {
|
|
26
|
+
/** SSL validation has been bypassed */
|
|
27
|
+
hasSSLValidationBypass: boolean;
|
|
28
|
+
/** SSL pinning bypass tools detected */
|
|
29
|
+
hasSSLPinningBypass: boolean;
|
|
30
|
+
/** Proxy configuration detected (potential MITM) */
|
|
31
|
+
hasProxyConfiguration: boolean;
|
|
32
|
+
/** SSL libraries have been modified */
|
|
33
|
+
hasModifiedSSLLibraries: boolean;
|
|
34
|
+
/** Certificate tampering detected */
|
|
35
|
+
hasCertificateTampering: boolean;
|
|
36
|
+
/** Any SSL security issue detected */
|
|
37
|
+
hasSSLSecurityIssue: boolean;
|
|
38
|
+
}
|
|
16
39
|
|
|
17
40
|
/**
|
|
18
41
|
* Detailed security status
|
|
@@ -44,6 +67,18 @@ export interface SecurityStatus {
|
|
|
44
67
|
isDebuggable: boolean;
|
|
45
68
|
/** Running on emulator */
|
|
46
69
|
isEmulator: boolean;
|
|
70
|
+
/** SSL validation has been bypassed */
|
|
71
|
+
hasSSLValidationBypass: boolean;
|
|
72
|
+
/** SSL pinning bypass tools detected */
|
|
73
|
+
hasSSLPinningBypass: boolean;
|
|
74
|
+
/** Proxy configuration detected */
|
|
75
|
+
hasProxyConfiguration: boolean;
|
|
76
|
+
/** SSL libraries have been modified */
|
|
77
|
+
hasModifiedSSLLibraries: boolean;
|
|
78
|
+
/** Certificate tampering detected */
|
|
79
|
+
hasCertificateTampering: boolean;
|
|
80
|
+
/** Any SSL security issue detected */
|
|
81
|
+
hasSSLSecurityIssue: boolean;
|
|
47
82
|
/** Additional details about detection */
|
|
48
83
|
details?: Record<string, boolean | string | number>;
|
|
49
84
|
}
|