Index of every page on this site: llms.txt
All skills
Run it yourself

Android engineering guidance covering security auditing, performance and UI rendering investigation, Kotlin/Compose/Views architecture, Gradle build and CI practices, and end-to-end feature implementation. Use when working in an Android, Kotlin, or Gradle project: auditing app security against OWASP MASVS, investigating jank, dropped frames, ANRs, or slow startup, reviewing an Android pull request, optimizing a Gradle build, or implementing a new feature. Works with Jetpack Compose or XML Views, any architecture (MVVM, MVI, or whatever the project already uses), and any build/CI setup. Does not activate for non-Android or non-Gradle tasks.

  • 6 files
  • 67.8 KB
  • Apache-2
  • Updated last month
  • GitHub
Use this Skill: https://skilld.dev/gh/kazimdsaidul/android-engineering-ai-skill/android-engineering

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencessecurity.md

≈3.4k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Android Security

Scope: static-evidence security review of an Android app — manifest/component exposure, permissions and IPC surfaces, network and transport security, secrets/crypto/auth, data storage and privacy, dependency risk, and release configuration. Framed loosely against OWASP MASVS v2 controls and the MASTG test techniques.

This is a structured review aid, not a penetration test or certification. It finds patterns in source and configuration; it does not replace dynamic testing (Frida/MobSF/Burp), a professional security assessment, or OWASP MASVS certification. Say so explicitly in any report you produce from this file, and mark findings that would need runtime confirmation as such rather than asserting them as proven.

How to use this file

  1. Read AndroidManifest.xml (all variants/flavors if present) and the relevant Gradle files first — most findings below are visible there before touching a line of Kotlin.
  2. Work through the sections in order; each lists what to check and why it matters, not just a pass/fail box.
  3. Tag findings by MASVS-style severity (Critical/High/Medium/Low/Info) and state your evidence (file + line) for each one.
  4. Anything you can't verify statically (e.g. "is this encryption key actually used correctly at runtime") — say that it needs dynamic verification instead of guessing.

1. Manifest and exported components

  • Any <activity>, <service>, <receiver>, <provider> with android:exported="true" (or implicitly exported because it declares an <intent-filter> on API levels where that used to default to exported) is a potential entry point from other apps. Check that each exported component validates its caller/input rather than trusting it.
  • android:permission on an exported component restricts who can invoke it — verify any exported component handling sensitive data declares one, and that custom permissions use protectionLevel="signature" where appropriate rather than the default normal.
  • FileProvider/ContentProvider entries: check android:grantUriPermissions, URI path restrictions (<path-permission>, <grant-uri-permission>), and that query/update/delete don't trust caller-supplied selection strings unsanitized (SQL injection-style risk in a ContentProvider backed by SQLite).
  • android:allowBackup and android:fullBackupContent: allowBackup="true" (the default) lets adb backup extract app data on older API levels and lets Auto Backup capture app data on newer ones unless explicitly excluded — confirm sensitive files/directories are excluded via a backup rules XML, or that backup is deliberately disabled.
  • android:debuggable must never be true in a release manifest — it's normally controlled by the build type, but check any manifest overrides or merge rules that could flip it.
  • usesCleartextTraffic / absence of a Network Security Config (see §3) often shows up here too.

2. Permissions, deep links, intents, WebView

  • Permissions: flag any dangerous or special-access permission (location, contacts, SMS, QUERY_ALL_PACKAGES, accessibility service, etc.) that isn't clearly load-bearing for the app's stated purpose — this is also what Play Console's Data Safety / permissions declarations scrutinize. Also check when a permission is requested: requesting it at the point of use (right before the feature that needs it runs) gives the user context for why it's being asked and is the documented Android best practice; a blanket request-everything-at-launch pattern is a usability smell and often a sign nothing actually gated the request on need.
  • Deep links: for each <intent-filter> with android:autoVerify="true" or a custom scheme, trace where the resulting Intent data is consumed. A deep link that flows unsanitized into a WebView URL, a file path, or a privileged action is a classic injection/open-redirect vector. Prefer App Links (verified https deep links) over custom schemes for anything security-sensitive, since custom schemes can be claimed by other installed apps.
  • Implicit intents carrying sensitive data: broadcasting sensitive data via an implicit Intent (or an unprotected BroadcastReceiver) can be read by any app that registers a matching filter. Use explicit intents, LocalBroadcastManager-equivalents (a Flow/in-process bus), or set an explicit receiver permission.
  • PendingIntent mutability: an explicit PendingIntent created without FLAG_IMMUTABLE (required since targeting API 31+, but worth checking even when not yet required) can have its underlying Intent filled in or altered by the receiving app in some versions — prefer FLAG_IMMUTABLE unless mutation is genuinely required.
  • WebView: check setJavaScriptEnabled(true) is paired with a real need; check addJavascriptInterface usage is scoped to trusted content only and (if minSdk < 17) the exposed methods are annotated @JavascriptInterface; check setAllowFileAccess/setAllowFileAccessFromFileURLs/setAllowUniversalAccessFromFileURLs aren't left permissive for content loading untrusted/remote HTML; check shouldOverrideUrlLoading/WebViewClient validates navigation targets instead of loading anything. For loading an app's own bundled local HTML/assets specifically, prefer WebViewAssetLoader (serves them over a virtual https://appassets.androidx.webkit origin) over file:// URLs or permissive file-access flags — it avoids the Same-Origin-Policy and file-access pitfalls file:// loading creates.

3. Network security configuration and TLS

  • Check for a Network Security Config (res/xml/network_security_config.xml, referenced via android:networkSecurityConfig in the manifest). Absence means the platform default applies (cleartext blocked by default since API 28, allowed before that).
  • Any <domain-config cleartextTrafficPermitted="true"> or a global usesCleartextTraffic="true" should be justified (e.g. local dev/staging only, gated by build type) — not shipped broadly in release.
  • Certificate/public-key pinning (<pin-set>) is a hardening option, not a requirement — flag it as a recommendation for high-sensitivity apps (banking, health) rather than a universal must-have, and note that pins need a rotation plan or they brick the app on cert renewal.
  • Custom TrustManager/HostnameVerifier implementations are a common source of real vulnerabilities — anything that unconditionally trusts all certificates or returns true from verify() is a critical finding, debug-only code or not, if it can ship in a release build.
  • TLS version/cipher restrictions are usually best left to the platform; only flag if something explicitly downgrades them.

4. Secrets, cryptography, authentication, authorization

  • Hardcoded secrets: API keys, private keys, or credentials committed in source, BuildConfig fields, or local.properties checked into version control. Recommend EncryptedSharedPreferences/Android Keystore-backed storage for anything that must live on-device, and server-side secret management for anything that doesn't need to be on-device at all.
  • Cryptography: flag use of ECB mode, static/hardcoded IVs, MD5/SHA-1 for anything security-relevant (password hashing, integrity), and home-rolled crypto. Prefer platform-vetted APIs (Cipher with GCM, Android Keystore for key storage, Jetpack Security/EncryptedFile/EncryptedSharedPreferences for at-rest encryption) over custom implementations.
  • Authentication: check token storage location (Keystore-backed storage, not plain SharedPreferences or a file), token expiry/refresh handling, and whether biometric auth (BiometricPrompt) is backed by a CryptoObject tied to a Keystore key (so a biometric bypass can't just flip a boolean) when it's gating something sensitive.
  • Authorization: server-side checks are what actually matter — client-side-only authorization (e.g. hiding a button) should never be the sole gate for a sensitive action; verify the client treats the server as the source of truth.

5. Data storage, logging, backups, privacy

  • Sensitive data (tokens, PII, health/financial data) stored in plain SharedPreferences, unencrypted SQLite/Room databases, or world-readable files (MODE_WORLD_READABLE/WORLD_WRITEABLE, both long-deprecated but still worth a grep) is a finding.
  • Log.d/i/v/w/e calls that include tokens, passwords, PII, or full request/response bodies are a common leak vector, especially since logs can be pulled via adb logcat on debuggable builds or captured by other logging-permission holders on rooted devices. Recommend stripping/gating verbose logs in release builds (ProGuard/R8 rule or a build-variant-aware logger).
  • Clipboard: copying sensitive data (OTPs, passwords) to the system clipboard can be read by other apps on API < 33; flag it as a risk, note that Android 13+ shows a system toast for clipboard reads, mitigating but not eliminating the concern.
  • Screenshots/recents: for genuinely sensitive screens (payment, auth), check for FLAG_SECURE on the window to prevent the screen from appearing in the recents thumbnail or being screenshotted.
  • Third-party SDKs (analytics, ads, crash reporters) are a privacy surface — check what data they're initialized with and whether it's disclosed in the Play Data Safety form / privacy policy; this skill can check for consistency between code and a stated policy but can't audit a policy's legal sufficiency.

6. Dependency and supply-chain risk

  • Check libs.versions.toml/build.gradle(.kts) for dependencies pinned to very old versions, dependencies pulled from non-mainstream/unverified repositories, and any plugin that executes arbitrary code at build time from an untrusted source.
  • Recommend ./gradlew dependencies (or the version-catalog equivalent) plus a vulnerability scanner (OWASP Dependency-Check, Gradle's built-in dependency verification, or GitHub Dependabot/Snyk) to find known-CVE transitive dependencies — this skill does not have live CVE data, so state that explicitly rather than guessing which versions are vulnerable.
  • Gradle dependency verification (checksum/signature pinning in gradle/verification-metadata.xml) is worth recommending for release pipelines as a supply-chain hardening step.

7. Secure release configuration

  • Confirm R8/ProGuard is enabled for release builds (isMinifyEnabled true) and that the shrinking rules don't blanket-disable obfuscation for packages that don't need public API stability.
  • Signing config: release signing keys and store passwords should never be committed to source control; check they're sourced from environment variables, a secrets manager, or a local, gitignored keystore.properties-style file, consistent with how CI should load them too (see references/gradle-testing-ci.md).
  • debuggable, verbose logging, test-only endpoints, and mock/staging base URLs should all be build-variant-gated so they cannot ship in a release artifact by accident.
  • Reverse-engineering resilience (root/tamper detection, APK signature verification at runtime) is, like certificate pinning (§3), a hardening recommendation for high-sensitivity apps (banking, health, DRM-gated content) rather than a universal must-have — flag its absence as a suggestion for that class of app, not a finding for a typical app. If it's already present, check it isn't a single, trivially-bypassed signal (e.g. one Build.TAGS.contains("test-keys") check) — a credible implementation combines multiple signals and treats detection as one layer, not the only line of defense.

Sources

  • OWASP MASVS v2 and OWASP MASTG — the control/test framework this file is loosely organized around.
  • Android Network Security Configuration — developer.android.com.
  • Android security best practices — developer.android.com.
  • Jetpack Security library and androidx.security:security-crypto docs.
  • Gradle dependency verification — docs.gradle.org.
  • Android permissions best practices and WebViewAssetLoader — developer.android.com (for the §2 just-in-time permission timing and local-asset-loading facts).
  • Practice areas were cross-checked against the scope of liuyi0808/android-review's security-audit skill, FelixGraeber/claude-android-audit-skill's audit pack, and RanaNadeemAslam/android-ai-skills's security.md (see docs/SOURCE_MAPPING.md — structure/coverage referenced, no text copied).
  • The §7 reverse-engineering-resilience addition was cross-checked against liuyi0808/android-review's security-audit/references/resilience.md (its MASVS-RESILIENCE category, which this file previously didn't name explicitly) and against OWASP MASTG's resilience test suite cited above, generalized into an optional-hardening recommendation rather than its original mandatory-checklist framing — structure/idiom referenced, no text copied; see docs/SOURCE_MAPPING.md.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 0fb92b0. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated last month
metadata
{
  "version": "0.2.0"
}
Other metadata
compatibility
Designed for Claude Code or any Agent Skills-compatible client; some body features (shell injection, dynamic variables) are Claude Code-specific.

README badge

README badge for kazimdsaidul/android-engineering-ai-skill