axiom audit icloud

Security Community

Skill notes

Tool Use Is Mandatory

Run every Glob, Grep, and Read this prompt lists. Do not reason from training data instead of scanning. Run each Grep pattern as written; do not collapse them into one mega-regex. Run the Read verifications each section calls for. "Build a mental model" / "map the architecture" means with tool output in hand, not from memory.

Files to Exclude

Skip: *Tests.swift, *Previews.swift, */Pods/*, */Carthage/*, */.build/*, */DerivedData/*, */scratch/*, */docs/*, */.claude/*, */.claude-plugin/*

Step 4: Read Key Integration Files

Read 2-3 representative files (CloudKitManager / iCloud sync service / DocumentManager / any @Model with cloudKitDatabase config) to understand: Which CloudKit operations exist (save, fetch, modify, subscribe) Where availability checks live (once at launch vs every access) Whether error handling is centralized or per-call-site Whether the app uses CKSyncEngine or hand-rolled fetch/sync logic

Output

Write a brief iCloud Map (5-10 lines) summarizing: Subsystems in use (CloudKit private/shared/public, iCloud Drive, NSUbiquitousKeyValueStore, SwiftData+CloudKit) Sync engine type (CKSyncEngine / legacy CKDatabase / pure iCloud Drive / KV-store) Where availability is checked (per-access / once / never) Error-handling pattern (centralized / per-call / missing)

Phase 2: Detect Known Anti-Patterns

Run all 8 detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
Security
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
94 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@CharlesWiltgen · MIT
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
Network behavior
External requests
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Phase 1: Map iCloud Surface in Use

Phase 1: Map iCloud Surface in Use

02
Step 1: Identify iCloud Subsystems

Step 1: Identify iCloud Subsystems

03
Step 2: Identify Account & Availability Surface

Step 2: Identify Account & Availability Surface

04
Step 3: Identify Error & Conflict Handling Surface

Step 3: Identify Error & Conflict Handling Surface

05
Step 4: Read Key Integration Files

Read 2-3 representative files (CloudKitManager / iCloud sync service / DocumentManager / any @Model with cloudKitDatabase config) to understand: Which CloudKit operations exist (save, fetch, modify, subscribe) Where availability checks live (once at launch vs every access) Whether error handling is centralized or per-call-site Whether the app uses CKSyncEngine or hand-rolled fetch/sync logic

06
Phase 2: Detect Known Anti-Patterns

Run all 8 detection patterns. For every grep match, use Read to verify the surrounding context before reporting — grep patterns have high recall but need contextual verification.

07
Phase 3: Reason About iCloud Completeness

Using the iCloud Map from Phase 1 and your domain knowledge, check for what's *missing* — not just what's wrong. Question · What it detects · Why it matters Is `ubiquityIdentityToken` checked before every iCloud Drive access (not just at launch)? · Stale availability assumption · User signs out mid-session → next access crashes Are all 6 critical `CKError` codes handled (`.quotaExceeded`, `.networkUnavailable`, `.serverRecordChanged`, `.notAuthenticated`, `.zoneNotFound`, `.partialFailure`)? · Incomplete error matrix · Production users hit one of the unhandled codes → silent failure or crash

08
Phase 4: Cross-Reference Findings

Bump severity for these combinations: Finding A · + Finding B · = Compound · Severity Missing NSFileCoordinator (Pattern 1) · Multi-process access (extension / widget / Watch) · Guaranteed corruption — different processes race on every concurrent write · CRITICAL Missing entitlement check (Pattern 3) · iCloud Drive write path · Crash on signed-out user, no graceful path · CRITICAL Missing CKError handling (Pattern 2) · Automated retry loop · Silent infinite retry on `quotaExceeded` → drains user data plan and battery · HIGH

09
Phase 5: iCloud Health Score

Metric · Value Subsystems in use · CloudKit / iCloud Drive / KV / SwiftData+CK count Coordination coverage · M of N ubiquitous I/O sites use NSFileCoordinator (Z%) Availability check coverage · M of N entry paths guard with token / accountStatus (Z%) CKError code coverage · M of 6 critical codes handled

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.