Skip to content
Suggest a correction

Agentforce and MCP threat model

Reference3 min read

Review the identities, trust boundaries, threats, and required controls before you enable a Record Health Check Agentforce action or the Record Health Check MCP server. To set them up, see Agentforce actions and Deploy the MCP service one security gate at a time.

The native action remains inside Salesforce and evaluates with the access of the agent’s user: the signed-in user for an employee agent, or the agent user for a service agent. MCP crosses four boundaries: an approved client obtains an inbound token, calls the hosted MCP server over HTTPS, the server obtains a separate Salesforce token, and a versioned Apex REST adapter evaluates with a dedicated Salesforce integration principal.

The inbound MCP credential and outbound Salesforce credential require separate scopes, storage, rotation, revocation, and audit trails. Neither credential represents the conversational user.

ThreatRequired controlVerification
Arbitrary model inputStrict schema, no unknown fields, two-operation listInvalid-schema tests
Namespace guessingExact QualifiedApiName; no alternate-name retryNamespaced tests
Record probingSalesforce sharing and user-mode access; rate limits; no denied-record disclosureAccess tests
Service identity mistaken for user delegationSetup documentation; prefer native action for in-org useIdentity review
Prompt injection in stored textTreat output as data; exclude display text; fixed agent instructionsInjection suite
Tool side effectsRead-only operations; publication NONE; no generic Apex or SOQLMutation and event tests
Diagnostics disclosureAllow only four bounded, disclosure-safe diagnosis fields; exclude raw administrator diagnostics; integration user lacks diagnostics permissionContract and restricted-user tests
Credential theftManaged secrets, narrow scopes, rotation, token validation, no token logsRotation and log tests
Server-side request forgerySalesforce host list, redirect refusal, outbound controlsHost tests
Excessive callsConcurrency, timeout, body, and response limits in the service; per-client rate limits at the hosting platformLoad tests
Retry amplificationRetry only safe transient failures with capped backoffFailure injection
Malformed Salesforce responseContract and size validation; fail closedResponse tests
Cross-client response leakSupported MCP SDK; isolated request state; concurrency testsParallel tests
Sensitive telemetryLog field list, no bodies, retention policy, canary scanTelemetry scan
Unexpected MCP toolTwo tools fixed in the deployed source; deployment inventory checkTool-list test
Supply-chain compromiseLocked dependencies, scans, SBOM, immutable artifactAttestation
Unsafe releaseStaged rollout, kill switch, revocation, independent rollbackRollback drill
  • FAIL is a completed evaluation, not a transport error.
  • UNABLE_TO_EVALUATE, ERROR, missing output, and adapter failure never become PASS.
  • MCP never claims to preserve the conversational user’s Salesforce access.
  • Removing Record Health Check Run prevents evaluation.
  • Ordinary Agentforce and MCP principals can receive only the four bounded completed-evaluation diagnosis fields, diagnosticId, diagnosticCategory, diagnosticSummary, and recommendedAction; they cannot receive raw or administrator-only diagnostics.
  • Models cannot select event publication in version 1.
  • MCP exposes no generic query, Apex, record update, or metadata operation.
  • Logs exclude complete tool inputs and Apex responses.

Security, product, Apex, Agentforce, identity, MCP service, and operations owners must approve this model before production. Repeat review when tools, outputs, identities, scopes, objects, hosting, persistence, or publication behavior changes.