I run the checkmarx scanner for app and received ~250 FLS issues, which is understood, because when the app developed it simply was not checked.
However I have noticed that there are lots of cases that the code doesn't check the FLS but the scanner didn't report.
At first I thought it reach some limit number in the FLS section and therefore doesn't report everything, but after fixing most of the reported FLS, I run the scanner again and there are only few FLS left (custom setting that cannot be checked). Meaning, there are lots of places that are not being checked or reported.
Does someone know what are the conditions/cases that the scanner doesn't report FLS issue? Can I rely on this for the security review? Should I run scanner with other tools? Any suggestion for other tools?
**
- Update
** after scanning with the PMD tool, it reported some FLS that was not reported by checkmarx scanner, but still lots of cases was not reported or cases reported which should not been.
-It seems that PMD is not reporting FLS when using Database.update/insert/upsert. -Both PMD and checkmarx doesn't report FLS error when update map.values. e.g:
map<Id, Account> accountMap = new map<Id, Account>();
for(Account acc :accountList ){
accountMap.put(acc.Id, acc);
}
update accountList.values();
-PMD does not identify FLS was checked if the check is being done in other function (checkmarx know to identify it and does not report it) e.g:
if(MySecurityEnforcer.isUserAllowed('update', accountList)){
update accountList;
}
Probably I could go on and check each case and identify why it was/not reported, but I realize that due to the complexity of the process such tools are not perfect. I decided to overview all the code myself and add the FLS before any dml action.