mobile-ai-agents 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +228 -0
- package/CLAUDE.md +236 -0
- package/LICENSE +21 -0
- package/README.md +652 -0
- package/agents/android/android-crash-analyzer/README.md +134 -0
- package/agents/android/android-crash-analyzer/agent.md +206 -0
- package/agents/android/android-crash-analyzer/example-input.md +138 -0
- package/agents/android/android-crash-analyzer/example-output.md +225 -0
- package/agents/android/anr-investigation/README.md +78 -0
- package/agents/android/anr-investigation/agent.md +117 -0
- package/agents/android/anr-investigation/example-input.md +62 -0
- package/agents/android/anr-investigation/example-output.md +103 -0
- package/agents/android/axiom/agent.md +197 -0
- package/agents/android/code-reviewer/README.md +108 -0
- package/agents/android/code-reviewer/agent.md +210 -0
- package/agents/android/code-reviewer/example-input.md +116 -0
- package/agents/android/code-reviewer/example-output.md +115 -0
- package/agents/android/compose-navigation/README.md +76 -0
- package/agents/android/compose-navigation/agent.md +121 -0
- package/agents/android/compose-navigation/example-input.md +49 -0
- package/agents/android/compose-navigation/example-output.md +325 -0
- package/agents/android/compose-screen-builder/README.md +95 -0
- package/agents/android/compose-screen-builder/agent.md +170 -0
- package/agents/android/compose-screen-builder/example-input.md +40 -0
- package/agents/android/compose-screen-builder/example-output.md +568 -0
- package/agents/android/compose-ui-reviewer/README.md +73 -0
- package/agents/android/compose-ui-reviewer/agent.md +253 -0
- package/agents/android/compose-ui-reviewer/example-input.md +84 -0
- package/agents/android/compose-ui-reviewer/example-output.md +102 -0
- package/agents/android/crash-analyzer/README.md +53 -0
- package/agents/android/crash-analyzer/agent.md +295 -0
- package/agents/android/memory-leak-analyzer/README.md +79 -0
- package/agents/android/memory-leak-analyzer/agent.md +116 -0
- package/agents/android/memory-leak-analyzer/example-input.md +78 -0
- package/agents/android/memory-leak-analyzer/example-output.md +128 -0
- package/agents/cross-platform/accessibility-auditor/README.md +47 -0
- package/agents/cross-platform/accessibility-auditor/agent.md +268 -0
- package/agents/cross-platform/accessibility-auditor/example-input.md +84 -0
- package/agents/cross-platform/accessibility-auditor/example-output.md +132 -0
- package/agents/cross-platform/appforge/agent.md +303 -0
- package/agents/cross-platform/ci-cd-generator/README.md +65 -0
- package/agents/cross-platform/ci-cd-generator/agent.md +422 -0
- package/agents/cross-platform/ci-cd-generator/example-input.md +69 -0
- package/agents/cross-platform/ci-cd-generator/example-output.md +261 -0
- package/agents/cross-platform/crasher/agent.md +221 -0
- package/agents/cross-platform/figma/agent.md +247 -0
- package/agents/cross-platform/launchpad/agent.md +330 -0
- package/agents/cross-platform/mobile-harness/agent.md +422 -0
- package/agents/cross-platform/mobile-memory/agent.md +429 -0
- package/agents/cross-platform/perf/agent.md +261 -0
- package/agents/cross-platform/pipeline/agent.md +288 -0
- package/agents/cross-platform/release-notes-generator/README.md +63 -0
- package/agents/cross-platform/release-notes-generator/agent.md +218 -0
- package/agents/cross-platform/release-notes-generator/example-input.md +71 -0
- package/agents/cross-platform/release-notes-generator/example-output.md +96 -0
- package/agents/cross-platform/scribe/agent.md +180 -0
- package/agents/cross-platform/security-scanner/README.md +61 -0
- package/agents/cross-platform/security-scanner/agent.md +287 -0
- package/agents/cross-platform/security-scanner/example-input.md +77 -0
- package/agents/cross-platform/security-scanner/example-output.md +141 -0
- package/agents/cross-platform/sentinel/agent.md +217 -0
- package/agents/cross-platform/store-listing-writer/README.md +58 -0
- package/agents/cross-platform/store-listing-writer/agent.md +380 -0
- package/agents/cross-platform/store-listing-writer/example-input.md +67 -0
- package/agents/cross-platform/store-listing-writer/example-output.md +131 -0
- package/agents/flutter/bloc-feature-builder/README.md +101 -0
- package/agents/flutter/bloc-feature-builder/agent.md +225 -0
- package/agents/flutter/bloc-feature-builder/example-input.md +47 -0
- package/agents/flutter/bloc-feature-builder/example-output.md +838 -0
- package/agents/flutter/dart/agent.md +223 -0
- package/agents/flutter/widget-generator/README.md +66 -0
- package/agents/flutter/widget-generator/agent.md +264 -0
- package/agents/flutter/widget-generator/example-input.md +71 -0
- package/agents/flutter/widget-generator/example-output.md +163 -0
- package/agents/gaming/forge/agent.md +197 -0
- package/agents/gaming/unreal/agent.md +200 -0
- package/agents/ios/crash-analyzer/README.md +69 -0
- package/agents/ios/crash-analyzer/agent.md +300 -0
- package/agents/ios/crash-analyzer/example-input.md +83 -0
- package/agents/ios/crash-analyzer/example-output.md +126 -0
- package/agents/ios/swift/agent.md +206 -0
- package/agents/ios/swift-reviewer/README.md +68 -0
- package/agents/ios/swift-reviewer/agent.md +231 -0
- package/agents/ios/swift-reviewer/example-input.md +100 -0
- package/agents/ios/swift-reviewer/example-output.md +127 -0
- package/agents/react-native/bridge/agent.md +212 -0
- package/agents/react-native/performance-optimizer/README.md +81 -0
- package/agents/react-native/performance-optimizer/agent.md +284 -0
- package/agents/react-native/performance-optimizer/example-input.md +104 -0
- package/agents/react-native/performance-optimizer/example-output.md +132 -0
- package/agents/unity/shader-generator/README.md +77 -0
- package/agents/unity/shader-generator/agent.md +270 -0
- package/agents/unity/shader-generator/example-input.md +70 -0
- package/agents/unity/shader-generator/example-output.md +160 -0
- package/agents/unreal/blueprint-advisor/README.md +71 -0
- package/agents/unreal/blueprint-advisor/agent.md +311 -0
- package/agents/unreal/blueprint-advisor/example-input.md +73 -0
- package/agents/unreal/blueprint-advisor/example-output.md +217 -0
- package/cli/index.js +1091 -0
- package/docs/agent-guide.md +138 -0
- package/docs/chatgpt-integration.md +219 -0
- package/docs/core-loops.md +143 -0
- package/docs/cursor-integration.md +143 -0
- package/docs/getting-started.md +132 -0
- package/docs/index.html +711 -0
- package/docs/installation.md +271 -0
- package/docs/mobile-harness.md +160 -0
- package/docs/mobile-mcp.md +172 -0
- package/docs/mobile-memory.md +349 -0
- package/docs/release-process.md +85 -0
- package/docs/releases/release-v1.0.0.md +165 -0
- package/docs/roadmap/github-issues.md +239 -0
- package/docs/skill-categories.md +125 -0
- package/docs/vscode-copilot-integration.md +104 -0
- package/docs/wiki.md +615 -0
- package/install.sh +507 -0
- package/mobile-karpathy.md +79 -0
- package/package.json +57 -0
- package/skills/android/README.md +31 -0
- package/skills/android/android-tdd.md +89 -0
- package/skills/android/anr-investigation.md +251 -0
- package/skills/android/code-review.md +98 -0
- package/skills/android/compose-migration.md +48 -0
- package/skills/android/compose-review.md +78 -0
- package/skills/android/kotlin-modernize.md +51 -0
- package/skills/android/memory-leak-investigation.md +256 -0
- package/skills/android/proguard-rules.md +48 -0
- package/skills/cross-platform/accessibility-audit.md +63 -0
- package/skills/cross-platform/api-versioning.md +59 -0
- package/skills/cross-platform/clean-code-audit.md +239 -0
- package/skills/cross-platform/crash-triage.md +53 -0
- package/skills/cross-platform/deeplink-debug.md +57 -0
- package/skills/cross-platform/feature-slice.md +48 -0
- package/skills/cross-platform/grill-mobile.md +64 -0
- package/skills/cross-platform/mobile-mcp-qa.md +193 -0
- package/skills/cross-platform/mobile-memory-graph.md +179 -0
- package/skills/cross-platform/mobile-memory-save.md +210 -0
- package/skills/cross-platform/mobile-memory-search.md +154 -0
- package/skills/cross-platform/perf-audit.md +61 -0
- package/skills/cross-platform/prd-verification.md +324 -0
- package/skills/cross-platform/release-prep.md +64 -0
- package/skills/cross-platform/security-audit.md +281 -0
- package/skills/cross-platform/store-listing.md +75 -0
- package/skills/flutter/README.md +32 -0
- package/skills/flutter/dart-modernize.md +47 -0
- package/skills/flutter/flutter-review.md +59 -0
- package/skills/flutter/flutter-tdd.md +73 -0
- package/skills/flutter/widget-extract.md +41 -0
- package/skills/flutter/widget-gen.md +131 -0
- package/skills/gaming/blueprint-to-cpp.md +51 -0
- package/skills/gaming/game-perf.md +54 -0
- package/skills/gaming/shader-gen.md +44 -0
- package/skills/gaming/unity-tdd.md +85 -0
- package/skills/ios/README.md +45 -0
- package/skills/ios/data-persistence.md +151 -0
- package/skills/ios/ios-tdd.md +90 -0
- package/skills/ios/networking.md +139 -0
- package/skills/ios/performance.md +122 -0
- package/skills/ios/swift-concurrency.md +57 -0
- package/skills/ios/swift-review.md +124 -0
- package/skills/ios/swiftui-review.md +49 -0
- package/skills/ios/swiftui-state.md +122 -0
- package/skills/ios/unit-testing.md +144 -0
- package/skills/ios/xcode-warnings.md +37 -0
- package/skills/react-native/README.md +42 -0
- package/skills/react-native/bridge-audit.md +104 -0
- package/skills/react-native/expo-optimize.md +55 -0
- package/skills/react-native/new-arch-migrate.md +53 -0
- package/skills/react-native/performance.md +124 -0
- package/skills/react-native/rn-review.md +53 -0
- package/skills/react-native/rn-tdd.md +76 -0
- package/skills/shared/README.md +46 -0
- package/skills/shared/accessibility-audit.md +132 -0
- package/skills/shared/crash-analysis.md +110 -0
- package/skills/shared/security-scan.md +149 -0
- package/skills/unity/README.md +31 -0
- package/skills/unity/shader-review.md +110 -0
- package/templates/agent-template.md +88 -0
- package/templates/prompt-template.md +50 -0
- package/templates/skill-template.md +64 -0
- package/templates/workflow-template.md +48 -0
- package/workflows/app-launch.md +66 -0
- package/workflows/appforge-workflow.md +232 -0
- package/workflows/ci-setup.md +77 -0
- package/workflows/crash-to-fix.md +71 -0
- package/workflows/feature-ship.md +61 -0
- package/workflows/game-level.md +72 -0
- package/workflows/mobile-harness.md +319 -0
- package/workflows/mobile-mcp-qa.md +228 -0
- package/workflows/mobile-memory-workflow.md +243 -0
- package/workflows/new-project-setup.md +93 -0
- package/workflows/new-screen.md +68 -0
- package/workflows/perf-sprint.md +78 -0
- package/workflows/release-cycle.md +71 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Example Input — Mobile Security Scanner
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
PLATFORM: Android
|
|
7
|
+
FILE_PATH: data/remote/ApiClient.kt
|
|
8
|
+
SECURITY_FOCUS: all
|
|
9
|
+
CODE:
|
|
10
|
+
object ApiClient {
|
|
11
|
+
private const val API_KEY = "sk-live-a1b2c3d4e5f6g7h8i9j0"
|
|
12
|
+
private const val BASE_URL = "http://api.example.com/"
|
|
13
|
+
|
|
14
|
+
fun create(): Retrofit {
|
|
15
|
+
val client = OkHttpClient.Builder()
|
|
16
|
+
.addInterceptor { chain ->
|
|
17
|
+
val request = chain.request().newBuilder()
|
|
18
|
+
.addHeader("X-API-Key", API_KEY)
|
|
19
|
+
.build()
|
|
20
|
+
chain.proceed(request)
|
|
21
|
+
}
|
|
22
|
+
.build()
|
|
23
|
+
|
|
24
|
+
return Retrofit.Builder()
|
|
25
|
+
.baseUrl(BASE_URL)
|
|
26
|
+
.client(client)
|
|
27
|
+
.build()
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## What to Expect
|
|
35
|
+
|
|
36
|
+
The agent identifies three security issues. See [`example-output.md`](example-output.md).
|
|
37
|
+
|
|
38
|
+
**Issue map:**
|
|
39
|
+
1. Hardcoded live API key in source — CRITICAL (M9 Reverse Engineering)
|
|
40
|
+
2. HTTP base URL — CRITICAL (M3 Insecure Communication)
|
|
41
|
+
3. API key transmitted in every request header — MEDIUM (M9)
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Variations
|
|
46
|
+
|
|
47
|
+
### SharedPreferences token storage
|
|
48
|
+
```
|
|
49
|
+
PLATFORM: Android
|
|
50
|
+
FILE_PATH: data/local/SessionManager.kt
|
|
51
|
+
SECURITY_FOCUS: storage
|
|
52
|
+
CODE:
|
|
53
|
+
object SessionManager {
|
|
54
|
+
private val prefs = App.context.getSharedPreferences("session", Context.MODE_PRIVATE)
|
|
55
|
+
fun saveToken(token: String) = prefs.edit().putString("auth_token", token).apply()
|
|
56
|
+
fun getToken(): String? = prefs.getString("auth_token", null)
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### WebView with JavaScript bridge
|
|
61
|
+
```
|
|
62
|
+
PLATFORM: Android
|
|
63
|
+
FILE_PATH: ui/web/WebViewActivity.kt
|
|
64
|
+
SECURITY_FOCUS: webview
|
|
65
|
+
CODE:
|
|
66
|
+
class WebViewActivity : AppCompatActivity() {
|
|
67
|
+
override fun onCreate(savedInstanceState: Bundle?) {
|
|
68
|
+
super.onCreate(savedInstanceState)
|
|
69
|
+
val webView = WebView(this)
|
|
70
|
+
webView.settings.javaScriptEnabled = true
|
|
71
|
+
webView.addJavascriptInterface(NativeBridge(this), "AndroidBridge")
|
|
72
|
+
val url = intent.getStringExtra("url") ?: "https://app.example.com"
|
|
73
|
+
webView.loadUrl(url)
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
Issues: `url` from Intent is unvalidated — an attacker can pass any URL; combined with `addJavascriptInterface`, this is Remote Code Execution if the WebView loads attacker-controlled content.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Example Output — Mobile Security Scanner
|
|
2
|
+
|
|
3
|
+
Full agent response to the input in [`example-input.md`](example-input.md).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
SECURITY SCAN REPORT
|
|
9
|
+
====================
|
|
10
|
+
File: data/remote/ApiClient.kt
|
|
11
|
+
Platform: Android
|
|
12
|
+
Focus: all
|
|
13
|
+
Vulnerabilities Found: 3
|
|
14
|
+
Critical: 2 High: 0 Medium: 1 Low: 0
|
|
15
|
+
|
|
16
|
+
FINDINGS (ranked by severity)
|
|
17
|
+
------------------------------
|
|
18
|
+
|
|
19
|
+
[CRITICAL] M9 Reverse Engineering — Hardcoded live API key in source code
|
|
20
|
+
Location : Line 2 — API_KEY constant
|
|
21
|
+
Exploitable : Any developer with repository access OR anyone who decompiles the APK
|
|
22
|
+
using `apktool d app.apk && grep -r "sk-live-"` can extract this key in
|
|
23
|
+
under 60 seconds. The "sk-live-" prefix indicates a production credential.
|
|
24
|
+
An attacker can make authenticated API calls, access user data, exhaust
|
|
25
|
+
rate limits, or incur charges — all at the app owner's expense.
|
|
26
|
+
Fix :
|
|
27
|
+
```kotlin
|
|
28
|
+
// Option 1 (recommended): Fetch a short-lived token from YOUR backend at runtime.
|
|
29
|
+
// Your backend holds the real API key; the app receives a scoped, expiring token.
|
|
30
|
+
// The client binary never contains the real key.
|
|
31
|
+
|
|
32
|
+
// Option 2: If the key MUST be in the binary (e.g., public read-only API),
|
|
33
|
+
// store it in local.properties (git-ignored) and access via BuildConfig:
|
|
34
|
+
|
|
35
|
+
// local.properties (add to .gitignore):
|
|
36
|
+
// API_KEY=sk-live-a1b2c3d4...
|
|
37
|
+
|
|
38
|
+
// build.gradle.kts:
|
|
39
|
+
// val apiKey = properties.getProperty("API_KEY") ?: error("API_KEY not set")
|
|
40
|
+
// buildConfigField("String", "API_KEY", "\"$apiKey\"")
|
|
41
|
+
|
|
42
|
+
// ApiClient.kt:
|
|
43
|
+
// private val API_KEY = BuildConfig.API_KEY
|
|
44
|
+
// ⚠ Note: BuildConfig fields are extractable from APKs — treat as obfuscation,
|
|
45
|
+
// NOT true security. Only use for non-sensitive or public keys.
|
|
46
|
+
```
|
|
47
|
+
Action required: IMMEDIATELY rotate the sk-live-* key — it is compromised by being
|
|
48
|
+
in version control history. Run: git log --all --grep="sk-live-" to find all commits.
|
|
49
|
+
|
|
50
|
+
[CRITICAL] M3 Insecure Communication — HTTP base URL (cleartext traffic)
|
|
51
|
+
Location : Line 3 — BASE_URL = "http://..."
|
|
52
|
+
Exploitable : All API traffic is sent over HTTP in cleartext. An attacker on the same
|
|
53
|
+
network (public WiFi, corporate proxy, cellular interception, hotel network)
|
|
54
|
+
can read ALL requests and responses — including:
|
|
55
|
+
- The API key from the X-API-Key header
|
|
56
|
+
- User data returned by the API
|
|
57
|
+
- Any credentials, tokens, or PII in request bodies
|
|
58
|
+
This is a trivial attack with freely available tools (Wireshark, mitmproxy).
|
|
59
|
+
Fix :
|
|
60
|
+
```kotlin
|
|
61
|
+
// Change to HTTPS — non-negotiable for any production API
|
|
62
|
+
private const val BASE_URL = "https://api.example.com/"
|
|
63
|
+
|
|
64
|
+
// Additionally, add certificate pinning to prevent MitM even on HTTPS:
|
|
65
|
+
val client = OkHttpClient.Builder()
|
|
66
|
+
.certificatePinner(
|
|
67
|
+
CertificatePinner.Builder()
|
|
68
|
+
.add("api.example.com", "sha256/YOUR_CERTIFICATE_SHA256_HERE")
|
|
69
|
+
.build()
|
|
70
|
+
)
|
|
71
|
+
.addInterceptor { chain ->
|
|
72
|
+
chain.proceed(
|
|
73
|
+
chain.request().newBuilder()
|
|
74
|
+
.addHeader("X-API-Key", BuildConfig.API_KEY)
|
|
75
|
+
.build()
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
.build()
|
|
79
|
+
|
|
80
|
+
// Get your certificate pin:
|
|
81
|
+
// openssl s_client -connect api.example.com:443 | openssl x509 -pubkey -noout |
|
|
82
|
+
// openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | base64
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
[MEDIUM] M9 Reverse Engineering — API key transmitted in every request header
|
|
86
|
+
Location : Line 9 — addHeader("X-API-Key", API_KEY)
|
|
87
|
+
Exploitable : Even after moving the key out of source code, sending it in a header
|
|
88
|
+
on every request means it appears in:
|
|
89
|
+
- HTTP access logs (on both client and server)
|
|
90
|
+
- Proxy captures (Burp Suite, Charles Proxy)
|
|
91
|
+
- Crash reports that include request headers (Sentry, Firebase)
|
|
92
|
+
- Android Profiler network inspector in debug builds
|
|
93
|
+
Fix :
|
|
94
|
+
```kotlin
|
|
95
|
+
// Replace static key with HMAC request signing.
|
|
96
|
+
// The key never leaves the device; only the HMAC digest is transmitted.
|
|
97
|
+
// The server verifies the digest against the same key it holds.
|
|
98
|
+
|
|
99
|
+
private fun signRequest(request: Request, secretKey: ByteArray): Request {
|
|
100
|
+
val timestamp = System.currentTimeMillis().toString()
|
|
101
|
+
val body = request.body?.let {
|
|
102
|
+
val buffer = okio.Buffer()
|
|
103
|
+
it.writeTo(buffer)
|
|
104
|
+
buffer.readUtf8()
|
|
105
|
+
} ?: ""
|
|
106
|
+
val message = "${request.method}${request.url}$timestamp$body"
|
|
107
|
+
val mac = Mac.getInstance("HmacSHA256").apply {
|
|
108
|
+
init(SecretKeySpec(secretKey, "HmacSHA256"))
|
|
109
|
+
}
|
|
110
|
+
val signature = Base64.encodeToString(mac.doFinal(message.toByteArray()), Base64.NO_WRAP)
|
|
111
|
+
return request.newBuilder()
|
|
112
|
+
.addHeader("X-Timestamp", timestamp)
|
|
113
|
+
.addHeader("X-Signature", signature)
|
|
114
|
+
.build()
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
OWASP COVERAGE SUMMARY
|
|
119
|
+
-----------------------
|
|
120
|
+
| OWASP Category | Status |
|
|
121
|
+
|---|---|
|
|
122
|
+
| M1 Improper Platform Usage | Not applicable (no WebView, deep links, or permissions in this file) |
|
|
123
|
+
| M2 Insecure Data Storage | Not applicable (no storage code in this file) |
|
|
124
|
+
| M3 Insecure Communication | ✓ Checked — CRITICAL found (HTTP URL) |
|
|
125
|
+
| M4 Insecure Authentication | ✓ Checked — impacted by hardcoded key |
|
|
126
|
+
| M5 Insufficient Cryptography | Not applicable (no crypto in this file) |
|
|
127
|
+
| M6 Insecure Authorization | Not applicable |
|
|
128
|
+
| M7 Client Code Quality | Not applicable |
|
|
129
|
+
| M8 Code Tampering | Not applicable |
|
|
130
|
+
| M9 Reverse Engineering | ✓ Checked — CRITICAL found (hardcoded key) |
|
|
131
|
+
| M10 Extraneous Functionality | Not applicable |
|
|
132
|
+
|
|
133
|
+
RECOMMENDED NEXT STEPS
|
|
134
|
+
-----------------------
|
|
135
|
+
1. IMMEDIATELY rotate the sk-live-* API key — assume it is already compromised
|
|
136
|
+
2. Switch BASE_URL to HTTPS and add OkHttp CertificatePinner for api.example.com
|
|
137
|
+
3. Add truffleHog or gitleaks to your CI pipeline to prevent future secret commits:
|
|
138
|
+
git config --global core.hooksPath ~/.git-hooks
|
|
139
|
+
# or use GitHub's Secret Scanning (automatically enabled on public repos)
|
|
140
|
+
4. Scan git history for other secrets: gitleaks detect --source . --report-format json
|
|
141
|
+
```
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# SENTINEL — Security Auditor
|
|
2
|
+
|
|
3
|
+
**Platform:** Cross-Platform (Android / iOS / Flutter / React Native)
|
|
4
|
+
**Personality:** Paranoid by design. Assumes every input is malicious until proven otherwise.
|
|
5
|
+
**Category:** Security
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Reviews mobile source code for OWASP Mobile Top 10 vulnerabilities. Produces a severity-ranked findings report with OWASP category, exploitation scenario, and a concrete code fix for each issue.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Input Format
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
PLATFORM: <Android | iOS | Flutter | React Native>
|
|
19
|
+
FILE_PATH: <relative path>
|
|
20
|
+
SECURITY_FOCUS: <all | secrets | storage | network | deeplinks | webview | permissions | crypto>
|
|
21
|
+
CODE:
|
|
22
|
+
<paste the source file(s) to scan>
|
|
23
|
+
MANIFEST: <optional: AndroidManifest.xml or Info.plist content>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Output Format
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
SENTINEL REPORT
|
|
32
|
+
===============
|
|
33
|
+
File: <path>
|
|
34
|
+
Platform: <platform>
|
|
35
|
+
Focus: <focus area>
|
|
36
|
+
Vulnerabilities Found: <count>
|
|
37
|
+
Critical: <n> High: <n> Medium: <n> Low: <n>
|
|
38
|
+
|
|
39
|
+
FINDINGS (ranked by severity)
|
|
40
|
+
------------------------------
|
|
41
|
+
[CRITICAL] <OWASP M#> — <title>
|
|
42
|
+
Location : <line or function>
|
|
43
|
+
Attack Path : <concrete exploitation scenario — not "could be exploited" but how>
|
|
44
|
+
Fix :
|
|
45
|
+
```<language>
|
|
46
|
+
<corrected code>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
[HIGH] ...
|
|
50
|
+
[MEDIUM] ...
|
|
51
|
+
[LOW] ...
|
|
52
|
+
|
|
53
|
+
OWASP COVERAGE
|
|
54
|
+
--------------
|
|
55
|
+
M1 Improper Platform Usage : <Checked / Not applicable>
|
|
56
|
+
M2 Insecure Data Storage : <Checked / Not applicable>
|
|
57
|
+
M3 Insecure Communication : <Checked / Not applicable>
|
|
58
|
+
M4 Insecure Authentication : <Checked / Not applicable>
|
|
59
|
+
M5 Insufficient Cryptography : <Checked / Not applicable>
|
|
60
|
+
M6 Insecure Authorization : <Checked / Not applicable>
|
|
61
|
+
M7 Client Code Quality : <Checked / Not applicable>
|
|
62
|
+
M8 Code Tampering : <Checked / Not applicable>
|
|
63
|
+
M9 Reverse Engineering : <Checked / Not applicable>
|
|
64
|
+
M10 Extraneous Functionality : <Checked / Not applicable>
|
|
65
|
+
|
|
66
|
+
NEXT STEPS
|
|
67
|
+
----------
|
|
68
|
+
1. <Highest priority fix>
|
|
69
|
+
2. <Second priority>
|
|
70
|
+
3. <Tooling for ongoing scanning>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## System Prompt
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
You are SENTINEL — a mobile security engineer who assumes every input is malicious and every
|
|
79
|
+
secret is already compromised. You have found API keys in production APKs, seen cleartext
|
|
80
|
+
credentials in SharedPreferences, and debugged WebView XSS attacks on real banking apps.
|
|
81
|
+
You do not report theoretical vulnerabilities — you write concrete exploitation paths.
|
|
82
|
+
|
|
83
|
+
Review the provided mobile source for OWASP Mobile Top 10:
|
|
84
|
+
|
|
85
|
+
SECRETS (M9): string literals matching api_key, token, secret, password, private_key,
|
|
86
|
+
bearer, AWS/GCP/Azure patterns, Base64-encoded key-like values.
|
|
87
|
+
Fix: server-side key fetch, BuildConfig from git-ignored local.properties, secrets manager.
|
|
88
|
+
|
|
89
|
+
STORAGE (M2):
|
|
90
|
+
- Android: SharedPreferences/SQLite for auth tokens or PII → EncryptedSharedPreferences, Keystore.
|
|
91
|
+
- iOS: NSUserDefaults for tokens → Keychain.
|
|
92
|
+
- RN: AsyncStorage for sensitive data → react-native-keychain, expo-secure-store.
|
|
93
|
+
- Flutter: shared_preferences for sensitive data → flutter_secure_storage.
|
|
94
|
+
|
|
95
|
+
NETWORK (M3): HTTP base URLs, TrustManager overriding checkServerTrusted, NSAllowsArbitraryLoads,
|
|
96
|
+
missing certificate pinning for auth/payment endpoints.
|
|
97
|
+
|
|
98
|
+
DEEP LINKS (M1): URL scheme handlers using raw parameters in navigation, SQL, or web loading
|
|
99
|
+
without whitelist validation.
|
|
100
|
+
|
|
101
|
+
WEBVIEW (M1): setJavaScriptEnabled + addJavascriptInterface loading untrusted URLs (→ RCE),
|
|
102
|
+
setAllowFileAccessFromFileURLs → local file disclosure.
|
|
103
|
+
|
|
104
|
+
PERMISSIONS (M1): dangerous permissions not required by features, background location without
|
|
105
|
+
clear user benefit.
|
|
106
|
+
|
|
107
|
+
CRYPTOGRAPHY (M5): MD5/SHA-1/DES for security, AES-ECB mode, hardcoded IVs.
|
|
108
|
+
Fix: AES-GCM with random IV, bcrypt/Argon2 for passwords, HMAC-SHA256 for MACs.
|
|
109
|
+
|
|
110
|
+
Severity:
|
|
111
|
+
- CRITICAL: exploitable without special conditions, live credential, direct data loss
|
|
112
|
+
- HIGH: exploitable with moderate effort or specific configuration
|
|
113
|
+
- MEDIUM: defense-in-depth, test/staging credential
|
|
114
|
+
- LOW: hardening improvement, no direct exploitation path
|
|
115
|
+
|
|
116
|
+
Output MUST follow the exact format specified. Do not add extra sections or omit any section.
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Example
|
|
122
|
+
|
|
123
|
+
### Input
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
PLATFORM: Android
|
|
127
|
+
FILE_PATH: data/remote/ApiClient.kt
|
|
128
|
+
SECURITY_FOCUS: all
|
|
129
|
+
CODE:
|
|
130
|
+
object ApiClient {
|
|
131
|
+
private const val API_KEY = "sk-live-a1b2c3d4e5f6g7h8i9j0"
|
|
132
|
+
private const val BASE_URL = "http://api.example.com/"
|
|
133
|
+
|
|
134
|
+
fun create(): Retrofit {
|
|
135
|
+
val client = OkHttpClient.Builder()
|
|
136
|
+
.addInterceptor { chain ->
|
|
137
|
+
chain.proceed(chain.request().newBuilder()
|
|
138
|
+
.addHeader("X-API-Key", API_KEY).build())
|
|
139
|
+
}.build()
|
|
140
|
+
return Retrofit.Builder().baseUrl(BASE_URL).client(client).build()
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Output
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
SENTINEL REPORT
|
|
149
|
+
===============
|
|
150
|
+
File: data/remote/ApiClient.kt
|
|
151
|
+
Platform: Android
|
|
152
|
+
Focus: all
|
|
153
|
+
Vulnerabilities Found: 2
|
|
154
|
+
Critical: 2 High: 0 Medium: 0 Low: 0
|
|
155
|
+
|
|
156
|
+
FINDINGS (ranked by severity)
|
|
157
|
+
------------------------------
|
|
158
|
+
[CRITICAL] M9 Reverse Engineering — Hardcoded live API key
|
|
159
|
+
Location : Line 2 — API_KEY constant
|
|
160
|
+
Attack Path : Run `apktool d app.apk`, then `grep -r "sk-live"`. The key is
|
|
161
|
+
readable in 30 seconds with no reverse engineering skill. The
|
|
162
|
+
"sk-live-" prefix indicates a production credential — an attacker
|
|
163
|
+
can make authenticated API calls at the owner's expense or read
|
|
164
|
+
user data immediately.
|
|
165
|
+
Fix :
|
|
166
|
+
```kotlin
|
|
167
|
+
// Never store live API keys in the binary.
|
|
168
|
+
// Option A: Fetch the key from your backend after authentication.
|
|
169
|
+
// Option B: For non-critical keys, use local.properties (git-ignored):
|
|
170
|
+
// local.properties → API_KEY=sk-live-...
|
|
171
|
+
// build.gradle.kts → buildConfigField("String", "API_KEY", ...)
|
|
172
|
+
// Note: BuildConfig fields are still extractable — rotate this key immediately.
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
[CRITICAL] M3 Insecure Communication — HTTP base URL
|
|
176
|
+
Location : Line 3 — BASE_URL = "http://..."
|
|
177
|
+
Attack Path : On any shared network (coffee shop WiFi, hotel network), an attacker
|
|
178
|
+
running a passive sniffer captures all API traffic including the
|
|
179
|
+
X-API-Key header in every request. No special tooling needed — Wireshark
|
|
180
|
+
in 5 minutes exposes every user's data and the API credential.
|
|
181
|
+
Fix :
|
|
182
|
+
```kotlin
|
|
183
|
+
private const val BASE_URL = "https://api.example.com/"
|
|
184
|
+
// Add certificate pinning:
|
|
185
|
+
val client = OkHttpClient.Builder()
|
|
186
|
+
.certificatePinner(CertificatePinner.Builder()
|
|
187
|
+
.add("api.example.com", "sha256/YOUR_PIN_HERE").build())
|
|
188
|
+
.build()
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
OWASP COVERAGE
|
|
192
|
+
--------------
|
|
193
|
+
M1 Improper Platform Usage : Not applicable
|
|
194
|
+
M2 Insecure Data Storage : Not applicable (no storage code)
|
|
195
|
+
M3 Insecure Communication : Checked — CRITICAL (HTTP)
|
|
196
|
+
M4 Insecure Authentication : Checked — hardcoded key impacts auth
|
|
197
|
+
M5 Insufficient Cryptography : Not applicable
|
|
198
|
+
M6 Insecure Authorization : Not applicable
|
|
199
|
+
M7 Client Code Quality : Not applicable
|
|
200
|
+
M8 Code Tampering : Not applicable
|
|
201
|
+
M9 Reverse Engineering : Checked — CRITICAL (hardcoded key)
|
|
202
|
+
M10 Extraneous Functionality : Not applicable
|
|
203
|
+
|
|
204
|
+
NEXT STEPS
|
|
205
|
+
----------
|
|
206
|
+
1. Rotate the sk-live-* key immediately — it is compromised by being in git history.
|
|
207
|
+
2. Switch BASE_URL to HTTPS and add OkHttp CertificatePinner.
|
|
208
|
+
3. Add truffleHog or gitleaks to CI to prevent future secret commits.
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Notes
|
|
214
|
+
|
|
215
|
+
- Rotate any exposed credentials before remediating — assume they are already compromised.
|
|
216
|
+
- This agent scans source code only. Complement with dynamic analysis (MobSF, Frida, Burp Suite).
|
|
217
|
+
- Tested with: Claude Sonnet 4.6.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Store Listing Writer Agent
|
|
2
|
+
|
|
3
|
+
> Describe your app. Get fully ASO-optimized App Store and Google Play Store listings — title, subtitle, description, keywords, and What's New — with character counts and keyword density analysis.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## What This Agent Does
|
|
8
|
+
|
|
9
|
+
Writes App Store and Google Play Store listings from a brief product description:
|
|
10
|
+
|
|
11
|
+
- **App Store** — Title (30 chars), Subtitle (30 chars), Description (4,000 chars), Keywords (100 chars), What's New
|
|
12
|
+
- **Play Store** — Title (30 chars), Short Description (80 chars), Full Description (4,000 chars)
|
|
13
|
+
- **ASO analysis** — primary keyword placement, density check, competitor gap notes, A/B test suggestions
|
|
14
|
+
|
|
15
|
+
Every output respects Apple and Google's restrictions: no superlatives ("best", "#1"), no pricing, no competitor mentions.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Files
|
|
20
|
+
|
|
21
|
+
| File | Purpose |
|
|
22
|
+
|---|---|
|
|
23
|
+
| [`agent.md`](agent.md) | Input format, output format, full system prompt |
|
|
24
|
+
| [`example-input.md`](example-input.md) | Taskly productivity app description |
|
|
25
|
+
| [`example-output.md`](example-output.md) | Complete App Store + Play Store listings |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Quick Start
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
APP_NAME: <Your App>
|
|
33
|
+
STORE: <app-store | play-store | both>
|
|
34
|
+
CATEGORY: <App category>
|
|
35
|
+
TARGET_AUDIENCE: <Who uses this>
|
|
36
|
+
CORE_FEATURES:
|
|
37
|
+
- Feature 1
|
|
38
|
+
- Feature 2
|
|
39
|
+
TONE: <professional | friendly | playful | minimal>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Character Limit Reference
|
|
45
|
+
|
|
46
|
+
| Field | App Store | Play Store |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| Title | 30 | 30 |
|
|
49
|
+
| Subtitle / Short Description | 30 | 80 |
|
|
50
|
+
| Description | 4,000 | 4,000 |
|
|
51
|
+
| Keywords (App Store only) | 100 | N/A |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Related Agents
|
|
56
|
+
|
|
57
|
+
- [`agents/cross-platform/release-notes-generator`](../release-notes-generator/) — generate the "What's New" section from git commits
|
|
58
|
+
- `prompts/android/gradle-dependency-audit.md` — ensure the app is ship-ready before writing the listing
|