> For the complete documentation index, see [llms.txt](https://docs.caf.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.caf.io/caf-sdk/web-javascript/security.md).

# Security

We are constantly taking actions to make the product more and more secure, mitigating a number of attacks observed in the capture process and, consequently, reducing as many possible identity frauds as possible. The SDK has some blocks that may prevent its execution in certain contexts. These are

> Initially, the security enhancements are only available for `PassiveFaceLiveness`.

## **Obfuscated Code** <a href="#sjbnjfrclugt" id="sjbnjfrclugt"></a>

The browser allows inspecting implementation details of solutions based on web tools. Understanding that this functionality can represent a point of vulnerability, it was implemented that the obfuscation of the code present in the SDK prevents implementation details from being revealed, thus inhibiting possible reverse engineering practices.

## **Automatic shutdown of the SDK** <a href="#id-2xd5d21mken6" id="id-2xd5d21mken6"></a>

> When enabled the security enhancements that terminate the SDK are, its execution will be terminated automatically, so it must be implemented in a way to directs the application to a screen at your discretion, both features that terminate the SDK are configurable and can be disabled, check the parameters used in the documentation of the corresponding SDK.

### **Tab change** <a href="#o8spfvljurpg" id="o8spfvljurpg"></a>

While running the SDK, changing browser tabs makes it impossible to capture the selfie, automatically terminating the SDK. Therefore, it is recommended that the user does not switch tabs while using `PassiveFaceLiveness`.

### **Face not detected** <a href="#hav38yag3ivr" id="hav38yag3ivr"></a>

In the process of capturing the selfie, it is necessary that the user keeps the face positioned in the indicated area, otherwise, the process will be terminated.

\*\* Only available for automatic capture

## **Attempt control** <a href="#id-1r45dsgj7rnv" id="id-1r45dsgj7rnv"></a>

For security measures, a mechanism was developed that limits the number of retries. After the user reaches the given number of tries, the SDK terminates the execution.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.caf.io/caf-sdk/web-javascript/security.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
