talsec / Free-RASP-Flutter

Flutter library for improving app security and threat monitoring on Android and iOS mobile devices.
https://github.com/talsec/Free-RASP-Community
MIT License
194 stars 20 forks source link

ThreatCallback listener not working after kill app programmatically and reopen from device #122

Closed rajeshbdabhi closed 4 months ago

rajeshbdabhi commented 4 months ago

Describe the bug

ThreatCallback callback = ThreatCallback(
      onObfuscationIssues: () => _handleSecurity(Threat.obfuscationIssues),
      onDebug: () => _handleSecurity(Threat.debug),
      onDeviceBinding: () => _handleSecurity(Threat.deviceBinding),
      onHooks: () => _handleSecurity(Threat.hooks),
      onPrivilegedAccess: () => _handleSecurity(Threat.privilegedAccess),
      onSecureHardwareNotAvailable: () => _handleSecurity(Threat.secureHardwareNotAvailable),
      onSimulator: () => _handleSecurity(Threat.simulator),
      onUnofficialStore: () => _handleSecurity(Threat.unofficialStore),
      onDevMode: () => _handleSecurity(Threat.devMode),
    );
 // Attaching listener
Talsec.instance.attachListener(callback);

To Reproduce when open app first time it is giving threat. but when i kill app programmatically using SystemNavigator.pop() this method and open app again threat is not detecting.