Open illarionova opened 6 months ago
Thanks for raising @illarionova! That specific rule likely needs to be updated to match current best practices - we are aware there are some gaps between how rules are setup and the latest best practice.
These days we recommend using User Mode for queries and database operations as per our docs
We are currently working on overhauling our core Code Analyzer architecture to make it easier for us to help you understand which rules align with the latest best practice, which will likely lead to us contributing updates to rules in engines such as PMD later in the year / early next year.
This issue has been linked to a new work item: W-15703310
Related ticket in the PMD repo https://github.com/pmd/pmd/issues/4997
I am trying to check for object-level delete permission on a custom object before performing a DML delete operation on it.
The check is performed as it is shown in documentation here: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_perms_enforcing.htm.
I'm running the check through:
sf scanner run --format csv --outfile CodeAnalyzerGeneral.csv --target ./ --category Security
And getting ApexCRUDViolation.
I'm using @salesforce/sfdx-scanner@latest-beta version 4.1. I also tried with the version 3.23.