freerasp-react-native 2.0.2 → 3.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.
- package/README.md +62 -39
- package/android/build.gradle +7 -3
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/freeraspreactnative/FreeraspReactNativeModule.kt +4 -0
- package/example/android/app/build.gradle +9 -1
- package/example/android/build.gradle +1 -1
- package/example/src/App.tsx +5 -5
- package/example/src/checks.ts +3 -4
- package/ios/FreeraspReactNative.swift +11 -8
- package/ios/TalsecRuntime.xcframework/Info.plist +5 -5
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +122 -47
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.abi.json +5248 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.private.swiftinterface +54 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +3 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/module.modulemap +2 -2
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +234 -94
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json +5213 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +54 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +3 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json +5213 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +54 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +3 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/module.modulemap +2 -2
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +63 -19
- package/lib/commonjs/index.js +3 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +4 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +5 -1
- package/example/ios/Podfile.lock +0 -590
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// swift-interface-format-version: 1.0
|
|
2
|
+
// swift-compiler-version: Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)
|
|
3
|
+
// swift-module-flags: -target x86_64-apple-ios11.2-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name TalsecRuntime
|
|
4
|
+
// swift-module-flags-ignorable: -enable-bare-slash-regex
|
|
5
|
+
import Foundation
|
|
6
|
+
import LocalAuthentication
|
|
7
|
+
import TalsecRuntime.Private
|
|
8
|
+
import Security
|
|
9
|
+
import Swift
|
|
10
|
+
@_exported import TalsecRuntime
|
|
11
|
+
import UIKit
|
|
12
|
+
import _Concurrency
|
|
13
|
+
import _StringProcessing
|
|
14
|
+
public protocol SecurityThreatHandler {
|
|
15
|
+
func threatDetected(_ securityThreat: TalsecRuntime.SecurityThreat)
|
|
16
|
+
}
|
|
17
|
+
@_hasMissingDesignatedInitializers public class SecurityThreatCenter {
|
|
18
|
+
@objc deinit
|
|
19
|
+
}
|
|
20
|
+
public struct TalsecConfig {
|
|
21
|
+
public let appBundleIds: [Swift.String]
|
|
22
|
+
public let appTeamId: Swift.String
|
|
23
|
+
public let watcherMailAddress: Swift.String?
|
|
24
|
+
public let isProd: Swift.Bool?
|
|
25
|
+
public init(appBundleIds: [Swift.String], appTeamId: Swift.String, watcherMailAddress: Swift.String?, isProd: Swift.Bool? = true)
|
|
26
|
+
}
|
|
27
|
+
@_hasMissingDesignatedInitializers public class Talsec {
|
|
28
|
+
public static func start(config: TalsecRuntime.TalsecConfig)
|
|
29
|
+
@objc deinit
|
|
30
|
+
}
|
|
31
|
+
public enum SecurityThreat : Swift.String, Swift.Codable, Swift.CaseIterable, Swift.Equatable {
|
|
32
|
+
case signature
|
|
33
|
+
case jailbreak
|
|
34
|
+
case debugger
|
|
35
|
+
case runtimeManipulation
|
|
36
|
+
case passcode
|
|
37
|
+
case passcodeChange
|
|
38
|
+
case simulator
|
|
39
|
+
case missingSecureEnclave
|
|
40
|
+
case deviceChange
|
|
41
|
+
case deviceID
|
|
42
|
+
case unofficialStore
|
|
43
|
+
public init?(rawValue: Swift.String)
|
|
44
|
+
public typealias AllCases = [TalsecRuntime.SecurityThreat]
|
|
45
|
+
public typealias RawValue = Swift.String
|
|
46
|
+
public static var allCases: [TalsecRuntime.SecurityThreat] {
|
|
47
|
+
get
|
|
48
|
+
}
|
|
49
|
+
public var rawValue: Swift.String {
|
|
50
|
+
get
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
extension TalsecRuntime.SecurityThreat : Swift.Hashable {}
|
|
54
|
+
extension TalsecRuntime.SecurityThreat : Swift.RawRepresentable {}
|
|
Binary file
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// swift-interface-format-version: 1.0
|
|
2
|
-
// swift-compiler-version: Apple Swift version 5.
|
|
2
|
+
// swift-compiler-version: Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)
|
|
3
3
|
// swift-module-flags: -target x86_64-apple-ios11.2-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name TalsecRuntime
|
|
4
|
+
// swift-module-flags-ignorable: -enable-bare-slash-regex
|
|
4
5
|
import Foundation
|
|
5
6
|
import LocalAuthentication
|
|
6
7
|
import TalsecRuntime.Private
|
|
@@ -9,6 +10,7 @@ import Swift
|
|
|
9
10
|
@_exported import TalsecRuntime
|
|
10
11
|
import UIKit
|
|
11
12
|
import _Concurrency
|
|
13
|
+
import _StringProcessing
|
|
12
14
|
public protocol SecurityThreatHandler {
|
|
13
15
|
func threatDetected(_ securityThreat: TalsecRuntime.SecurityThreat)
|
|
14
16
|
}
|
|
Binary file
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
</data>
|
|
11
11
|
<key>Headers/CurlWrapper.h</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
CSZWtke9AoMVQvesKdXCSg2UE/M=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Headers/TalsecRuntime-Swift.h</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
ITdbODXMvuibKW2zR6bj10IxYQs=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Headers/TalsecRuntime_iOS.h</key>
|
|
20
20
|
<data>
|
|
@@ -58,35 +58,51 @@
|
|
|
58
58
|
</data>
|
|
59
59
|
<key>Info.plist</key>
|
|
60
60
|
<data>
|
|
61
|
-
|
|
61
|
+
NNItiovBEYyEf+VxB9MNGjUiB1A=
|
|
62
|
+
</data>
|
|
63
|
+
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
64
|
+
<data>
|
|
65
|
+
Lk0cbL3Gxz5U0NR5ZM/cD0RlbmY=
|
|
66
|
+
</data>
|
|
67
|
+
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
68
|
+
<data>
|
|
69
|
+
zvG970d1+w3DRPsdCRZyC4etYe0=
|
|
62
70
|
</data>
|
|
63
71
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
64
72
|
<data>
|
|
65
|
-
|
|
73
|
+
J5N2/lFIS5eBKLLy4jawqJkZolg=
|
|
66
74
|
</data>
|
|
67
75
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
68
76
|
<data>
|
|
69
|
-
|
|
77
|
+
zvG970d1+w3DRPsdCRZyC4etYe0=
|
|
70
78
|
</data>
|
|
71
79
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
72
80
|
<data>
|
|
73
|
-
|
|
81
|
+
xAneUYz5Ql25JKdEJ9sA+z1Lg2A=
|
|
82
|
+
</data>
|
|
83
|
+
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
84
|
+
<data>
|
|
85
|
+
Lk0cbL3Gxz5U0NR5ZM/cD0RlbmY=
|
|
86
|
+
</data>
|
|
87
|
+
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
88
|
+
<data>
|
|
89
|
+
ny++TmRTmj//H7TwehKOWuZ09TI=
|
|
74
90
|
</data>
|
|
75
91
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
76
92
|
<data>
|
|
77
|
-
|
|
93
|
+
KXycpHCPsBgdTiFgqugD2J+EkVs=
|
|
78
94
|
</data>
|
|
79
95
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
80
96
|
<data>
|
|
81
|
-
|
|
97
|
+
ny++TmRTmj//H7TwehKOWuZ09TI=
|
|
82
98
|
</data>
|
|
83
99
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
84
100
|
<data>
|
|
85
|
-
|
|
101
|
+
duOlxOkcwBiuqbVA6iWiU5+IVSQ=
|
|
86
102
|
</data>
|
|
87
103
|
<key>Modules/module.modulemap</key>
|
|
88
104
|
<data>
|
|
89
|
-
|
|
105
|
+
5Cqpp15x1ZBnDyj7LgQmZiSGNYI=
|
|
90
106
|
</data>
|
|
91
107
|
<key>cacert.pem</key>
|
|
92
108
|
<data>
|
|
@@ -110,14 +126,14 @@
|
|
|
110
126
|
<dict>
|
|
111
127
|
<key>hash2</key>
|
|
112
128
|
<data>
|
|
113
|
-
|
|
129
|
+
75Fb3dK+d8n8dDA3NAmzBslzF8zUL5Hummyu3xetbBQ=
|
|
114
130
|
</data>
|
|
115
131
|
</dict>
|
|
116
132
|
<key>Headers/TalsecRuntime-Swift.h</key>
|
|
117
133
|
<dict>
|
|
118
134
|
<key>hash2</key>
|
|
119
135
|
<data>
|
|
120
|
-
|
|
136
|
+
45LDtcwOWD+iLQ0xZD+RJjPe1r2xylzxi5R1hjznuFk=
|
|
121
137
|
</data>
|
|
122
138
|
</dict>
|
|
123
139
|
<key>Headers/TalsecRuntime_iOS.h</key>
|
|
@@ -190,53 +206,81 @@
|
|
|
190
206
|
KLVKLXL3tU413F9fM2QQlsiynOqiGYitwKYDMP7bHJ8=
|
|
191
207
|
</data>
|
|
192
208
|
</dict>
|
|
209
|
+
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
|
|
210
|
+
<dict>
|
|
211
|
+
<key>hash2</key>
|
|
212
|
+
<data>
|
|
213
|
+
3FEGYbOKIlfT70NSF/UTtcIaC4npeQEL1WhVOdOtlXI=
|
|
214
|
+
</data>
|
|
215
|
+
</dict>
|
|
216
|
+
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
|
|
217
|
+
<dict>
|
|
218
|
+
<key>hash2</key>
|
|
219
|
+
<data>
|
|
220
|
+
2GeJLA8E0LtuyTetyqlHRut3M4bUe1X3XPgzZjlh1CM=
|
|
221
|
+
</data>
|
|
222
|
+
</dict>
|
|
193
223
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
|
194
224
|
<dict>
|
|
195
225
|
<key>hash2</key>
|
|
196
226
|
<data>
|
|
197
|
-
|
|
227
|
+
pDc48PiU5vZoIcef7DFH9f2FaoK/IzRa6zGMGkJk1O0=
|
|
198
228
|
</data>
|
|
199
229
|
</dict>
|
|
200
230
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
|
201
231
|
<dict>
|
|
202
232
|
<key>hash2</key>
|
|
203
233
|
<data>
|
|
204
|
-
|
|
234
|
+
2GeJLA8E0LtuyTetyqlHRut3M4bUe1X3XPgzZjlh1CM=
|
|
205
235
|
</data>
|
|
206
236
|
</dict>
|
|
207
237
|
<key>Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
|
208
238
|
<dict>
|
|
209
239
|
<key>hash2</key>
|
|
210
240
|
<data>
|
|
211
|
-
|
|
241
|
+
ruhp2Q5QJLlYQIiyG1uDUfb0Q8OAzMz4dgULhFYV0pU=
|
|
242
|
+
</data>
|
|
243
|
+
</dict>
|
|
244
|
+
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
|
|
245
|
+
<dict>
|
|
246
|
+
<key>hash2</key>
|
|
247
|
+
<data>
|
|
248
|
+
3FEGYbOKIlfT70NSF/UTtcIaC4npeQEL1WhVOdOtlXI=
|
|
249
|
+
</data>
|
|
250
|
+
</dict>
|
|
251
|
+
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
|
|
252
|
+
<dict>
|
|
253
|
+
<key>hash2</key>
|
|
254
|
+
<data>
|
|
255
|
+
2K1c4qeBH1d20KXU4qh79Mzs4RY/9lOsLdUrrZ9vyuI=
|
|
212
256
|
</data>
|
|
213
257
|
</dict>
|
|
214
258
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
|
215
259
|
<dict>
|
|
216
260
|
<key>hash2</key>
|
|
217
261
|
<data>
|
|
218
|
-
|
|
262
|
+
Fq4oo/EFh/fE7ql6mmdZyrKHmK9TCusOWkQaMgLEenk=
|
|
219
263
|
</data>
|
|
220
264
|
</dict>
|
|
221
265
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
|
222
266
|
<dict>
|
|
223
267
|
<key>hash2</key>
|
|
224
268
|
<data>
|
|
225
|
-
|
|
269
|
+
2K1c4qeBH1d20KXU4qh79Mzs4RY/9lOsLdUrrZ9vyuI=
|
|
226
270
|
</data>
|
|
227
271
|
</dict>
|
|
228
272
|
<key>Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
|
229
273
|
<dict>
|
|
230
274
|
<key>hash2</key>
|
|
231
275
|
<data>
|
|
232
|
-
|
|
276
|
+
enYxz9iXqoxwSRsFa3N/Pq6ReGEJGDfWhyQYUcIthMs=
|
|
233
277
|
</data>
|
|
234
278
|
</dict>
|
|
235
279
|
<key>Modules/module.modulemap</key>
|
|
236
280
|
<dict>
|
|
237
281
|
<key>hash2</key>
|
|
238
282
|
<data>
|
|
239
|
-
|
|
283
|
+
gTx9ZhrwHS0hTBeJb6E3ARK3htBrD87Dc2RxPvTKaGE=
|
|
240
284
|
</data>
|
|
241
285
|
</dict>
|
|
242
286
|
<key>cacert.pem</key>
|
package/lib/commonjs/index.js
CHANGED
|
@@ -19,6 +19,9 @@ const setThreatListeners = config => {
|
|
|
19
19
|
console.warn(`Error during Talsec Native plugin initialization - ${e.message}`);
|
|
20
20
|
}));
|
|
21
21
|
for (const [threat, action] of Object.entries(config)) {
|
|
22
|
+
if (threat === 'obfuscationIssues' && _reactNative.Platform.OS === 'ios') {
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
22
25
|
activeListeners.push(eventEmitter.addListener(threat, action));
|
|
23
26
|
}
|
|
24
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FreeraspReactNative","NativeModules","eventEmitter","NativeEventEmitter","activeListeners","setThreatListeners","config","push","addListener","console","log","e","warn","message","threat","action","Object","entries","removeThreatListeners","forEach","listener","remove","talsecStart","options","useFreeRasp","actions","useEffect"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AAAA;AACA;
|
|
1
|
+
{"version":3,"names":["FreeraspReactNative","NativeModules","eventEmitter","NativeEventEmitter","activeListeners","setThreatListeners","config","push","addListener","console","log","e","warn","message","threat","action","Object","entries","Platform","OS","removeThreatListeners","forEach","listener","remove","talsecStart","options","useFreeRasp","actions","useEffect"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AAAA;AACA;AAqCA,MAAM;EAAEA;AAAoB,CAAC,GAAGC,0BAAa;AAE7C,MAAMC,YAAY,GAAG,IAAIC,+BAAkB,CAACH,mBAAmB,CAAC;AAChE,MAAMI,eAAsC,GAAG,EAAE;AAE1C,MAAMC,kBAAkB,GAC7BC,MAAyE,IACtE;EACHF,eAAe,CAACG,IAAI,CAClBL,YAAY,CAACM,WAAW,CAAC,SAAS,EAAE,MAAM;IACxCC,OAAO,CAACC,GAAG,CAAC,qBAAqB,CAAC;EACpC,CAAC,CAAC,CACH;EAEDN,eAAe,CAACG,IAAI,CAClBL,YAAY,CAACM,WAAW,CACtB,qBAAqB,EACpBG,CAAsB,IAAK;IAC1BF,OAAO,CAACG,IAAI,CACT,sDAAqDD,CAAC,CAACE,OAAQ,EAAC,CAClE;EACH,CAAC,CACF,CACF;EAED,KAAK,MAAM,CAACC,MAAM,EAAEC,MAAM,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACX,MAAM,CAAC,EAAE;IACrD,IAAIQ,MAAM,KAAK,mBAAmB,IAAII,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;MAC3D;IACF;IACAf,eAAe,CAACG,IAAI,CAACL,YAAY,CAACM,WAAW,CAACM,MAAM,EAAEC,MAAM,CAAC,CAAC;EAChE;AACF,CAAC;AAAC;AAEK,MAAMK,qBAAqB,GAAG,MAAM;EACzChB,eAAe,CAACiB,OAAO,CAAEC,QAAQ,IAAKA,QAAQ,CAACC,MAAM,EAAE,CAAC;AAC1D,CAAC;AAAC;AAEK,MAAMC,WAAW,GAAIC,OAAqB,IAAW;EAC1D,OAAOzB,mBAAmB,CAACwB,WAAW,CAACC,OAAO,CAAC;AACjD,CAAC;AAAC;AAEK,MAAMC,WAAW,GAAG,CACzBpB,MAAoB,EACpBqB,OAA0E,KACvE;EACH,IAAAC,gBAAS,EAAC,MAAM;IACdvB,kBAAkB,CAACsB,OAAO,CAAC;IAC3BH,WAAW,CAAClB,MAAM,CAAC;IAEnB,OAAO,MAAM;MACXc,qBAAqB,EAAE;IACzB,CAAC;IACD;EACF,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAAC;AAAA,eAEapB,mBAAmB;AAAA"}
|
package/lib/module/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
|
-
import { NativeEventEmitter, NativeModules } from 'react-native';
|
|
2
|
+
import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
|
|
3
3
|
const {
|
|
4
4
|
FreeraspReactNative
|
|
5
5
|
} = NativeModules;
|
|
@@ -13,6 +13,9 @@ export const setThreatListeners = config => {
|
|
|
13
13
|
console.warn(`Error during Talsec Native plugin initialization - ${e.message}`);
|
|
14
14
|
}));
|
|
15
15
|
for (const [threat, action] of Object.entries(config)) {
|
|
16
|
+
if (threat === 'obfuscationIssues' && Platform.OS === 'ios') {
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
16
19
|
activeListeners.push(eventEmitter.addListener(threat, action));
|
|
17
20
|
}
|
|
18
21
|
};
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","NativeEventEmitter","NativeModules","FreeraspReactNative","eventEmitter","activeListeners","setThreatListeners","config","push","addListener","console","log","e","warn","message","threat","action","Object","entries","removeThreatListeners","forEach","listener","remove","talsecStart","options","useFreeRasp","actions"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAEEC,kBAAkB,EAClBC,aAAa,
|
|
1
|
+
{"version":3,"names":["useEffect","NativeEventEmitter","NativeModules","Platform","FreeraspReactNative","eventEmitter","activeListeners","setThreatListeners","config","push","addListener","console","log","e","warn","message","threat","action","Object","entries","OS","removeThreatListeners","forEach","listener","remove","talsecStart","options","useFreeRasp","actions"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAEEC,kBAAkB,EAClBC,aAAa,EACbC,QAAQ,QACH,cAAc;AAgCrB,MAAM;EAAEC;AAAoB,CAAC,GAAGF,aAAa;AAE7C,MAAMG,YAAY,GAAG,IAAIJ,kBAAkB,CAACG,mBAAmB,CAAC;AAChE,MAAME,eAAsC,GAAG,EAAE;AAEjD,OAAO,MAAMC,kBAAkB,GAC7BC,MAAyE,IACtE;EACHF,eAAe,CAACG,IAAI,CAClBJ,YAAY,CAACK,WAAW,CAAC,SAAS,EAAE,MAAM;IACxCC,OAAO,CAACC,GAAG,CAAC,qBAAqB,CAAC;EACpC,CAAC,CAAC,CACH;EAEDN,eAAe,CAACG,IAAI,CAClBJ,YAAY,CAACK,WAAW,CACtB,qBAAqB,EACpBG,CAAsB,IAAK;IAC1BF,OAAO,CAACG,IAAI,CACT,sDAAqDD,CAAC,CAACE,OAAQ,EAAC,CAClE;EACH,CAAC,CACF,CACF;EAED,KAAK,MAAM,CAACC,MAAM,EAAEC,MAAM,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACX,MAAM,CAAC,EAAE;IACrD,IAAIQ,MAAM,KAAK,mBAAmB,IAAIb,QAAQ,CAACiB,EAAE,KAAK,KAAK,EAAE;MAC3D;IACF;IACAd,eAAe,CAACG,IAAI,CAACJ,YAAY,CAACK,WAAW,CAACM,MAAM,EAAEC,MAAM,CAAC,CAAC;EAChE;AACF,CAAC;AAED,OAAO,MAAMI,qBAAqB,GAAG,MAAM;EACzCf,eAAe,CAACgB,OAAO,CAAEC,QAAQ,IAAKA,QAAQ,CAACC,MAAM,EAAE,CAAC;AAC1D,CAAC;AAED,OAAO,MAAMC,WAAW,GAAIC,OAAqB,IAAW;EAC1D,OAAOtB,mBAAmB,CAACqB,WAAW,CAACC,OAAO,CAAC;AACjD,CAAC;AAED,OAAO,MAAMC,WAAW,GAAG,CACzBnB,MAAoB,EACpBoB,OAA0E,KACvE;EACH5B,SAAS,CAAC,MAAM;IACdO,kBAAkB,CAACqB,OAAO,CAAC;IAC3BH,WAAW,CAACjB,MAAM,CAAC;IAEnB,OAAO,MAAM;MACXa,qBAAqB,EAAE;IACzB,CAAC;IACD;EACF,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAED,eAAejB,mBAAmB"}
|
|
@@ -20,9 +20,9 @@ type NativeEventEmitterActions = {
|
|
|
20
20
|
hooks?: () => any;
|
|
21
21
|
deviceBinding?: () => any;
|
|
22
22
|
deviceID?: () => any;
|
|
23
|
-
passcodeChange?: () => any;
|
|
24
23
|
passcode?: () => any;
|
|
25
24
|
secureHardwareNotAvailable?: () => any;
|
|
25
|
+
obfuscationIssues?: () => any;
|
|
26
26
|
started?: () => any;
|
|
27
27
|
initializationError?: (reason: {
|
|
28
28
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAQA,KAAK,YAAY,GAAG;IAClB,aAAa,CAAC,EAAE;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;QAC5B,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAC;KACvC,CAAC;IACF,SAAS,CAAC,EAAE;QACV,WAAW,EAAE,MAAM,CAAC;QACpB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,gBAAgB,CAAC,EAAE,MAAM,GAAG,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,GAAG,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,GAAG,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC;IACrB,0BAA0B,CAAC,EAAE,MAAM,GAAG,CAAC;IACvC,iBAAiB,CAAC,EAAE,MAAM,GAAG,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC;IACpB,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,GAAG,CAAC;CAC5D,CAAC;AAEF,QAAA,MAAQ,mBAAmB,KAAkB,CAAC;AAK9C,eAAO,MAAM,kBAAkB,0HA0B9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,YAEjC,CAAC;AAEF,eAAO,MAAM,WAAW,YAAa,YAAY,KAAG,IAEnD,CAAC;AAEF,eAAO,MAAM,WAAW,gDACd,YAAY,qFAYrB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "freerasp-react-native",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "React Native plugin for improving app security and threat monitoring on Android and iOS mobile devices.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
package/src/index.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
EmitterSubscription,
|
|
4
4
|
NativeEventEmitter,
|
|
5
5
|
NativeModules,
|
|
6
|
+
Platform,
|
|
6
7
|
} from 'react-native';
|
|
7
8
|
|
|
8
9
|
type TalsecConfig = {
|
|
@@ -28,9 +29,9 @@ type NativeEventEmitterActions = {
|
|
|
28
29
|
hooks?: () => any;
|
|
29
30
|
deviceBinding?: () => any;
|
|
30
31
|
deviceID?: () => any;
|
|
31
|
-
passcodeChange?: () => any;
|
|
32
32
|
passcode?: () => any;
|
|
33
33
|
secureHardwareNotAvailable?: () => any;
|
|
34
|
+
obfuscationIssues?: () => any;
|
|
34
35
|
started?: () => any;
|
|
35
36
|
initializationError?: (reason: { message: string }) => any;
|
|
36
37
|
};
|
|
@@ -61,6 +62,9 @@ export const setThreatListeners = <T extends NativeEventEmitterActions>(
|
|
|
61
62
|
);
|
|
62
63
|
|
|
63
64
|
for (const [threat, action] of Object.entries(config)) {
|
|
65
|
+
if (threat === 'obfuscationIssues' && Platform.OS === 'ios') {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
64
68
|
activeListeners.push(eventEmitter.addListener(threat, action));
|
|
65
69
|
}
|
|
66
70
|
};
|