function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AshanAshan 

Security Review-Saring

Hi,

When i run a security review for my app it marks classes using without sharing keyword as serious security risk.

Does this mean that we cant use without sharing classes ?

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

It means only that you must explain your reasoning as to why you use "without sharing." There are times it is acceptable to ignore sharing, and those arguments are valid so long as there is a legitimate excuse. The warning is not an automatic failure of the Security Review, it only mentions that you should exercise caution in using this language feature.