From the Salesforce security review point of view for the the app exchange app, we need to add the access checks while querying and doing DML operations. If we have a requirement that the SOQL/DML needs to be done irrespective of the user's permissions, then we can use the without sharing class.
But let's say we have an inherited class, whose running mode will be defined by the calling class. In this case, how we can correctly add the access checks for SOQL/DML? The class will run in the system mode or user mode depending upon the calling class and we don't want to add the access checks when it is getting called from the class that is marked as without sharing. Is there any methods to identify the class running mode?
Or we don't need to add the access checks when we marked the class as inherited class? Can we add the false/positive for the same?