You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
PMD incorrectly does not report the need for validation of CRUD permissions before SOQL SELECT statements that directly populate Map objects.
Code Sample demonstrating the issue:
This method queries data and directly populates a Map object and no CRUD validation error is shown (incorrect):
Affects PMD Version:
7.0.0-rc3
Rule:
ApexCRUDViolation - https://pmd.github.io/pmd/pmd_rules_apex_security.html#apexcrudviolation
Description:
PMD incorrectly does not report the need for validation of CRUD permissions before SOQL SELECT statements that directly populate Map objects.
Code Sample demonstrating the issue:
This method queries data and directly populates a Map object and no CRUD validation error is shown (incorrect):
This method also queries data but doesn't populate a Map - PMD does report a CRUD validation error (correct):
Expected outcome:
PMD should report a violation when doing a SOQL SELECT statement directly into a Map object.
Running PMD through: VSCode using https://marketplace.visualstudio.com/items?itemName=chuckjonas.apex-pmd (v0.6.2)
The text was updated successfully, but these errors were encountered: