API

Types

TalsecConfig

Specifies configuration for your app. See the table below for detailed description of the attributes.

field
type
description
sample value

androidConfig

AndroidConfig?

Configuration for Android apps

any AndroidConfig instance

iosConfig

IOSConfig?

Configuration for iOS apps

any IOSConfig instance

watcherMail

string

The value is automatically used for Security Reports, Product Updates, and Talsec Portal updates, learn more.

Mail has a strict form '[email protected]'.

isProd

boolean?

Defaults to true when undefined. If you want to use the Dev version to make the development process easier, set the parameter to false. Make sure that you have the Release version in the production (i.e. isProd set to true)!. To simplify switching between debug and release version of freeRASP based on the build type, you can use BuildConfig.BUILD_TYPE.contains("Release", true) as a value for isProd.

true

killOnBypass

boolean?

Defaults to false .

Determines whether the app should be killed within the SDK, if the callbacks are hooked or modified by an attacker.

true

TalsecAndroidConfig

Specifies configuration for instances of the app running on Android devices. See the table below for detailed description of the attributes.

field
type
description
sample value

packageName

string

Package name of the app.

'com.talsec.freerasp.demoapp'

certificateHashes

string[]

Certificate hashes of your app.

['mVr/qQLO8DKTwqlL+B1qigl9NoBnbiUs8b4c2Ewcz0k=']

supportedAlternativeStores

string[]

Package names of the alternative stores. If you publish on the Google Play Store and Huawei AppGallery, as these are already included internally. (You can assign just emptyArray()). For more information, visit the Detecting Unofficial Installationarrow-up-right wiki page.

[ 'com.sec.android.app.samsungapps']

TalsecIosConfig

Specifies configuration for instances of the app running on iOS devices. See the table below for detailed description of the attributes.

field
type
description
sample value

appBundleId

string

Apple Bundle ID for the app

'com.talsec.freerasp.demoapp'

appTeamId

string

Apple Team ID used in the app

'M8AK35...'

ThreatEventActions

Specifies a set of callbacks that are used to notify the application when certain security threat is detected.

Actions

threat
type
Android
iOS

privilegedAccess

() => any

debug

() => any

simulator

() => any

appIntegrity

() => any

unofficialStore

() => any

hooks

() => any

deviceBinding

() => any

deviceID

() => any

passcode

() => any

secureHardwareNotAvailable

() => any

obfuscationIssues

() => any

devMode

() => any

adbEnabled

() => any

systemVPN

() => any

malware

(apps: SuspiciousAppInfo[]) => any

screenshot

() => any

screenRecording

() => any

multiInstance

() => any

timeSpoofing

() => any

locationSpoofing

() => any

unsecureWifi

() => any

automation

() => any

RaspExecutionStateEventActions

Specifies a set of callbacks that are used to notify the application about the state of freeRASP execution.

field
type
Android
iOS

allChecksFinished

() => any

Methods

const startFreeRASP = async (config: TalsecConfig, actions: ThreatEventActions, raspExecutionStateActions?: RaspExecutionStateEventActions): Promise<{ started: boolean }>

  • Method is used to start freeRASP's audit and set up listeners for threats. Returns { started: true } when successful.

const removeThreatListener

  • Unregisters threat listeners. Should be called only when the app is being terminated.

const blockScreenCapture

  • Enables or disables screen capture blocking (Android only).

const isScreenCaptureBlocked

  • Checks if screen capture is currently blocked (Android only).

const storeExternalId

  • Stores an external ID (e.g., User ID) to be sent with reports to the Talsec Dashboard.

const removeExternalId

  • Removes the stored external ID.

Last updated