For many health tech companies, Salesforce is no longer just a CRM. With Health Cloud, Experience Cloud portals and connected clinical tools, it often runs patient engagement, care coordination, referrals and provider relationships.
That makes it valuable to your teams, and to attackers. An org that holds Protected Health Information (PHI), care plans and payer data is a target in its own right.
Many leaders assume Salesforce handles security on their behalf. It handles part of it. Under the Shared Responsibility Model, Salesforce secures the underlying cloud infrastructure: data centres, networks and the platform itself. Your organisation is responsible for what you build on top of it: configuration, permissions, custom code, user access and integrations.
Most exposure lives in that second half. The good news is that it is also the half you control. A secure org is not only about avoiding fines. It is what hospital procurement teams, enterprise partners and auditors increasingly expect to see before they sign.
How attackers actually get into Salesforce orgs
Attackers rarely try to break Salesforce's servers. It is far easier to use a door the organisation has already left open. Firewalls and network controls do little here, because the access looks legitimate.
Social engineering and malicious connected apps
In voice phishing (vishing) campaigns, an attacker calls a staff member while posing as IT support and talks them into authorising a connected app. Once approved, that app can hold an OAuth token with broad access to records. No password is stolen, and MFA may not stop it, because a real user granted the access.
Over-privileged third-party integrations
EHR connectors, marketing platforms, telehealth tools and data warehouses often connect through integration users with wide permissions, sometimes System Administrator. If that vendor is compromised, or its credentials leak, the attacker inherits that access. These users are often not monitored like human users.
Misconfigured patient and provider portals
Experience Cloud sites give patients and providers self-service access. When guest user permissions, sharing rules or exposed Apex methods are set too broadly, unauthenticated visitors may be able to query records they should never see.
Dormant and orphaned accounts
Former employees, contractors from a past implementation and integration users from a vendor you stopped using can all remain active. Each is a working credential that no one is watching.
The AI code paradox: faster delivery, new open doors
Health tech engineering teams now use AI coding assistants to produce Apex classes, Lightning Web Components and Flows quickly. That speed is useful. The risk is that these tools optimise for code that works, not code that respects your access model.
Common patterns we look for in AI-assisted Salesforce code include:
Defaulting to "without sharing" in Apex. This runs the code with system-level record access, ignoring sharing rules. A component meant for one care team can return patient records from every department.
Missing Field-Level Security and CRUD checks. The code reads or updates sensitive fields such as diagnosis, medication or insurance details without checking whether the user is allowed to.
SOQL injection. User input is concatenated straight into a query, allowing someone to change what the query returns.
Hardcoded endpoints and credentials. API URLs, keys or tokens are written into code rather than stored in Named Credentials.
The blind spot is that standard testing does not catch these problems. Salesforce requires 75% test coverage to deploy Apex to production, but coverage measures whether code runs, not whether it leaks PHI. Functional QA confirms the feature works for the tester, who often has broad permissions. Neither tells you what a restricted user, or an attacker, could see.
What your development team must do
CTOs do not need to review every line of code. They do need to set guardrails that make the secure approach the default.
Enforce least privilege in code
Require an explicit "with sharing" declaration on Apex classes, with any exception documented and approved.
Use WITH USER_MODE in SOQL and user-mode DML so queries and updates respect the running user's object and field permissions.
Use bind variables and sanitise all user input to prevent SOQL injection.
Store endpoints and secrets in Named Credentials, never in code.
Lock down APIs and connected apps
Enable API Access Control so only connected apps explicitly approved by an administrator can access your org's APIs.
Set connected apps to admin-approved users only, and grant the narrowest OAuth scopes each integration needs.
Give each integration its own dedicated user with a minimal permission set, rather than sharing an admin account.
Automate security gates
Add static analysis, such as Salesforce Code Analyzer or PMD rules, to your CI/CD pipeline.
Block deployments that fail security rules, in the same way you block deployments that fail tests.
Include security checks in code review for AI-generated code, with test cases that run as restricted users.
These gates catch issues before production, when they are cheapest to fix and before any PHI is exposed.
The architect's blueprint: how to review and remediate
Guardrails protect new work. Most orgs also carry years of earlier decisions. A senior Salesforce Architect reviews the existing org systematically, usually across four areas.
1. Dormant accounts and identity hygiene
We list every active user and compare it against current staff, contractors and vendors. Inactive users, ex-contractors and legacy profiles are deactivated or reassigned. We confirm MFA is enforced, which Salesforce requires for user interface logins, and review session timeouts, login IP ranges and login hours for high-risk roles.
2. Least privilege and Field-Level Security
Many orgs have grown bloated profiles and broad "View All" or "Modify All" permissions to solve short-term problems. We move access towards minimal profiles plus granular Permission Set Groups built around real job functions. Sensitive PHI fields are locked down with Field-Level Security so only the roles that need them can see them. Guest user and portal access is reviewed record by record.
3. OAuth privileges and third-party integrations
We build an inventory of every connected app and integration: who owns it, what it can access and when it was last used. Stale OAuth tokens are revoked, unused apps removed and scopes reduced. We also look for single points of failure, such as one integration user shared by several systems, where a single compromise exposes everything.
4. Technical debt remediation
Security problems hide in complexity. Multiple triggers on the same object, conflicting Flows, old Apex written before current security features existed and unmaintained managed packages all make it hard to know who can see what. We prioritise and untangle this debt so access is predictable and auditable, which also makes SOC 2, HIPAA and HITRUST evidence easier to produce.
The output is a prioritised remediation plan: what to fix now, what to schedule and what to monitor.
Book a complimentary Salesforce security and architecture consultation
You do not need to guess where your vulnerabilities are. Zime offers a free, no-obligation consultation and org review led by our experienced Salesforce Architects and solution leads, who work specifically with digital health companies, hospitals, clinics, diagnostic labs and life sciences teams.
In the session, we will:
Review your org's highest-risk areas: users, permissions, connected apps and custom code
Identify where PHI may be exposed beyond the people who need it
Give you a short list of practical next steps your team can act on
Write to us to schedule a free audit of your Salesforce Org.
Frequently asked questions
Does Salesforce handle HIPAA compliance for us?
No. Salesforce secures its infrastructure and offers services that can support HIPAA compliance, but how you configure access, code and integrations is your responsibility. A secure platform can still hold an insecure org.
Is AI-generated Apex code unsafe?
Not inherently. It needs the same security review as any other code. The risk comes from shipping it quickly without checks for sharing, Field-Level Security and injection.
How often should we run a Salesforce security audit?
Review users and connected apps regularly, and run a fuller review after major releases, new integrations, vendor changes or before a compliance audit. If you are actively building your Salesforce solutions and apps, we recommend auditing on a monthly basis. If your org is being actively used, audit it at least once every 3 months.
Will tightening permissions disrupt our teams?
It can if done abruptly. A structured review maps access to real job functions first, then changes it in stages, so teams keep what they need and lose only what they do not.

Comments (…)
Comments appear once they've been approved. Please keep the conversation respectful.