Skip to content

Commit d776d5b

Browse files
tompsotaclaude
andauthored
release: freeRASP 6.0.0 (#170)
* release: freeRASP 5.4.0 (Android SDK 20.0.1) Bump the Android SDK to 20.0.1 (app.talsec.rasp:TalsecRasp-Community-ReactNative) and expose its new features: - ongoing call detection: ongoingCall threat action with CallState, startOngoingCallDetection/stopOngoingCallDetection - screen control blocking: blockScreenControl/isScreenControlBlocked - overlay windows hiding: blockOverlayWindows/isOverlayWindowsBlocked - criticalChecksFinished/postponedChecksFinished execution states The new threat and execution-state identifiers and the call-state channel key are Android only; the TypeScript lists are branched per platform so the iOS identifier counts stay unchanged. allChecksFinished is now driven by the SDK's onFastChecksFinished, which fires where the removed onAllChecksFinished used to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: reword the Maven coordinates changelog entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat!: rename allChecksFinished to fastChecksFinished The execution state that fires when the fast (standard) checks complete is renamed on all platforms to match the Android SDK's onFastChecksFinished. On iOS it is driven by the SDK's onAllChecksFinished. This is a breaking change, so the package major version is bumped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: drop Breaking markers from Android SDK changes absorbed by the plugin The plugin hides these native API changes from its users, so they move from the Android Breaking Changes section to Changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: drop Android changelog entries already listed in the plugin section Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * example: show the ongoing call state (Not detected, Started, Ongoing, Stopped) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(ios): send placeholder threat channel keys for Android-only payloads iOS now sends placeholder keys for malware and ongoing call, so the threat channel data has the same length on both platforms and the JS check no longer branches by platform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(android): move plugin to the app.talsec.rasp.reactnative namespace (#171) * refactor(android): move plugin to the app.talsec.rasp namespace Align the Android package of the plugin with the Android SDK's app.talsec.rasp, adding the platform as the last segment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(android): update package names to app.talsec.rasp Completes the move of the plugin sources: package declarations, imports, Gradle namespace and build configuration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * feat!: unify the public API with the other freeRASP plugins (#172) * feat!: unify the public API with the other freeRASP plugins - TalsecIosConfig.appBundleId (string) -> appBundleIds (string[]), as in the iOS SDK - methods that resolved with status strings or constants resolve to void - all methods reject with TalsecError carrying a stable code, including Android-only methods called on iOS - onInvalidCallback and removeListenerForEvent are no longer exported; abortApp is the only exported internal helper Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: return start status and errors from useFreeRasp useFreeRasp returns { started, error } instead of only logging failures, so apps can react when the listeners can't be registered or freeRASP fails to start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(types): type threat and execution state actions as returning void Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a1e20b5 commit d776d5b

42 files changed

Lines changed: 877 additions & 213 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,55 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [6.0.0] - 2026-11-11
9+
10+
- Android SDK version: 20.0.1
11+
- iOS SDK version: 8.0.1
12+
13+
### Breaking
14+
15+
- `allChecksFinished` RASP execution state action renamed to `fastChecksFinished`. On Android, it is triggered when the fast checks are completed, while the postponed checks may still run; on iOS, when all checks are completed
16+
- `TalsecIosConfig.appBundleId` (string) replaced by `appBundleIds` (string[]), matching the iOS SDK
17+
- Methods that resolved with a status string or a constant now resolve to `void`: `talsecStart`, `addToWhitelist`, `blockScreenCapture`, `blockScreenControl`, `startOngoingCallDetection`, `stopOngoingCallDetection`, `storeExternalId`, `removeExternalId`
18+
- All methods now reject with `TalsecError` (`code`: `talsec-failure`, `unsupported-platform`, `configuration-exception`, `external-id-failure`, `malware-failure`) instead of native errors or plain strings
19+
- `onInvalidCallback` and `removeListenerForEvent` are no longer exported; use `abortApp` to terminate the app
20+
21+
### React Native
22+
23+
#### Added
24+
25+
- `useFreeRasp` returns `{ started, error }`; `error` is the `TalsecError` that prevented the listeners from being registered or freeRASP from starting, which was previously only logged to the console
26+
- `ongoingCall` threat action with the new `CallState` type (`'STARTED' | 'ONGOING' | 'STOPPED'`), driven by `startOngoingCallDetection()` and `stopOngoingCallDetection()` (Android only)
27+
- `blockScreenControl()` and `isScreenControlBlocked()` to prevent accessibility services from reading or controlling the app screen (Android only)
28+
- `blockOverlayWindows()` and `isOverlayWindowsBlocked()` to hide overlay windows of other apps (Android 12+ only, requires the `HIDE_OVERLAY_WINDOWS` permission)
29+
- `criticalChecksFinished` and `postponedChecksFinished` RASP execution state actions (Android only)
30+
31+
#### Changed
32+
33+
- Android package (namespace) of the plugin renamed from `com.freeraspreactnative` to `app.talsec.rasp.reactnative`, following the Android SDK's `app.talsec.rasp` (update the import if you register `FreeraspReactNativePackage` manually)
34+
- On Android, `isScreenCaptureBlocked()` reports the protection state of the current activity
35+
- Threat and RASP execution state actions are typed as returning `void` instead of `any`
36+
37+
### Android
38+
39+
#### Fixed
40+
41+
- Improved hook detection to prevent collisions with running VPN services and to better work with the device resources (threads/RAM)
42+
- Fixed a release crash during root detection when a checked package is not installed
43+
- Fixed a crash in `ScreenProtector.unregisterScreenCallbacks` on Android 15+ when several activities registered screen callbacks
44+
- Fixed intermittent build failures of apps using the SDK (`NullPointerException: Cannot read field "d"`, shown by Gradle as `[CIRCULAR REFERENCE]`) caused by invalid bytecode in some SDK builds
45+
- Fixed `killOnBypass` closing the app when the same threat was reported twice in quick succession
46+
47+
#### Changed
48+
49+
- Deprecated the freeRASP Maven coordinates (`com.aheaditec.talsec.security:TalsecSecurity-{flavor}`)
50+
- Improved Bootloader detection
51+
- Extended emulator detection with additional device-property and ABI checks
52+
- Improved logging structure and data enrichment for better Portal insights/reports
53+
- Refactoring of the time spoofing detection which improves the performance of the freeRASP check execution
54+
- Improved the performance of the App integrity check
55+
- Updated CA bundle
56+
857
## [5.3.0] - 2026-11-09
958

1059
- Android SDK version: 19.3.1

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Key features are the detection and prevention of
2727
- Unlocked or compromised bootloader
2828
- Hooking framework (e.g., Frida, LSPosed, Shadow)
2929
- UI automation and driven-input attacks (e.g., Appium)
30+
- Ongoing cellular and VoIP calls during sensitive flows (Android)
31+
- Screen control by accessibility services and overlay windows of other apps (Android)
3032
- Untrusted installation method
3133
- App Data Migration protection
3234

‎android/build.gradle‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ android {
5757
compileSdk getMaxVersion("compileSdk")
5858

5959
talsec {
60-
sdkVersion = "19.3.1"
60+
sdkVersion = "20.0.1"
6161
platform = "ReactNative"
6262
}
6363

@@ -87,7 +87,7 @@ android {
8787
}
8888

8989
if (project.android.hasProperty("namespace")) {
90-
namespace("com.freeraspreactnative")
90+
namespace("app.talsec.rasp.reactnative")
9191
}
9292
}
9393

@@ -119,6 +119,6 @@ if (isNewArchitectureEnabled()) {
119119
react {
120120
jsRootDir = file("../src/")
121121
libraryName = "FreeraspReactNative"
122-
codegenJavaPackageName = "com.freeraspreactnative"
122+
codegenJavaPackageName = "app.talsec.rasp.reactnative"
123123
}
124124
}

‎android/proguard-rules.pro‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
-dontwarn java.lang.invoke.StringConcatFactory
2-
-keep class com.freeraspreactnative.FreeraspReactNativePackage { public *; }
2+
-keep class app.talsec.rasp.reactnative.FreeraspReactNativePackage { public *; }
33

44
-if @kotlinx.serialization.Serializable class **
55
-keep class <1> {
66
*;
77
}
88

9-
-keep class com.freeraspreactnative.models.RNSuspiciousAppInfo$Companion
10-
-keep class com.freeraspreactnative.models.RNPackageInfo$Companion
9+
-keep class app.talsec.rasp.reactnative.models.RNSuspiciousAppInfo$Companion
10+
-keep class app.talsec.rasp.reactnative.models.RNPackageInfo$Companion
1111

1212
-repackageclasses 'ts'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.freeraspreactnative">
2+
package="app.talsec.rasp.reactnative">
33

44
</manifest>

android/src/main/java/com/freeraspreactnative/FreeraspReactNativeModule.kt renamed to android/src/main/java/app/talsec/rasp/reactnative/FreeraspReactNativeModule.kt

Lines changed: 177 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
package com.freeraspreactnative
1+
package app.talsec.rasp.reactnative
22

3+
import android.annotation.SuppressLint
4+
import android.app.Activity
35
import android.os.Build
46
import android.os.Handler
57
import android.os.HandlerThread
@@ -9,6 +11,7 @@ import app.talsec.rasp.security.api.SuspiciousAppInfo
911
import app.talsec.rasp.security.api.Talsec
1012
import app.talsec.rasp.security.api.TalsecConfig
1113
import app.talsec.rasp.security.api.TalsecMode
14+
import app.talsec.rasp.security.api.ThreatListener.CallState
1215
import com.facebook.react.bridge.Arguments
1316
import com.facebook.react.bridge.LifecycleEventListener
1417
import com.facebook.react.bridge.Promise
@@ -20,20 +23,21 @@ import com.facebook.react.bridge.UiThreadUtil.runOnUiThread
2023
import com.facebook.react.bridge.WritableArray
2124
import com.facebook.react.bridge.WritableMap
2225
import com.facebook.react.modules.core.DeviceEventManagerModule
23-
import com.freeraspreactnative.dispatchers.ExecutionStateDispatcher
24-
import com.freeraspreactnative.dispatchers.ThreatDispatcher
25-
import com.freeraspreactnative.events.RaspExecutionStateEvent
26-
import com.freeraspreactnative.events.ThreatEvent
27-
import com.freeraspreactnative.interfaces.PluginExecutionStateListener
28-
import com.freeraspreactnative.interfaces.PluginThreatListener
29-
import com.freeraspreactnative.utils.Utils
30-
import com.freeraspreactnative.utils.getArraySafe
31-
import com.freeraspreactnative.utils.getBooleanSafe
32-
import com.freeraspreactnative.utils.getMapThrowing
33-
import com.freeraspreactnative.utils.getNestedArraySafe
34-
import com.freeraspreactnative.utils.getStringThrowing
35-
import com.freeraspreactnative.utils.toEncodedWritableArray
36-
import com.freeraspreactnative.utils.toSuspiciousAppDetectionConfig
26+
import app.talsec.rasp.reactnative.dispatchers.ExecutionStateDispatcher
27+
import app.talsec.rasp.reactnative.dispatchers.ThreatDispatcher
28+
import app.talsec.rasp.reactnative.events.RaspExecutionStateEvent
29+
import app.talsec.rasp.reactnative.events.ThreatEvent
30+
import app.talsec.rasp.reactnative.interfaces.PluginExecutionStateListener
31+
import app.talsec.rasp.reactnative.interfaces.PluginThreatListener
32+
import app.talsec.rasp.reactnative.utils.Utils
33+
import app.talsec.rasp.reactnative.utils.getArraySafe
34+
import app.talsec.rasp.reactnative.utils.getBooleanSafe
35+
import app.talsec.rasp.reactnative.utils.getMapThrowing
36+
import app.talsec.rasp.reactnative.utils.getNestedArraySafe
37+
import app.talsec.rasp.reactnative.utils.getStringThrowing
38+
import app.talsec.rasp.reactnative.utils.toEncodedWritableArray
39+
import app.talsec.rasp.reactnative.utils.toSuspiciousAppDetectionConfig
40+
import java.lang.ref.WeakReference
3741

3842
class FreeraspReactNativeModule(private val reactContext: ReactApplicationContext) :
3943
ReactContextBaseJavaModule(reactContext) {
@@ -54,6 +58,7 @@ class FreeraspReactNativeModule(private val reactContext: ReactApplicationContex
5458
reactContext.currentActivity?.let { ScreenProtector.unregister(it) }
5559
}
5660
if (reactContext.currentActivity?.isFinishing == true) {
61+
stopOngoingCallDetectionInternal()
5762
ThreatDispatcher.unregisterListener()
5863
ExecutionStateDispatcher.unregisterListener()
5964
PluginThreatHandler.unregisterSDKListener(reactContext)
@@ -134,14 +139,15 @@ class FreeraspReactNativeModule(private val reactContext: ReactApplicationContex
134139

135140
/**
136141
* Method to setup the threat message passing between native and React Native
137-
* @return list of [THREAT_CHANNEL_NAME, THREAT_CHANNEL_KEY]
142+
* @return list of [THREAT_CHANNEL_NAME, THREAT_CHANNEL_KEY, MALWARE_CHANNEL_KEY, CALL_STATE_CHANNEL_KEY]
138143
*/
139144
@ReactMethod
140145
fun getThreatChannelData(promise: Promise) {
141146
val channelData: WritableArray = Arguments.createArray()
142147
channelData.pushString(ThreatEvent.CHANNEL_NAME)
143148
channelData.pushString(ThreatEvent.CHANNEL_KEY)
144149
channelData.pushString(ThreatEvent.MALWARE_CHANNEL_KEY)
150+
channelData.pushString(ThreatEvent.CALL_STATE_CHANNEL_KEY)
145151
promise.resolve(channelData)
146152
}
147153

@@ -245,14 +251,158 @@ class FreeraspReactNativeModule(private val reactContext: ReactApplicationContex
245251
*/
246252
@ReactMethod
247253
fun isScreenCaptureBlocked(promise: Promise) {
254+
val activity = reactContext.currentActivity ?: run {
255+
promise.reject(
256+
"NativePluginError", "Cannot check screen capture state, activity is null."
257+
)
258+
return
259+
}
260+
248261
try {
249-
val isBlocked = Talsec.isScreenCaptureBlocked()
262+
val isBlocked = Talsec.isScreenCaptureBlocked(activity)
250263
promise.resolve(isBlocked)
251264
} catch (e: Exception) {
252265
promise.reject("NativePluginError", "Error in isScreenCaptureBlocked: ${e.message}")
253266
}
254267
}
255268

269+
/**
270+
* Method Block/Unblock accessibility services from reading or controlling the screen
271+
* @param enable boolean for whether want to block or unblock the screen control
272+
*/
273+
@ReactMethod
274+
fun blockScreenControl(enable: Boolean, promise: Promise) {
275+
val activity = reactContext.currentActivity ?: run {
276+
promise.reject(
277+
"NativePluginError", "Cannot block screen control, activity is null."
278+
)
279+
return
280+
}
281+
282+
runOnUiThread {
283+
try {
284+
Talsec.blockScreenControl(activity, enable)
285+
promise.resolve("Screen control is now ${if (enable) "Blocked" else "Enabled"}.")
286+
} catch (e: Exception) {
287+
promise.reject("NativePluginError", "Error in blockScreenControl: ${e.message}")
288+
}
289+
}
290+
}
291+
292+
/**
293+
* Method Returns whether screen control is blocked or not
294+
* @return boolean for is screen control blocked or not
295+
*/
296+
@ReactMethod
297+
fun isScreenControlBlocked(promise: Promise) {
298+
val activity = reactContext.currentActivity ?: run {
299+
promise.reject(
300+
"NativePluginError", "Cannot check screen control state, activity is null."
301+
)
302+
return
303+
}
304+
305+
try {
306+
promise.resolve(Talsec.isScreenControlBlocked(activity))
307+
} catch (e: Exception) {
308+
promise.reject("NativePluginError", "Error in isScreenControlBlocked: ${e.message}")
309+
}
310+
}
311+
312+
/**
313+
* Method Hide/Show overlay windows of other apps over the activity.
314+
* Requires Android 12+ and the HIDE_OVERLAY_WINDOWS permission.
315+
* @param enable boolean for whether want to hide or show overlay windows
316+
* @return boolean whether the request was applied
317+
*/
318+
// Missing permission is suppressed because the decision to use the overlay API is made
319+
// by developer, and not enforced by the library.
320+
@SuppressLint("MissingPermission")
321+
@ReactMethod
322+
fun blockOverlayWindows(enable: Boolean, promise: Promise) {
323+
val activity = reactContext.currentActivity ?: run {
324+
promise.reject(
325+
"NativePluginError", "Cannot block overlay windows, activity is null."
326+
)
327+
return
328+
}
329+
330+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
331+
promise.resolve(false)
332+
return
333+
}
334+
335+
runOnUiThread {
336+
try {
337+
promise.resolve(Talsec.blockOverlayWindows(activity, enable))
338+
} catch (e: Exception) {
339+
promise.reject("NativePluginError", "Error in blockOverlayWindows: ${e.message}")
340+
}
341+
}
342+
}
343+
344+
/**
345+
* Method Returns whether overlay windows of other apps are hidden or not
346+
* @return boolean for are overlay windows hidden or not
347+
*/
348+
@ReactMethod
349+
fun isOverlayWindowsBlocked(promise: Promise) {
350+
val activity = reactContext.currentActivity ?: run {
351+
promise.reject(
352+
"NativePluginError", "Cannot check overlay windows state, activity is null."
353+
)
354+
return
355+
}
356+
357+
try {
358+
promise.resolve(Talsec.isOverlayWindowsBlocked(activity))
359+
} catch (e: Exception) {
360+
promise.reject("NativePluginError", "Error in isOverlayWindowsBlocked: ${e.message}")
361+
}
362+
}
363+
364+
/**
365+
* Method starts the ongoing call (cellular and VoIP) detection for the current activity
366+
*/
367+
@ReactMethod
368+
fun startOngoingCallDetection(promise: Promise) {
369+
val activity = reactContext.currentActivity ?: run {
370+
promise.reject(
371+
"NativePluginError", "Cannot start ongoing call detection, activity is null."
372+
)
373+
return
374+
}
375+
376+
try {
377+
if (ongoingCallActivity?.get() !== activity) {
378+
stopOngoingCallDetectionInternal()
379+
Talsec.startOngoingCallDetection(activity)
380+
ongoingCallActivity = WeakReference(activity)
381+
}
382+
promise.resolve("Ongoing call detection started.")
383+
} catch (e: Exception) {
384+
promise.reject("NativePluginError", "Error in startOngoingCallDetection: ${e.message}")
385+
}
386+
}
387+
388+
/**
389+
* Method stops the ongoing call detection
390+
*/
391+
@ReactMethod
392+
fun stopOngoingCallDetection(promise: Promise) {
393+
try {
394+
stopOngoingCallDetectionInternal()
395+
promise.resolve("Ongoing call detection stopped.")
396+
} catch (e: Exception) {
397+
promise.reject("NativePluginError", "Error in stopOngoingCallDetection: ${e.message}")
398+
}
399+
}
400+
401+
private fun stopOngoingCallDetectionInternal() {
402+
ongoingCallActivity?.get()?.let { Talsec.stopOngoingCallDetection(it) }
403+
ongoingCallActivity = null
404+
}
405+
256406
@ReactMethod
257407
fun storeExternalId(
258408
externalId: String, promise: Promise
@@ -319,6 +469,9 @@ class FreeraspReactNativeModule(private val reactContext: ReactApplicationContex
319469
private val mainHandler = Handler(Looper.getMainLooper())
320470

321471
internal var talsecStarted = false
472+
473+
// Ongoing call detection is registered per activity
474+
private var ongoingCallActivity: WeakReference<Activity>? = null
322475
}
323476

324477
internal class PluginListener(private val reactContext: ReactApplicationContext) :
@@ -344,6 +497,13 @@ class FreeraspReactNativeModule(private val reactContext: ReactApplicationContex
344497
}
345498
}
346499

500+
override fun ongoingCallDetected(state: CallState) {
501+
val params = Arguments.createMap()
502+
params.putInt(ThreatEvent.CHANNEL_KEY, ThreatEvent.OngoingCall.value)
503+
params.putString(ThreatEvent.CALL_STATE_CHANNEL_KEY, state.name)
504+
notifyEvent(ThreatEvent.CHANNEL_NAME, params)
505+
}
506+
347507
override fun raspExecutionStateChanged(event: RaspExecutionStateEvent) {
348508
val params = Arguments.createMap()
349509
params.putInt(event.channelKey, event.value)

android/src/main/java/com/freeraspreactnative/FreeraspReactNativePackage.kt renamed to android/src/main/java/app/talsec/rasp/reactnative/FreeraspReactNativePackage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.freeraspreactnative
1+
package app.talsec.rasp.reactnative
22

33
import com.facebook.react.ReactPackage
44
import com.facebook.react.bridge.NativeModule

0 commit comments

Comments
 (0)