AF-Q09Scenario AdvancedAgentforce#security#agentforce

A tester gets the agent to show another customer's orders. What went wrong and how do you fix it?

Your confidence:Not rated

Model answer

Likely causes

  • Action accepts an order or customer ID from user text.
  • Agent user has broad access (for example view all).
  • Verification is instruction-based, not scripted.

Fix

  1. Scripted verification sets a customer variable.
  2. Actions derive the customer from the variable; order lookups only within that customer's orders.
  3. Least-privilege agent user; sharing enforced (user mode in Apex).
  4. Adversarial tests added to the suite; block release until passing.
  5. Review observability for past occurrences; follow incident process.

โœ” Key points to hit

โœ– Red-flag answers

  • 'Add an instruction not to do that'
  • Ignoring past exposure

โ†ช Follow-ups

How do you check if real customers were affected?

Search session traces and audit logs for cross-customer lookups; follow the breach process if any.

Where should Apex actions enforce access?

Run in user mode or with sharing, and validate ownership explicitly.