talsec / Free-RASP-ReactNative

React Native plugin for improving app security and threat monitoring on Android and iOS mobile devices.
https://github.com/talsec/Free-RASP-Community
MIT License
84 stars 10 forks source link

"started" action - not working #73

Open MamoshiSE opened 3 months ago

MamoshiSE commented 3 months ago

Hey, In the previous versions in actions there was the "started" flag which let you know talsec had been initizalized, now it just logs freeRASP started, is there a way to access the flag when it's succesfully initialized in the latest version?

tompsota commented 3 months ago

Hello @MamoshiSE,

we've removed the started flag in v3.8.0, as a part of hardening the freeRASP plugin. Since then, the useTalsec hook ensures that if the app doesn't receive response from native Android/iOS, it will get killed by freeRASP, so there is no need to check whether the initialization has been successful on your side.

However, if you still want to handle initialization responses from freeRASP yourself, you can skip the useTalsec hook and initialize freeRASP on your own by calling these 2 methods:

await setThreatListeners(actions);
const response = await talsecStart(config); 

The response will contain "freeRASP started" string.

We're also preparing an improved version of the freeRASP API, which will provide you more insight into the current state of executed checks. Stay tuned for that!

Best, Tomas from Talsec