Repository navigation
refactor!: replace Pigeon with the threat event channel - #244
Merged
Merged
Conversation
Malware and ongoing call detections are sent over the existing threat
EventChannel as {type, ...} maps next to the plain threat codes, so one
subscription delivers every detection in order. PackageInfo,
SuspiciousAppInfo and CallState become hand-written Dart types with the
same names; ThreatCallback no longer extends the generated
TalsecPigeonApi. The pigeon dev dependency and generated code are removed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
flutter/foundation does not export @internal in Flutter 3.24, the minimum supported version used by CI. Co-Authored-By: Claude Opus 5.5 <[email protected]>
tompsota
added a commit
that referenced
this pull request
Nov 13, 2026
* feat!: unify the public API with the other freeRASP plugins - config fields follow the native SDKs: AndroidConfig.certificateHashes, supportedAlternativeStores; IOSConfig.appBundleIds, appTeamId - threat names match the other plugins: onAdbEnabled, onUnsecureWifi, Threat.deviceID, Threat.unsecureWifi - every method throws only TalsecException or a subclass; new UnsupportedPlatformException replaces UnimplementedError, and the malware/external-id exceptions are now exported Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(ios): use the renamed config keys in RunnerTests Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor!: hide Talsec internals, tighten malware callback, unify unknown-code handling - Talsec.private and the channel fields are private; tests use an internal createTalsecForTesting factory that freerasp.dart hides - MalwareCallback takes List<SuspiciousAppInfo> suspiciousApps - ThreatX.fromInt throws ArgumentError; Talsec terminates the app on an unknown threat or execution state code, like the JS plugins Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: use @VisibleForTesting for the test factory @internal is not exported by flutter/foundation in Flutter 3.24, the minimum supported version used by CI. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor!: replace Pigeon with the threat event channel (#244) * refactor!: replace Pigeon with the threat event channel Malware and ongoing call detections are sent over the existing threat EventChannel as {type, ...} maps next to the plain threat codes, so one subscription delivers every detection in order. PackageInfo, SuspiciousAppInfo and CallState become hand-written Dart types with the same names; ThreatCallback no longer extends the generated TalsecPigeonApi. The pigeon dev dependency and generated code are removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: import @internal and @immutable from package:meta flutter/foundation does not export @internal in Flutter 3.24, the minimum supported version used by CI. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
tompsota
added a commit
that referenced
this pull request
Nov 13, 2026
* release: freeRASP 8.4.0 (Android SDK 20.0.1) Bump the Android SDK to 20.0.1 (app.talsec.rasp:TalsecRasp-Community-Flutter) and expose its new features: - ongoing call detection: ThreatCallback.onOngoingCall with CallState, Talsec.startOngoingCallDetection/stopOngoingCallDetection - screen control blocking: blockScreenControl/isScreenControlBlocked - overlay windows hiding: blockOverlayWindows/isOverlayWindowsBlocked - onCriticalChecksFinished/onPostponedChecksFinished execution states onAllChecksFinished is now driven by the SDK's onFastChecksFinished, which fires where the removed onAllChecksFinished used to. Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs: reword the Maven coordinates changelog entry Co-Authored-By: Claude Opus 5.5 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * docs: drop Android changelog entries already listed in the plugin section Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(android): move plugin to the app.talsec.rasp.flutter namespace (#242) * 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 <[email protected]> * 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 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * example: show ongoing call alongside the other threats Co-Authored-By: Claude Opus 5.5 <[email protected]> * example: show the ongoing call state (Not detected, Started, Ongoing, Stopped) Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(android): start Talsec in background mode Talsec.start now uses TalsecMode.BACKGROUND, as the React Native plugin already does, so the SDK initializes off the calling thread. Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(changelog): note that freeRASP starts in background mode on Android Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat!: unify the public API with the other freeRASP plugins (#243) * feat!: unify the public API with the other freeRASP plugins - config fields follow the native SDKs: AndroidConfig.certificateHashes, supportedAlternativeStores; IOSConfig.appBundleIds, appTeamId - threat names match the other plugins: onAdbEnabled, onUnsecureWifi, Threat.deviceID, Threat.unsecureWifi - every method throws only TalsecException or a subclass; new UnsupportedPlatformException replaces UnimplementedError, and the malware/external-id exceptions are now exported Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(ios): use the renamed config keys in RunnerTests Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor!: hide Talsec internals, tighten malware callback, unify unknown-code handling - Talsec.private and the channel fields are private; tests use an internal createTalsecForTesting factory that freerasp.dart hides - MalwareCallback takes List<SuspiciousAppInfo> suspiciousApps - ThreatX.fromInt throws ArgumentError; Talsec terminates the app on an unknown threat or execution state code, like the JS plugins Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: use @VisibleForTesting for the test factory @internal is not exported by flutter/foundation in Flutter 3.24, the minimum supported version used by CI. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor!: replace Pigeon with the threat event channel (#244) * refactor!: replace Pigeon with the threat event channel Malware and ongoing call detections are sent over the existing threat EventChannel as {type, ...} maps next to the plain threat codes, so one subscription delivers every detection in order. PackageInfo, SuspiciousAppInfo and CallState become hand-written Dart types with the same names; ThreatCallback no longer extends the generated TalsecPigeonApi. The pigeon dev dependency and generated code are removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix: import @internal and @immutable from package:meta flutter/foundation does not export @internal in Flutter 3.24, the minimum supported version used by CI. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #243 (
feat/unified-api). Removes Pigeon from the plugin.Why
Pigeon carried only two Android-to-Dart calls (
onMalwareDetected,onOngoingCallDetected) and three types. Everything else already used hand-written channels. Because of that split, malware and ongoing call reached Dart on a separate channel from the other threats, with its own registration, and the generatedTalsecPigeonApileaked into the public API as the superclass ofThreatCallback.What changes
Transport
EventChannel(talsec.app/freerasp/events):intcode (unchanged){type: "malware", suspiciousApps: [...]}{type: "ongoingCall", state: "started" | "ongoing" | "stopped"}ThreatDispatcherhas a single sink and cache. Malware app details are resolved inPluginThreatHandlerwhen the detection arrives.Dart
attachListeneruses one subscription and dispatches ints and maps in arrival order.onThreatDetectedstaysStream<Threat>and skips the payload events.Types
PackageInfo,SuspiciousAppInfoandCallStateare hand-written under the same names.toString.fromMapis@internal.Removed
pigeons/, the generated Dart and Kotlin, and thepigeondev dependency.Breaking (in CHANGELOG)
ThreatCallbackno longer extendsTalsecPigeonApi, andonMalwareDetected/onOngoingCallDetectedare gone. Use theonMalware/onOngoingCallcallbacks.PackageInfo/SuspiciousAppInfofields are final andencode/decodeare removed.Verified
flutter analyzeis clean and 91 tests pass, including new tests:onThreatDetectedfiltering out payload eventsfromMapparsing and its failure on a malformed map🤖 Generated with Claude Code