Back to skill

Security audit

Mobile KMP

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill benign with medium confidence: its findings appear consistent with mobile development guidance, though some references were unresolved and coverage is incomplete.

The verdict is benign, but confidence is medium and Skillspector reports partial analysis: all five listed components were scanned, while some local references could not be resolved. Consider that coverage limitation when deciding whether to install.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/ios-interop.md (reported line 82)May include surrounding context.

text

```swift
final class KeychainVault: KeyValueVault {
    func write(key: String, value: KotlinByteArray) -> Bool { /* SecItemAdd / SecItemUpdate */ }
    func read(key: String) -> KotlinByteArray? { /* SecItemCopyMatching */ }
}

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 43)May include surrounding context.

md
(build-phase script, local package, CocoaPods, remote XCFramework).
2. Check compatibility before adding or upgrading anything. SKIE, KSP, Room and Compose Multiplatform each
   support a specific Kotlin range. Do not bump Kotlin, AGP, `compileSdk` or the iOS deployment target
   without asking.
3. Load the reference for the area being touched:
   [Structure and Gradle](references/structure-and-gradle.md), [iOS interop](references/ios-interop.md),
   [Data and networking](references/data-and-networking.md), [Testing](references/testing.md).

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 53)May include surrounding context.

md
6. Add `commonTest` tests for new shared logic; run them on the JVM and the iOS simulator target.
7. Build both apps: `./gradlew :androidApp:assembleDebug` and the iOS app in Xcode (or
   `./gradlew :shared:linkDebugFrameworkIosSimulatorArm64`). A green Android build says nothing about iOS.
8. Report what moved to common code, new dependencies, Swift API changes, and every `Info.plist`,
   entitlement, Gradle property or Xcode build-phase change. These need explicit sign-off.

## Rules

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 364)May include surrounding context.

md
- Compose Multiplatform for iOS is Stable. Screens can mix both ways (`UIKitViewController` with a
  `UIHostingController` puts SwiftUI inside Compose).
- Info.plist change: add `CADisableMinimumFrameDurationOnPhone` set to `true`, or the app crashes at
  runtime. Call it out in the summary.
- Use direct library coordinates in the catalog; the `compose.ui`-style plugin aliases are deprecated
  since Compose Multiplatform 1.10.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/structure-and-gradle.md (reported line 228)May include surrounding context.

md
- Material3 for Compose Multiplatform is versioned separately from runtime and foundation. Check both.
- Android resolves the JetBrains artifacts to the matching `androidx.compose` artifacts through Gradle
  module metadata.
- Info.plist: `CADisableMinimumFrameDurationOnPhone` = `true` is required by Compose Multiplatform
  rendering on iOS. Without it the app crashes at runtime.

## Xcode direct integration (monorepo)

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 172)May include surrounding context.

kotlin
// BAD: new client per call, logging prints the bearer token, cleartext URL
suspend fun fetch() = HttpClient { install(Logging) { level = LogLevel.ALL } }
    .get("http://api.example.com/readings").body<List<ReadingDto>>()

// GOOD: engine comes from androidMain (OkHttp) or iosMain (Darwin)
fun createHttpClient(engine: HttpClientEngine, json: Json) = HttpClient(engine) {

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 183)May include surrounding context.

level = LogLevel.HEADERS sanitizeHeader { it == HttpHeaders.Authorization } } defaultRequest { url("https://api.example.com/") } }

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/data-and-networking.md (reported line 34)May include surrounding context.

md
level = if (isDebugBuild) LogLevel.HEADERS else LogLevel.NONE
        sanitizeHeader { it == HttpHeaders.Authorization }
    }
    defaultRequest { url("https://api.example.com/") }
}

// androidMain

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 449)May include surrounding context.

md
- <names, generics, default args, Flows, sealed types that need work>

### Platform impact
- Info.plist / entitlements / Xcode build phases / Gradle properties: <list or "none">

### Verdict
Request changes -- 1 Blocker, 1 Major.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 469)May include surrounding context.

| 4 UI (optional) | Compose Multiplatform screens | Agreed with the iOS team; accessibility checked |

Risks: <version lock-in, binary size, iOS ramp-up, database migration>. Platform changes: <Info.plist keys, entitlements, build phases>.

text

## Related skills

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/data-and-networking.md (reported line 54)May include surrounding context.

md
### Transport security

- HTTPS only. On iOS, App Transport Security blocks cleartext unless `Info.plist` has exceptions; never
  add `NSAllowsArbitraryLoads`. On Android, keep `usesCleartextTraffic` off in the app manifest.
- Certificate pinning is configured per engine: OkHttp `CertificatePinner` in the OkHttp engine config,
  and the Darwin engine's challenge handling or certificate pinner on iOS. Pin keys, not leaf certificates,

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/data-and-networking.md (reported line 60)May include surrounding context.

md
and the Darwin engine's challenge handling or certificate pinner on iOS. Pin keys, not leaf certificates,
  and ship a backup pin. Escalate pinning decisions to `mobile-security`.
- Tokens live in Keystore-backed storage on Android and the Keychain on iOS, behind a common interface.
  Never in `commonMain` constants, `BuildConfig` or `Info.plist`.

### Errors