Salesforce penetration testing methodology: why a structured test matters before a customer or auditor asks
A Salesforce penetration test is a scoped, permission-bound examination of your own Salesforce environment that combines automated tooling with manual inspection to find weaknesses an attacker could use, and it is structured in phases: agreed scope and rules, reconnaissance of the org, testing of access controls, configuration and business logic, validation of each finding, and a written report. If a customer security review, a product launch, an insurer or a compliance framework is asking for evidence, the structure matters as much as the result, because a reviewer will want to see what was tested, how it was tested and why the findings can be trusted. An unstructured check of a few settings produces none of that.
The risks this kind of test addresses sit inside the org itself. Weak access controls include profiles and permission sets that grant more than a role needs, sharing rules that expose records across business units, and integration users with broader rights than their function requires. Insecure configuration covers session settings, password and login policies, connected apps and the handling of sensitive fields. Flawed business logic includes approval processes, record-triggered automation and Apex or Flow code that can be steered into doing something the business never intended. Each of these needs a different technique, so a methodology should say which phase covers which risk.
Set expectations before testing starts. Salesforce states that an assessment is not a certification or warranty that its services are secure, and that the customer is solely responsible for interpreting the results. Confirm with your provider who validates each finding, how severity is assigned, and which findings you must report to Salesforce under the Salesforce Security Assessment Agreement. Ask for the methodology in writing, including the public references it draws on, so that your auditor or customer can judge the work on its own terms.
Which parts of a Salesforce environment are in scope
Scope for a Salesforce test is set by a handful of decisions made before any testing starts. Each card below covers one of those decisions, and together they define what the test may touch under the Salesforce Security Assessment Agreement and what the report can honestly claim to cover.
Orgs and sandboxes
Name every org, production or sandbox, that the test will cover, and state why each one is included. A sandbox copy of production configuration can reveal the same weaknesses, but only if it has matching profiles, sharing rules and integrations. Confirm with the client which environments hold live customer records, because that changes how carefully the tester must handle data during testing.
Salesforce assessment docsExperience Cloud sites
Public and partner-facing Experience Cloud sites expose guest user access and sharing settings to anonymous users, which makes them a frequent source of data exposure findings. List each site, its guest user profile and its authenticated audiences. Agree in writing whether the test covers only the site's own pages and components or also the Apex and APIs it calls.
Custom Apex and Lightning components
Custom Apex classes, Visualforce pages and Lightning components hold the business logic that standard configuration does not. Record the repository or package versions in scope, and check whether the client wants code review, dynamic testing or both. Items such as SOQL built from user input or missing sharing keywords are typical targets, and the scope should name them rather than leave them implied.
Integrations and connected apps
List connected apps, named credentials, middleware and external services that send or receive Salesforce data. Each integration extends the attack surface beyond the org, so the scope must state whether the test covers the Salesforce side of the connection, the third-party side, or only the credentials and token handling. Third-party systems need their own authorization before testing.
User roles and permission sets
Testing should cover the roles that matter to the business, such as a standard user, a community guest user, a partner user and an administrator. For each role, record the profiles and permission sets assigned to it. Permission testing is where most access control weaknesses appear, so the matrix of roles to records should be agreed before the test begins.
Excluded forms and limits
Salesforce prohibits testing of lead capture, sign-up and contact forms, so these must be named as excluded in the scope document. Also record the boundaries that cannot move: Salesforce IP addresses are not testable, the test stays within the client's own environment, and denial of service, privilege escalation and lateral movement are prohibited. Confirm these exclusions with the client in writing.
Assessment AgreementHow a Salesforce penetration test runs, phase by phase
The sequence moves from agreed scope and rules of engagement to validated, reproducible findings and a retest, so the client can show an auditor or customer exactly what was tested, under which rules, and what was fixed.
Agree scope and rules of engagement
The client and the testing provider write down which Salesforce org, orgs, applications and integrations are in scope, and which test types will be used. The rules come from the Salesforce Security Assessment Agreement, which restricts automated testing to a weekend window, prohibits denial of service, privilege escalation and lateral movement, and excludes Salesforce's own IP addresses and lead capture, sign-up and contact forms. The step closes when the signed scope document lists these exclusions, the testing window and named client contacts for emergencies. Confirm current terms with Salesforce before work starts, since the agreement governs what is allowed.
Map the client's own org configuration
The tester reviews the client's own Salesforce environment in a read-only way: user roles, profiles, permission sets, sharing rules, connected apps, login settings, session settings and the Apex, Visualforce and Lightning components that the client has built. The purpose is to build a model of who can reach which records and actions before any active test. The step ends with a written inventory of objects, integrations and access paths that the active testing will exercise, agreed with the client's Salesforce administrator.
Test with commercial tools and manual inspection
Salesforce's agreement permits a combination of commercial off-the-shelf tools and manual inspection, including hidden field examination. The tester uses scanners where they fit the target, then checks results by hand, looking at logic that tools cannot judge, such as sharing behavior, record ownership and field-level access. Methods follow the OWASP Web Security Testing Guide for test cases, and the planning and execution structure follows NIST SP 800-115, the technical guide published in January 2008 by Scarfone, Souppaya, Cody and Orebaugh. The step closes with a test log linking each test case to the scope item it covered.
Run intrusive and passive techniques within the agreement
The agreement covers penetration and analysis services using intrusive or passive techniques. The tester runs the chosen techniques only against in-scope items, during permitted windows, and stops any test that could disrupt service. Examples of checks include authorization boundaries between profiles, injection exposure in SOQL and Apex, and session handling. The step closes when every planned test case is marked as completed, blocked or out of scope, with the reason recorded for any gap.
Validate each finding before reporting
Salesforce requires the customer to make reasonable efforts to validate all findings before reporting them. The tester reproduces each suspected issue on the in-scope org, records the account, profile and data conditions used, and removes false positives. Salesforce's Secure Coding Guidelines, the Trailhead module on mitigating SOQL injection and its session security documentation are useful references for confirming a result. The step closes when each finding has reproduction steps a client engineer can follow, and any issue classified as High is flagged for immediate reporting under the agreement.
Report findings with severity and evidence
The provider writes a report that lists each validated finding with its affected component, the weakness category, severity, evidence, business impact and recommended fix. The report states the scope, the test window, the tools and techniques used, and the limits of the test. It also states that an assessment is not a certification or warranty that Salesforce services are secure, and that the client is responsible for interpreting the results. The step closes when the client has accepted the draft and the High findings have been submitted through Salesforce's security contact page.
Retest fixes and close the findings
After the client applies fixes, the tester repeats the original test cases against the changed configuration and records whether each finding is resolved, partially resolved or still open. Retesting uses the same evidence standard as the first pass, so the result can be shown to an auditor or customer. The step closes with a retest addendum that lists each finding, its status and the date and version of the configuration tested. Confirm with the provider whether retesting is included in the agreed scope or priced separately.
Which techniques Salesforce permits and which it bans
The Salesforce Security Assessment Agreement gives you a wide range of permitted methods, so the first decision is which of them your test will use. The agreement allows a combination of commercial off-the-shelf tools and manual inspection, including review of details such as hidden form fields. It also covers penetration and analysis services using either intrusive or passive techniques. Your provider should state in the scope which of these categories it will apply to each part of the environment, and why. A tester who can only describe tools by name, without saying whether a check is passive or intrusive, has not yet agreed the test with you.
Timing and prohibited activity are the limits you must write into the rules of engagement. Automated testing is restricted to the window from Friday 21:00 PST through Sunday 23:59 PST, so any scanning or automated fuzzing must be planned inside that period, and the scope document should name the exact start and end times. The agreement also prohibits denial of service, privilege escalation and lateral movement. It rules out testing Salesforce IP addresses and testing lead capture, sign-up and contact forms. Confirm with your provider how it will prove that a finding is in your own environment and not in shared Salesforce infrastructure, and what it will do if a check looks like it could affect availability.
Read the current agreement text before you sign a statement of work, because the restrictions are what your auditor and your provider will test against. Ask the provider to map each planned test category to a clause in the agreement and to name the person who approves any exception. Where a test idea falls outside the permitted list, the right response is to drop it or agree a different method in writing, not to proceed and explain later. Salesforce requires validated findings to be submitted through its security contact page, so keep a record of the timing and content of every automated run.
Which weakness categories a Salesforce test checks and why they matter
This table lists the weakness categories a Salesforce penetration test typically examines, what each looks like inside an org, and why it matters to the business. Read it as a scoping checklist: each row is a question to confirm with the tester before work starts. The main takeaway is that most high-impact Salesforce findings come from configuration and access decisions, not from code alone.
| Category | What it looks like in a Salesforce org | Why it matters to the business |
|---|---|---|
| Sharing model and record access | Org-wide defaults set too broadly, sharing rules or role hierarchy granting users records outside their function, or manual sharing left in place after reorganization | Users can read or change customer, financial or patient records they have no business need to see, which becomes a data exposure and privacy issue |
| Profile and permission set misconfiguration | Profiles or permission sets granting create, edit or delete rights on sensitive objects, or broad 'modify all data' style permissions assigned to non-administrative users | Excess privilege widens the impact of any compromised account and is often hard for auditors to justify against least-privilege expectations |
| Session security settings | Session timeout, IP restrictions, login hours, or multi-factor requirements that are weaker than the org's own policy or were never set for high-risk profiles | Weak session controls allow stolen sessions to persist and make it harder to show that access control matches the organization's written policy |
| Injection risks in SOQL and Apex | Apex code or dynamic SOQL that concatenates user input into queries instead of using bind variables, reviewed against Salesforce's Secure Coding Guidelines and the Trailhead module on SOQL injection | Injection can return or change records beyond the user's intended access, and it is a recurring category in secure code reviews |
| Insecure Experience Cloud guest access | Guest user profiles with read access to objects or fields that were meant for internal use, or public pages that expose records without a login | Unauthenticated users can reach data that customers or the public should never see, often without anyone noticing because the site appears to work normally |
| Hidden field exposure | Fields hidden in page layouts or Lightning pages that remain readable through the API, reports or list views, or sensitive values sent to the browser even when not displayed | Hiding a field in the interface does not restrict access to it, so sensitive data may leak through channels the business does not monitor |
| Integration authentication | Connected apps, named credentials or third-party integrations using long-lived tokens, shared service accounts or overly broad OAuth scopes | Integrations often run with high privilege and outside normal user reviews, so a weak integration credential can become the easiest route into the org's data |
How a finding moves from discovery to customer-ready report
The path starts with a scoping agreement that sets what may be tested and when, then moves to testing inside the permitted window using commercial tools and manual inspection. Each candidate finding is validated against Salesforce's own resources before it is written up. High findings are reported to Salesforce immediately, and the customer report goes out only after validation, with a retest once fixes are in place. Check that every finding in the report traces back to a validated, in-scope test.
Finding path from scoping through validation to the customer report and retest.
How findings are validated and reported back to Salesforce
Under the Salesforce Security Assessment Agreement, the customer, not the tester, carries the validation duty. Before anything goes to Salesforce, the customer must make reasonable efforts to validate every finding. In practice this means reproducing each issue in the customer's own environment, confirming the affected object, field, profile or integration is the one named in the report, and discarding results that come from scanner noise or a misread configuration. Salesforce's own references for this work are its Secure Coding Guidelines, the Trailhead module on mitigating SOQL injection, and its session security settings documentation. Use these as the baseline when deciding whether a session timeout, IP restriction or sharing rule finding is real, and ask the tester to cite the specific setting that produced each result.
Severity drives the timing. Salesforce requires the customer to report all vulnerabilities classified as High immediately, so the test plan should agree a severity scale before testing starts and name who on the customer side receives High findings during the test window, not only at the final report. Validated findings are submitted through Salesforce's security contact page. Confirm the current submission route and the contact details on the Salesforce help pages at the time of testing, since these are the controlling instructions rather than anything summarized here.
Finally, the report is the customer's document to interpret. Salesforce states that an assessment is not a certification or warranty that its services are secure, and that the customer is solely responsible for interpreting the results. Ask the tester to separate confirmed issues from items needing further review, and to state which findings were reproduced and which were inferred. Agree in writing who decides whether a finding is accepted, mitigated or risk-accepted, and who signs off the remediation evidence that goes to an auditor or customer. A tester can describe what was observed, but the decision on what it means for your risk position stays with your team.
How the test differs by Salesforce environment and architecture
The production org holds live customer and business records, so it carries the most operational risk and the most conditions. Since 31 January 2023, Salesforce customers no longer need prior approval to run security assessments of their Salesforce environment, but the test must still follow the Salesforce Security Assessment Agreement. Testing against production means the tester's activity can touch real records, real users and real business processes, so the rules of engagement should be written with that in mind.
- Data handling: Agree in writing how test accounts, records and generated data are created, labeled and removed, and who approves any action that changes business data.
- Automated testing window: Automated testing is restricted to Friday 21:00 PST through Sunday 23:59 PST, so schedule any scanning inside that window and confirm the time zone with the customer.
- Prohibited activity: Denial of service, privilege escalation and lateral movement are not permitted, and lead capture, sign-up and contact forms are excluded.
- Monitoring and alerting: Ask the admin which security monitoring and alerts will fire during the test so the security operations team does not treat the test as a live incident.
- Reporting path: Any validated High vulnerability must be reported to Salesforce immediately through its security contact page.
Before testing, confirm with the Salesforce admin which profiles, permission sets and integrations are live, and document the agreed test accounts and their access.
A sandbox is a copy of the org used for development, testing and training. It is usually the safer place for intrusive or high-volume work, but it is not automatically in scope or free of rules. A sandbox can hold production-derived data, carry the same configuration and customizations as production, and still be connected to external systems. The agreement governs any assessment of the Salesforce environment, so a sandbox does not remove the prohibitions or the testing window.
- Configuration parity: Confirm with the admin how closely the sandbox matches production, since findings in a sandbox may not reflect the live org.
- Data origin: Ask whether the sandbox contains copied production records, and agree how personal data is handled during testing.
- Connected endpoints: Check whether the sandbox points to live external services, because testing it could affect those systems.
- Sandbox type and refresh: Confirm which sandbox is in scope and whether a refresh is planned during the test window, since a refresh can remove test accounts and evidence.
- Findings mapping: Agree how findings in a sandbox are labeled in the report so the customer can tell whether the same weakness exists in production.
Ask the admin for a written description of the sandbox's configuration and data origin before scoping, and record the sandbox name in the rules of engagement.
Experience Cloud sites expose parts of a Salesforce org to people outside the company, such as customers, partners or applicants. That public surface changes who can reach the test target and what an unauthenticated or low-privilege user can see. The sites use Salesforce-hosted infrastructure and the configured guest and member access settings, so the tester must confirm which pages, guest permissions and forms belong to the customer's configuration and which are excluded by the agreement.
- Guest and member access: Ask the admin to list guest user profiles, sharing settings and the permissions granted to each site role before testing.
- Excluded forms: Lead capture, sign-up and contact forms are prohibited targets, so mark them out of scope on any site that uses them.
- Authenticated testing: Agree which test user accounts are provided, their roles and how they are disabled after testing.
- Site-level scope: Confirm each site by name and URL, because a single org can host several sites with different configurations.
- Hosted infrastructure: Salesforce IP addresses are not to be tested, so the scope should cover the customer's configuration on the site, not the underlying infrastructure.
Confirm with the admin the list of sites, their access model and any forms that must be excluded, then write these into the scope document.
Most Salesforce environments connect to other systems through APIs, middleware, identity providers and data pipelines. These connected systems often hold their own credentials and data flows, and they are usually owned by a different team or vendor. The Security Assessment Agreement covers the Salesforce environment, so an integration that sits outside Salesforce needs its own permission from its owner before it is tested. Testing an integration may also send traffic to a third party's infrastructure, which the Salesforce agreement does not authorize.
- Ownership: Identify who owns each connected system and obtain written permission from that owner before any test traffic reaches it.
- Data flows: Map which records move in and out, and which connected app or credential handles each flow.
- Authorization boundaries: Confirm which connected app permissions and named users the integration uses, since privilege escalation is prohibited.
- Middleware endpoints: Agree whether the test covers the middleware's own web or API interfaces, which fall under the web and API testing rules rather than the Salesforce agreement.
- Traffic volume: Confirm whether an integration relies on scheduled jobs or batch calls that the test could disrupt, and schedule around them.
Ask the admin for an inventory of connected apps and integration owners, and do not begin testing any integration until its owner has confirmed the scope in writing.
Which public standards define a web application test, and how they apply to Salesforce
Two public references shape most Salesforce penetration tests, and they do different jobs. The OWASP Web Security Testing Guide is a testing resource written for web application developers and security professionals, and it is an OWASP Flagship Project. It gives the tester the test cases themselves: how to examine authentication, session handling, input handling, authorization and client-side behavior, organized so a result can be traced back to a named test. For a Salesforce org, the guide applies most directly to the Lightning and Experience Cloud pages, custom Visualforce or Lightning components, and any community or portal the customer exposes to outside users. Ask the provider which guide sections they will run against each of those surfaces, and whether each test case will be recorded as covered, not applicable or not tested.
NIST SP 800-115, the Technical Guide to Information Security Testing and Assessment published in January 2008, works one level above the test cases. It is a planning framework: it sets out how to define the scope, the rules of engagement, the testing techniques, the analysis of results and the reporting. Its structure is the most useful reference when a buyer's auditor asks how the test was planned and why the findings can be trusted. Confirm that the provider's test plan maps its phases to that structure, and that the rules of engagement agreed with the customer are written down before testing starts.
Where a Salesforce customer has built custom Apex, REST or SOAP integrations, middleware or connected applications, the server-side logic behind them can be verified against OWASP ASVS (Application Security Verification Standard), version 5.0.0. ASVS lists security requirements that a web application or service should meet, so a tester can check each integration endpoint against a defined set of requirements rather than an open-ended list. Salesforce's own platform controls are not verified this way, since they belong to Salesforce. Agree at scoping which custom components fall under ASVS and which are configuration of the platform, and ask the provider to show how each ASVS requirement tested will be recorded in the report.
Salesforce penetration testing questions buyers ask before hiring
Do we need Salesforce's approval before a penetration test?
No prior approval is needed. Since 31 January 2023, Salesforce customers can run security assessments of their own Salesforce environment without asking first, but they must follow the Salesforce Security Assessment Agreement. That agreement sets the testing window, the prohibited activities and the reporting route, so the rules become your rules of engagement. Before work starts, confirm the agreement version in force with your Salesforce account team and write its conditions into your statement of work. Testing that breaks the agreement can be treated as a policy violation even though no approval step was skipped.
How long does a Salesforce penetration test take?
Duration depends on the size and shape of the org, not on a fixed rule. The main drivers are the number of custom Apex classes, Lightning components, Experience Cloud sites, integrations and profiles and permission sets that need role-based testing, plus how many user roles must be tested. Automated scanning is limited to the weekend window in the agreement, which can shape the calendar. Salesforce publishes no standard duration, so ask the provider to show how it estimated effort from your scope and to state which assumptions the estimate depends on.
What does our team need to prepare before testing starts?
Most of the preparation is documentation and access planning. Expect to provide:
- A written scope listing the orgs, sites, integrations and user roles to be tested
- Test user accounts with the profiles and permission sets each role needs, plus a named contact for account lockouts
- The list of forms, sign-up and lead capture pages that the agreement excludes, so the provider avoids them
- Confirmation of the testing window, the escalation contact and the process for reporting High findings
- Recent configuration exports or a sandbox copy where production testing is not appropriate
Agree these items in writing before the first test, because missing access is one of the most common causes of delay.
Can our internal team run a Salesforce penetration test ourselves?
Your team can run an assessment under the agreement, because approval is no longer required. The agreement allows commercial tools and manual inspection, including hidden field examination, along with penetration and analysis techniques. The practical question is skill and independence: the people who configured the org are less likely to spot their own assumptions, and you must still validate findings, report all High vulnerabilities immediately and submit validated findings through Salesforce's security contact page. Ask whether you have staff who can test authorization across profiles, review Apex and SOQL code, and document reproduction steps to the standard your auditor expects.
Does a Salesforce penetration test certify that our org is secure?
No. Salesforce states that an assessment is not a certification or warranty that its services are secure, and that the customer is solely responsible for interpreting the results. A penetration test is a point-in-time sample of the tested scope, at the time it was run, against the scope and rules agreed. It can show that specific weaknesses existed and how to fix them, but it cannot show that the whole org is free of weaknesses. If someone asks for a certificate, ask instead for the scope statement, the method used, the findings with severity and the retest results.
How do we use a Salesforce penetration test in a customer security questionnaire?
Use the report as evidence of a tested scope and a documented remediation process, not as a blanket statement of security. Customer questionnaires often ask whether testing was performed, when, by whom, against what scope and whether high-severity findings were closed. Answer those points directly from the report, state the testing window and methods, and attach the retest evidence. Confirm with your auditor or customer which evidence they accept, since DeployOpen prepares evidence and independent auditors or certification bodies issue any formal assessment or attestation.
What should a Salesforce penetration test report include?
A useful report states the scope, the rules of engagement followed, the testing methods and tools, and each finding with its severity, affected component, reproduction steps and recommended fix. It should also say which findings were validated, which were excluded and why. The Salesforce Security Assessment Agreement expects validated findings to be reported, and High findings reported immediately. Check that the report separates confirmed issues from scanner output, and that it includes a retest section showing which fixes were verified. For the full report contents, see the Salesforce penetration testing report topic.
How DeployOpen scopes, tests, reports and retests Salesforce environments
DeployOpen treats a Salesforce penetration test as a fixed-scope engagement that starts with written rules of engagement. We test within the Salesforce Security Assessment Agreement, document findings in a form your team can reproduce and fix, and retest the issues you choose to remediate. Our Salesforce work sits alongside our wider security testing and compliance readiness services.
How we scope
- We confirm which Salesforce org, sandbox or Experience Cloud site is in scope and who owns each one.
- We agree in writing which test types apply, such as manual inspection, hidden field examination and commercial tooling.
- We map the agreed timing to the Salesforce weekend automated testing window and exclude prohibited tests, including lead capture and sign-up forms.
How we build
- We run the test in phases: discovery of the org configuration, access control and sharing review, then exploitation-free validation of suspected weaknesses.
- We cover the Salesforce-specific areas named in the agreed scope, such as SOQL and query handling, session settings and profile and permission sets.
- We check each candidate finding against Salesforce secure coding guidance before we record it, so the report holds only validated issues.
How we hand over
- Each finding includes severity, affected component, reproduction steps at a defensive level and a concrete remediation path.
- We flag any High severity issue for immediate reporting, as the Salesforce agreement requires, and record how each finding was validated.
- The report states that an assessment is not a certification or warranty, so your team and auditors read the results in context.
How we support
- Our fixed-scope engagements include a retest of the findings you select once fixes are in place.
- Ongoing support, configuration reviews and continuous testing are available as a retainer after the initial test.
- We agree the retest scope and deliverables in writing before work begins, so the next cycle is planned and not improvised.

