android-code-auditor — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited android-code-auditor (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Audit an Android project for Security, Performance, Architecture, and Dependency issues using deep codebase analysis and live web research. Produce and maintain a severity-ranked code-audit.md file.
Detect which mode the user wants from their message:
code-audit.md (default if file does not exist).If mode is ambiguous, ask the user. Do not guess.
Before any other action, verify this is an Android project. Check for ANY of:
android/ directory at repo rootapp/build.gradle or app/build.gradle.ktsAndroidManifest.xml anywhere in treepubspec.yaml with Flutter declaration AND android/ subdirectoryProjectSettings/ directory with Android build target markersandroid/build.gradlecapacitor.config.* referencing android platformIf NONE match, stop immediately:
Not an Android project.android-code-auditoronly runs on Android apps and games. Detected: [briefly describe what kind of project it appears to be, or "no recognizable project structure"]. Addforceto your message to override.
If the user included "force" in their message, skip this check and proceed.
If code-audit.md already exists at repo root:
"A code-audit.md already exists. Do you want to recreate it from scratch (discards all statuses) or update it (re-runs analysis, preserves your progress)?"If Recreate chosen: delete the file, continue with Step 2. If Update chosen: switch to Mode 3 (Update).
Ask the user:
"Run the audit with parallel agents (4 domains analysed simultaneously - faster, higher token cost) or sequential (one domain at a time - slower, lower token cost)?"
If the user already indicated a preference in their invocation message, skip asking. Default to parallel if unspecified.
Do a fast stack detection pass. If the code-review-graph MCP is available, use get_architecture_overview_tool first for a structural map. Otherwise use Grep/Read/Glob.
Read the following files (whichever exist):
app/build.gradle and/or app/build.gradle.ktsgradle/libs.versions.toml or libs.versions.tomlpubspec.yamlpackage.jsonapp/src/main/AndroidManifest.xml or AndroidManifest.xmlsettings.gradle or settings.gradle.ktsExtract and record:
applicationId or app name)minSdk, targetSdk, compileSdkPass this stack summary to every domain agent.
Spawn 4 agents - one per domain: Security, Performance, Architecture, Dependencies.
Parallel: spawn all 4 in a single message (all Agent tool calls in one response). Sequential: spawn Security, wait for result, then Performance, wait, then Architecture, wait, then Dependencies.
Each agent receives this prompt (fill in {{placeholders}}):
You are performing a {{domain}} audit of an Android project. Every finding must be grounded in code you actually read from the repo or a URL you actually fetched this session. No assumptions. No training-data citations.
## Project context
Working directory: {{cwd}}
Project name: {{project_name}}
Stack: {{stack_summary}}
minSdk: {{minSdk}} | targetSdk: {{targetSdk}} | compileSdk: {{compileSdk}}
## Code-review-graph MCP
If the code-review-graph MCP server is available in your tools, use these tools:
- get_architecture_overview_tool - structural map of whole project
- semantic_search_nodes_tool - semantic search across all symbols
- query_graph_tool - query relationships between components
Fall back to Grep, Read, and Glob if the MCP is not available.
## Your domain: {{domain}}
{{domain_specific_instructions}}
## Output format
For each issue, return exactly:
ISSUE:
- Domain: {{domain}}
- Severity: critical | high | medium | low
- Title: <max 60 chars>
- Where: <exact file path and line number>
- What: <one sentence describing the problem>
- Why: <concrete impact if not fixed>
- How to fix: <concrete steps with corrected code snippet where applicable>
- Reference: <URL actually fetched this session>
If zero issues found in your domain:
NO_ISSUES: {{domain}}#### Security agent - domain_specific_instructions value:
Phase 1 - Codebase scan:
1. Hardcoded secrets: grep source files (exclude test/) for: apiKey, api_key, password, passwd, secret, token, private_key, client_secret, AUTH_, KEY_, PASSWORD. Read each match to confirm it is a real secret value, not just a variable name.
2. Exported components: read AndroidManifest.xml. For every component with android:exported="true", check whether android:permission is set. Flag unprotected exported Activities, Services, BroadcastReceivers, ContentProviders.
3. Insecure network config: check res/xml/network_security_config.xml for cleartextTrafficPermitted="true". Grep source for plain http:// base URL strings. Check manifest for android:usesCleartextTraffic="true".
4. WebView misuse: grep for setJavaScriptEnabled, addJavascriptInterface, setAllowFileAccess, setAllowUniversalAccessFromFileURLs. Read each call site to check if guarded.
5. Deeplink security: find intent filters with android:scheme in manifest. Check android:autoVerify="true" for App Links. Grep for deeplink parameter handling - flag params used directly in SQL, file paths, or network calls without validation.
6. Permissions: list all <uses-permission> entries. Flag RECORD_AUDIO, READ_CONTACTS, READ_CALL_LOG, ACCESS_FINE_LOCATION, READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE, CAMERA where no corresponding use is found in source.
7. Key storage: grep for SharedPreferences storing values that look like tokens or credentials. Check whether EncryptedSharedPreferences or Android Keystore is used for sensitive data.
8. Biometric: grep for BiometricManager, BiometricPrompt. Flag setAllowedAuthenticators(BIOMETRIC_WEAK) where strong auth is required.
9. Weak crypto: grep for MD5, SHA1, DES, RC4, "ECB" mode usage.
Phase 2 - Web research:
- Fetch https://developer.android.com/privacy-and-security/security-tips
- Search for CVEs for any security-relevant libraries at their declared versions
- Fetch current OWASP Mobile Top 10 and note which items apply#### Performance agent - domain_specific_instructions value:
Phase 1 - Codebase scan:
1. Main thread I/O: grep for File(, openFileOutput, openFileInput, getSharedPreferences, SharedPreferences.Editor usage - check each is wrapped in withContext(Dispatchers.IO) or a background thread.
2. Main thread network: grep for Retrofit/OkHttp/Ktor call sites not inside suspend functions or withContext(Dispatchers.IO).
3. Memory leaks:
- Grep for companion object or top-level val/var holding Context, Activity, Fragment, View, or ViewBinding references.
- Grep for anonymous listener registrations stored as fields but not cleared in onDestroy/onDestroyView.
- Grep for Fragment ViewBinding - verify binding is nulled in onDestroyView.
4. Compose recomposition (only if Compose in stack):
- Grep for lambda expressions passed as Composable params not wrapped in remember.
- Grep for data class types used as Composable params - check @Stable or @Immutable annotation.
- Grep for .filter, .map, .sorted, .groupBy inside @Composable bodies not wrapped in remember or derivedStateOf.
- Grep for expensive computations inside @Composable bodies not memoised.
5. Application.onCreate: read Application class(es). Flag synchronous disk reads, network calls, or heavy init chains.
6. GlobalScope: grep for GlobalScope.launch, GlobalScope.async.
7. runBlocking: grep for runBlocking outside test directories.
8. Large assets: list files in res/drawable*, res/raw, assets/. Flag PNG files over 100KB.
Phase 2 - Web research:
- Fetch https://developer.android.com/topic/performance/vitals
- If Compose in stack: fetch https://developer.android.com/develop/ui/compose/performance
- Search for current Baseline Profiles guidance
- Check App Startup library guidance if heavy Application.onCreate found#### Architecture agent - domain_specific_instructions value:
Phase 1 - Codebase scan:
1. ViewModel-View coupling: grep ViewModel files for Activity, Fragment, View, Context type references. Read matches to confirm if ViewModel holds a View reference.
2. Missing repository layer: grep Activity and Fragment files for direct DAO, Retrofit service, or database calls. These should go through a Repository.
3. God classes: list all Kotlin/Java source files over 400 lines. Read each and describe what responsibilities it handles. Flag if multiple unrelated concerns are present.
4. Coroutine scopes: grep for CoroutineScope( - check each is tied to a lifecycle or has SupervisorJob + cancellation. Grep for viewModelScope usage to confirm ViewModels use it. Flag manual Job() without SupervisorJob in custom scopes.
5. SavedStateHandle: grep ViewModel files for state that must survive process death (user input, selected IDs, scroll position) but does not use SavedStateHandle.
6. DI consistency: determine DI approach (Hilt / Koin / manual). Flag classes constructing their own dependencies with = SomeClass() instead of receiving them via injection.
7. NavController vs manual back stack: if NavGraph is declared, grep for supportFragmentManager.beginTransaction and supportFragmentManager.popBackStack as inconsistency signals.
8. State in Composables: grep for remember { mutableStateOf } inside Composables holding business state (loaded data, selected item, form values) that should be in ViewModel.
Phase 2 - Web research:
- Fetch https://developer.android.com/topic/architecture
- If Compose in stack: fetch https://developer.android.com/develop/ui/compose/architecture
- Search current community guidance on Hilt vs Koin for Android 2025/2026
- Fetch https://developer.android.com/modern-android-development for MAD scorecard criteria#### Dependencies agent - domain_specific_instructions value:
Phase 1 - Codebase scan:
Read all dependency declarations from:
- app/build.gradle and/or app/build.gradle.kts
- Root build.gradle / build.gradle.kts
- gradle/libs.versions.toml or libs.versions.toml (if present)
- Any module-level build.gradle* files
Record every implementation, api, kapt, ksp, annotationProcessor, testImplementation, androidTestImplementation coordinate with its full group:artifact:version.
Note any force version resolution, resolutionStrategy, or exclude directives.
Phase 2 - Web research (fetch live, not from training data):
1. Android Gradle Plugin: fetch https://developer.android.com/build/releases/gradle-plugin - current stable version.
2. Kotlin: fetch https://kotlinlang.org/docs/releases.html - current stable version.
3. Compose BOM: fetch https://developer.android.com/develop/ui/compose/bom/bom-mapping - current stable BOM.
4. AndroidX: for each detected androidx.* group, check https://developer.android.com/jetpack/androidx/versions.
5. Firebase BoM: fetch https://firebase.google.com/support/release-notes/android - current BoM version.
6. Play Billing: fetch https://developer.android.com/google/play/billing/release-notes - current minimum required version.
7. CVEs: for each third-party library (non-Google, non-AndroidX), search osv.dev for known vulnerabilities at the declared version. Query format: "site:osv.dev <group-id>".
8. Deprecated Gradle configurations: flag any compile, provided, or apk configuration usage.
Flag every dependency that is:
- More than 2 minor versions behind current stable
- Has a known CVE at the declared version
- Uses a deprecated Gradle configuration
- Incompatible with the declared AGP/Kotlin/Gradle versionAfter all agents complete:
Write to repo root:
# Code Audit
**Created:** YYYY-MM-DD HH:MM (timezone)
**Last updated:** YYYY-MM-DD HH:MM (timezone)
**Project:** <project name>
**Stack:** <e.g. Native Kotlin + Hilt + Compose + Firebase>
## Summary
| Severity | Total | PENDING | DONE | SKIPPED | CANCELLED |
|---|---|---|---|---|---|
| CRITICAL | N | N | N | N | N |
| HIGH | N | N | N | N | N |
| MEDIUM | N | N | N | N | N |
| LOW | N | N | N | N | N |
**Top blockers (CRITICAL, PENDING):**
- [ ] C1. <title>
- [ ] C2. <title>
## CRITICAL
### [PENDING] C1. <Short title>
**Domain:** Security
**What:** <one-sentence description>
**Why critical:** <concrete impact>
**Where:** `path/to/File.kt:42`
**How to fix:** <concrete steps with corrected code snippet>
**Reference:** <URL fetched this session>
## HIGH
### [PENDING] H1. ...
## MEDIUM
### [PENDING] M1. ...
## LOW
### [PENDING] L1. ...
---
_CRITICAL: exploitable vulnerability or data loss risk. HIGH: serious quality or security issue. MEDIUM: best-practice violation. LOW: minor improvement._
## Change log
- YYYY-MM-DD HH:MM - CreatedAfter writing the file, output to user:
code-audit.md.code-audit.md. Record every item ID and current status.code-audit.md.Last updated. Append changelog entry: "Re-analysed - N new issues, N resolved, N statuses preserved."Present one PENDING item at a time: CRITICAL, HIGH, MEDIUM, LOW order. Within each tier, numeric order.
For each PENDING item:
code-audit.md immediately. Update the status bracket in the issue heading. Recompute all status-column counts in the Summary table for the affected severity row. Append changelog entry.Skip items already DONE/SKIPPED/CANCELLED.
When all items are handled or user pauses: report progress (X done, Y skipped, Z cancelled, W pending).
User says "explain C2", "show me H4", "what's wrong with M1":
code-audit.md.Where field.Do not run new analysis or web research. Read the audit file and referenced source file only.
User says "mark C1 done", "skip H2 and H3", "cancel M4":
code-audit.md.Read code-audit.md. Output:
No analysis. No web research. No file writes.
app/src/main/java/com/example/WebActivity.kt:87 - setJavaScriptEnabled(true) with no origin restriction" is acceptable.code-audit.md before both codebase scan and web research are complete.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.