> For the complete documentation index, see [llms.txt](https://sentinel.rexiox.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sentinel.rexiox.co/getting-started/rasp-protection.md).

# 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.")
    }
}
```
