Note: This library is currently under active development. Some features, especially on iOS may be incomplete or experimental.
Sentinel is a lightweight, modular Kotlin Multiplatform security toolkit designed to analyze runtime environments and detect potential security threats in real time on both Android and iOS.
It helps protect your application against:
- Rooted or Jailbroken devices
- App tampering
- Hooking frameworks
- Emulators or Simulators
- Debugging sessions
Sentinel performs deep environmental inspection, calculates a unified risk severity score, and produces a comprehensive security report.
| Threat / Feature | Android | iOS |
|---|---|---|
| Root / Jailbreak | ✅ | ✅ |
| App Tampering | ✅ | ❌ |
| Hooking Frameworks | ✅ | ❌ |
| Emulator / Simulator Detection | ✅ | ✅ |
| Debugging Detection | ✅ | ❌ |
| Mock Location Abuse | ❌ | ❌ |
Sentinel uses a centralized DSL configuration to manage all security checks.
implementation("io.github.resulsilay:sentinel:1.0.0-alpha07")val sentinel = Sentinel.configure(context = context) {
config {
this.appId = Sentinel.Identity.appId.toByteList()
this.signature = Sentinel.Identity.signature?.toByteList()
this.threshold = 90
}
all()
// root()
// tamper()
// hook()
// emulator()
// debug()
}val sentinel = Sentinel.configure {
config {
this.appId = Sentinel.Identity.appId.toByteList()
this.threshold = 90
}
all()
// root()
// emulator()
}Instead of basic checks, Sentinel performs a thorough inspection of the environment and provides a detailed report based on threat severity.
val report = sentinel.inspect()
println("----- Security Report -----")
println("Risk Level: ${report.riskLevel}")
println("Severity Score: ${report.severity}")
println("Threat Count: ${report.threats.size}")
if (report.isRooted) println("❌ Root detected")
if (report.isTampered) println("❌ App tampering detected")
if (report.isHooked) println("❌ Hooking detected")
if (report.isEmulator) println("❌ Emulator detected")
if (report.isDebuggable) println("❌ Debugger detected")
if (report.isSafe()) {
println("✅ Device is secure")
} else {
println("⚠️ Security risks detected!")
}
if (report.isCritical()) {
println("🚫 Block app usage.")
}MIT License
Copyright (c) 2026 Resul Silay
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

