AndroidSentinel is a comprehensive security analysis SDK for Android applications. It provides developers with powerful tools to identify and address potential security vulnerabilities, ensuring robust protection for both the app and its users.
- Comprehensive Security Analysis: Performs 18 distinct security checks covering a wide range of potential vulnerabilities.
- Easy Integration: Simple to integrate into existing Android projects with minimal setup.
- Customizable: Flexible configuration options to tailor security checks to your specific needs.
- Detailed Reporting: Provides actionable insights with severity levels and recommendations for each identified issue.
- Lightweight: Designed for minimal impact on app performance and size.
Add the AndroidSentinel dependency to your project using one of the following methods:
dependencies {
implementation 'com.example.androidsentinel:sentinelarmor:1.1.2' // Use Latest Version
}
dependencies {
implementation("com.example.androidsentinel:sentinelarmor:1.1.2") // Use Latest Version
}
Make sure you have the appropriate repository added to your project's settings.gradle
(Groovy) or settings.gradle.kts
(Kotlin DSL) file:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
After adding the dependency, sync your project with the gradle files to download the AndroidSentinel SDK.
- Initialize AndroidSentinel in your application:
val androidSentinel = SentinelArmorFactory.create(context)
- Run the security analysis:
val securityIssues = androidSentinel.analyzeSecurityFlaws()
- Process the results:
securityIssues.forEach { issue ->
SecurityLogger.logIssue(issue)
// Handle or display the security issue as needed
}
- Open LogCat and filter with Security Issue to see logs.
AndroidSentinel performs the following security checks:
- Permissions: Analyzes potentially sensitive permission usage.
- Root Detection: Checks for indicators of a rooted device.
- Data Encryption: Verifies if device encryption is enabled.
- ADB Debugging: Detects if ADB debugging is active.
- Backup Allowed: Checks if the app allows backups.
- Screen Lock Protection: Verifies if a secure screen lock is set.
- Insecure Data Storage: Looks for sensitive data in SharedPreferences.
- Weak Cryptography: Checks for the use of weak cryptographic algorithms.
- Clipboard Vulnerability: Warns about potential clipboard vulnerabilities.
- Broadcast Receivers: Analyzes the security of broadcast receivers.
- WebView Security: Checks WebView configurations for security best practices.
- Content Provider Exposure: Examines content provider security.
- Network Security Config: Verifies proper network security configuration.
- Firebase Security Rules: Checks Firebase security if used.
- SQL Injection Vulnerability: Analyzes for potential SQL injection risks.
- JavaScript Enabled: Checks JavaScript settings in WebViews.
- Tapjacking: Verifies protection against tapjacking attacks.
- Deep Link Validation: Ensures proper validation of deep links.
AndroidSentinel follows SOLID principles and is designed with modularity in mind:
AndroidSentinel
: Main interface defining the SDK's public API.AndroidSentinelImpl
: Internal implementation of the AndroidSentinel interface.SentinelArmorFactory
: Factory for creating AndroidSentinel instances.SecurityCheck
: Interface for individual security checks.SecurityIssue
: Data class representing identified security issues.- Individual check classes: Implement specific security checks.
This modular architecture allows for easy extension and customization of security checks.
We welcome contributions to AndroidSentinel! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and write tests if applicable.
- Submit a pull request with a clear description of your changes.
Please ensure your code adheres to the project's coding standards and passes all existing tests.
AndroidSentinel is released under the MIT License.
For more information, please open an issue or contact the maintainers.