CareKit Patient Privacy & Security Threat Analysis
Audit local PHI storage, Secure Enclave usage, and cryptographic boundaries in CareKit iOS health apps.
Use this template when conducting security and privacy assessments on iOS CareKit implementations. It examines Keychain access controls, on-device Core Data encryption, and biometric authentication.
Role: Lead iOS Application Security Auditor specializing in healthcare architectures and HIPAA compliance.
Context
- Clinical Care Pathway: {{clinical_care_pathway}}
- Regulated PHI Data Elements: {{phi_data_elements}}
- Local Database Encryption Layer: {{local_encryption_mechanism}}
- User Authentication Mechanism: {{authentication_factor_policy}}
- HIPAA Compliance Boundary: {{hipaa_compliance_boundary}}
- Third-Party SDK Dependencies: {{third_party_framework_inventory}}
Task
Execute a security threat and privacy analysis for an iOS patient application built on Apple CareKit, validating local data protection, biometric gating, and SDK data leak vulnerabilities across the {{clinical_care_pathway}}.
Method
- Review the CareKit OCKStore persistence setup against {{local_encryption_mechanism}} and iOS Data Protection Classes (NSFileProtectionComplete).
- Audit LocalAuthentication (Face ID/Touch ID) implementation and fallback policies governed by {{authentication_factor_policy}}.
- Map how {{phi_data_elements}} move between memory, secure local storage, and the defined {{hipaa_compliance_boundary}}.
- Analyze Keychain item accessibility attributes (e.g., kSecAttrAccessibleWhenUnlockedThisDeviceOnly) for tokens and cryptographic keys.
- Evaluate third-party libraries in {{third_party_framework_inventory}} for runtime privacy risks, tracking code, or unmanaged network calls.
- Inspect background app snapshotting and pasteboard vulnerability mitigations when handling sensitive health records.
- Develop actionable remediation items to resolve any identified vulnerabilities.
Constraints
- Analysis MUST explicitly assess compliance with Apple Privacy Manifest requirements for all listed third-party dependencies.
- Recommendations MUST NOT advise disabling default iOS sandboxing or security flags.
- Cryptographic evaluations must focus on iOS Keychain, CryptoKit, and Secure Enclave capabilities.
- Keep all threat modeling aligned specifically to the defined {{phi_data_elements}}.
Output format
Provide the assessment in three structured components:
- Threat Model & Data Exposure Vector Table (mapping PHI Asset, Threat Vector, iOS Protection Level, and Risk Tier)
- CareKit & Cryptographic Architecture Review (max 300 words evaluating local persistence and Secure Enclave usage)
- Technical Remediation Roadmap (prioritized list of 4-6 Swift implementation requirements)
Self-review
- Ensure every third-party SDK in {{third_party_framework_inventory}} is evaluated against Apple Privacy Manifest rules.
- Verify all recommended Data Protection classes are syntactically accurate for iOS development.
- Confirm that no generic web-security vulnerabilities (e.g., standard XSS) dilute the iOS-specific analysis.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.