Design review: threat model
A telehealth platform where patients and clinicians use React Native mobile apps backed by a GraphQL API on Google Cloud Run. Protected health information (diagnoses, medications, visit notes) is stored in Cloud SQL and exported nightly to Cloud Storage. Video visits run through a third-party WebRTC provider, visit notes are summarized by a third-party LLM, and support staff reach patient records through an internet-facing admin site. The largest risks are shared admin access, third parties handling health data, and authorization gaps in the API.
Findings
T1: Shared support login exposes all patient records to anyone who obtains it
critical- Scenario
- Support staff search patients by name or date of birth on an internet-facing site using one shared login. A phished, reused or leaked password, or a former employee, gives full patient search. Actions cannot be tied to a person.
- Impact
- Mass disclosure of protected health information with no way to tell who accessed what.
- Fix
- Put the admin site behind Google Identity-Aware Proxy or another SSO gateway with individual accounts and MFA. Remove the shared login. Give support a read-only role with the minimum fields, and log each search with the staff member, the query and the record opened.
- Controls
- HIPAA 164.312(d), HIPAA 164.312(a)(1), HIPAA 164.312(b)
T2: Visit notes sent to a third-party LLM without a business associate agreement
high- Scenario
- Clinician note text, which contains diagnoses and medications, is sent to an external LLM API. If the vendor has no agreement covering this use, or keeps or reuses inputs, health data leaves your control.
- Impact
- Impermissible disclosure of protected health information, regulatory exposure and loss of patient trust.
- Fix
- Confirm a signed business associate agreement and a no-retention, no-training setting with the LLM vendor before sending any real note. Strip names, dates of birth and phone numbers before the call. If an agreement is not available, switch to a vendor that offers one or turn the feature off.
- Controls
- HIPAA 164.308(b)(1), HIPAA 164.502(e)
T3: Video recordings stored in the provider's cloud with unclear access and retention
high- Scenario
- Recordings sit in the provider's storage. Retention, who at the provider can open them and how download links are protected are not stated. A leaked or long-lived link exposes a patient visit.
- Impact
- Exposure of sensitive visits, including audio and video of patients.
- Fix
- Do not record by default. If recording is needed, get a business associate agreement, set a short retention period, require encrypted storage and use download links that expire in minutes and are tied to an authenticated user.
- Controls
- HIPAA 164.308(b)(1)
T4: Patient account takeover through SMS one-time codes
high- Scenario
- SMS codes can be taken through SIM swapping or message interception, and guessed if attempts are not limited. A taken-over account reads that patient's records and visit notes.
- Impact
- Unauthorized access to an individual patient's health data.
- Fix
- Limit attempts per number and per device, expire codes in minutes, make them single-use, and lock the number after repeated failures. Bind the session to the device after first sign-in, offer passkeys or biometrics, and require step-up verification before viewing notes or changing the phone number.
- Controls
- HIPAA 164.312(d)
T5: GraphQL queries return other patients' data when object-level checks are missing
high- Scenario
- A patient or clinician changes an ID in a query to read a record they do not own. Introspection and very deep queries also help an attacker map the schema and exhaust resources.
- Impact
- Cross-patient disclosure of health records at scale.
- Fix
- Enforce authorization in one shared policy function called by every resolver: patients read only their own data, clinicians only assigned patients. Disable introspection in production, set query depth and cost limits, and add automated tests that request another user's IDs and expect a denial.
- Controls
- HIPAA 164.312(a)(1)
T6: Nightly note PDFs in Cloud Storage exposed through broad access or long retention
high- Scenario
- Every clinician note is copied nightly into a bucket. A permissive bucket policy, an over-privileged service account or a signed link that never expires exposes the whole archive, and old exports accumulate.
- Impact
- Bulk disclosure of visit notes.
- Fix
- Turn on uniform bucket-level access and public access prevention, grant the export job a service account limited to writing to this bucket, enable data access logs, add a lifecycle rule to delete exports after the shortest period you need, and consider customer-managed encryption keys.
- Controls
- HIPAA 164.312(a)(1), HIPAA 164.312(b)
T7: Push notifications reveal the clinician and visit type on the lock screen
medium- Scenario
- Messages naming a clinician and appointment type can disclose that a patient sees, for example, an oncologist or a psychiatrist, to anyone who sees the screen. The text also passes through Apple and Google.
- Impact
- Disclosure of a patient's care relationship to bystanders and third parties.
- Fix
- Send neutral text such as "You have an update in the app" and load details only after the user is authenticated in the app. Let patients choose how much detail appears.
- Controls
- HIPAA 164.502(b)
T8: No evidence of who viewed or changed a record
medium- Scenario
- The description does not mention audit logging. Without a record of who read, exported or edited patient data, you cannot investigate a breach or show appropriate access.
- Impact
- Inability to detect misuse, investigate incidents or answer a regulator.
- Fix
- Write an append-only audit log of actor, patient, action and time to a separate project or locked bucket. Cover reads, exports and edits, and alert on unusual volumes such as one account opening many records.
- Controls
- HIPAA 164.312(b)
T9: Clinician sessions can be stolen or phished past password and TOTP
medium- Scenario
- Real-time phishing pages can relay a password and a TOTP code, and a stolen session token works until it expires. A clinician account reaches many patients.
- Impact
- Access to every patient assigned to the compromised clinician.
- Fix
- Use phishing-resistant sign-in such as WebAuthn security keys or passkeys for clinicians, keep sessions short with idle timeout, and require re-authentication before exporting or bulk-viewing notes.
- Controls
- HIPAA 164.312(d), HIPAA 164.312(a)(2)(iii)
T10: Visit notes can be altered without a history
medium- Scenario
- If notes can be edited in place, an attacker or a mistaken update can change diagnoses or medications and leave no trace, which affects patient safety.
- Impact
- Incorrect clinical records and loss of record integrity.
- Fix
- Store notes as versions that are never overwritten, record who changed what, and require clinician sign-off on final versions. Separate database roles so the application cannot rewrite history tables.
- Controls
- HIPAA 164.312(c)(1)
T11: SMS and video costs can be driven up, and the service degraded, by abuse
medium- Scenario
- Automated requests for one-time codes can run up SMS charges and flood users, and bulk booking or room creation can consume video minutes and Cloud Run capacity.
- Impact
- Financial loss and unavailable visits.
- Fix
- Rate limit code requests per number, per device and per IP, restrict countries you do not serve, put Cloud Armor in front of the API, and set budget alerts on SMS and video usage.
T12: Health data left on the phone
low- Scenario
- Cached records, tokens in plain storage, screenshots in the app switcher and device backups can leave patient data on a lost or shared phone.
- Impact
- Local disclosure of health data from a lost or compromised device.
- Fix
- Keep tokens in the iOS Keychain and Android Keystore, avoid caching records on disk or encrypt the local database, hide content in the app switcher and block screenshots on record screens.
- Controls
- HIPAA 164.312(a)(2)(iv)
Assets to protect
- Patient health records: diagnoses, medications, visit notes
- Video visits and any recordings held by the WebRTC provider
- Patient identity data: name, date of birth, phone number
- Clinician and patient sessions and credentials
- Nightly note PDFs in Cloud Storage
- AI-generated visit summaries and the text sent to the LLM
- Appointment metadata, including clinician and visit type
Trust boundaries
- Mobile apps to the GraphQL API over the public internet
- GraphQL API to Cloud SQL and Cloud Storage inside Google Cloud
- API to the third-party WebRTC video provider
- API to the third-party LLM provider
- Public internet to the internal admin site
- Backend to Apple and Google push notification services
Assumptions made
- All external connections use TLS and Google Cloud encrypts storage at rest by default
- The video provider and the LLM vendor are separate companies, and no business associate agreements are in place unless you state otherwise
- Patients and clinicians are different roles enforced in the API, not only in the app
- The admin site reads the same database as the API
- Clinicians are assigned to patients through a relationship the API can check
Questions to answer
- Are business associate agreements signed with the video provider and the LLM vendor?
- How long are video recordings and LLM inputs kept, and who can open them?
- How does the API decide which clinician may see which patient?
- Is any audit logging in place today, and where does it go?
- What are the session lifetimes for patients and clinicians?
- Who has access to the Google Cloud project and the storage bucket, and through which roles?
- Does the admin site have read-only database access?
Generated by AI from the description you provided. It can miss threats or misjudge severity, and control references are suggestions. Have an engineer or security professional review it before relying on it as evidence for an audit.