Security Checks
Context
Face Liveness Lite protects the liveness result with two independent layers of checks:
Certta device checks
On the device, in the SDK
Before and during the capture
LivenessLiteEvent.Error with type SECURITY_EXCEPTION. No signed response.
Liveness checks
On the liveness servers
While the capture is processed
LivenessLiteEvent.Failure with type DEVICE_ISSUE, with a signed response.
Both layers are always part of the flow. The Certta device checks can be turned off with enableSecurity. The liveness checks cannot be turned off from the app.
Certta Device Checks
The SDK checks the device before and during the capture to make sure the result was not tampered with. If the device looks compromised, the SDK stops the capture and returns an error instead of a result.
What is checked
Root detection
Rooted devices, the su binary, Magisk and Zygisk.
Hooking frameworks
Frida (library, server port, threads and files), Xposed and LSPosed.
Code integrity
Hooking or injection libraries loaded into the app, and system functions redirected or patched at runtime.
Debugging
A debugger attached to the app, a process tracing the app, or an app built as debuggable.
Timing analysis
Execution timing that suggests a debugger or step tracer. Used to confirm other findings, never on its own.
The checks are fail-closed: if one of them cannot run, the SDK treats it as a threat. A broken or bypassed check never lets the capture through.
Any finding blocks the capture. There is no severity level that is allowed to continue.
How it works
Before the capture. When you call
startLiveness(), the SDK checks the device before opening the camera. If a threat is found, the camera never opens.During the capture. While the capture is running, the SDK checks the device again every 2 seconds. If a threat appears, for example a hooking tool attached in the middle of the capture, the capture is stopped right away.
At the end. When the run ends, the monitoring stops.
The checks also run during prewarm(). A threat found there does not return an error: the prewarm is skipped, and startLiveness() runs the checks again.
Configuration
enableSecurity
Boolean
true
Runs the Certta device checks before and during the liveness capture.
When a threat is found
The SDK returns a LivenessLiteEvent.Error with the type SECURITY_EXCEPTION. The description summarizes how many threats were found, grouped by severity:
Retrying on the same device returns the same error, because the finding is saved until the app data is cleared or the app is reinstalled. For the recommended message and what to do, see SECURITY_EXCEPTION.
Liveness Checks
The capture is processed by the liveness service, which runs its own checks against digital injection attacks, such as manipulated video streams or a tampered app. These checks run on the server, so they cannot be bypassed on the device.
When these checks do not pass, the capture is still processed and the SDK returns a LivenessLiteEvent.Failure with the type DEVICE_ISSUE, together with a signed response. Validate it on your backend like any other result.
Liveness environments
The liveness checks run in an environment configured for your account. Each environment type applies its own rules:
Development
Any build
Any installation
Pass
Production
Release build
ADB
Fail
Production
Release build
Normal installation, APK or app store
Pass
Production
Debug build
ADB
Fail
Production
Debug build
Normal installation, APK or app store
Fail
Test
Release build
ADB
Fail
Test
Release build
Normal installation, APK or app store
Pass
Test
Debug build
ADB
Fail
Test
Debug build
Normal installation, APK or app store
Fail
When the injection tests fail, the SDK returns a DEVICE_ISSUE failure.
The liveness environment used by your account is configured by Certta. If you need a different setup for testing, contact your Certta account team.
Testing Your Integration
Because of both layers, a debug build from Android Studio cannot complete a liveness capture in production:
With
enableSecurity = true, the Certta device checks detect the debuggable app and returnSECURITY_EXCEPTION.With
enableSecurity = false, the capture runs, but the liveness checks return aDEVICE_ISSUEfailure.
To test the full flow, use a release build installed from an APK file or the app store, with enableSecurity = true.
Last updated

