# RASP Protection

Sentinel extends protection beyond initial startup checks by continuously monitoring the application during runtime. Through background scanning mechanisms, it detects unauthorized access attempts, runtime tampering, and external manipulation activities in real time.

```kotlin
sentinel.runtime {
    onCompromised {
        print(msg = "Device integrity failed (Root/Jailbreak detected).")
    }

    onTampered {
        print(msg = "App tampering detected.")
    }

    onHooked {
        print(msg = "Runtime hook detection.")
    }

    onSimulated {
        print(msg = "Running on Emulator/Simulator environment.")
    }

    onDebugged {
        print(msg = "Active debugging session detected.")
    }

    onCritical { score ->
        print(msg = "High risk score reached: $score")
    }

    onSafe {
        print(msg = "All systems nominal.")
    }
}
```


---

# Agent Instructions: 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:

```
GET https://sentinel.rexiox.co/advanced-features/rasp-protection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
