Example Responses to False Positives in Checkmarx Scan Results

The following example shows how to document your responses to false positives resulting from a Checkmarx scan. The example is in tabular format, but you can use whatever format suits the reporting of your information.

Reported VulnerabilityLocationResponse
FLS UpdatePaths 1–17We implemented and called the AuthManager class to check these paths for us or throw an error. You can see that in ControllerFile.cls on lines 241, 245, and 249.
FLS UpdatePaths 18–24Have been fixed and are valid.
FLS UpdatePaths 25, 26, and 30Are against our custom object UsageLog__c and not intended for user consumption. They are never exposed to users directly.
FLS UpdatePaths 27–29Must update the Account.NumberRelatedIssues__c field to appropriately count the new object created, irrespective of user input.
Sharing ViolationBatchCleanData.clsWe minimized the functions that this class calls to only the minimum set that requires without sharing.
Sharing ViolationLightningController.clsChanged declaration to with sharing.
Sharing ViolationGlobalIssueReporting.clsChanged to useinherited sharing because we don’t know which context our calling class requires.
Stored XSSIssue.page file: paths 1–3reportIssueList is a list of objectID + ’ ’ + integers. It poses no XSS risk.
Stored XSSIssue.page file: path 4Fixed by removing escape=”false”.
Stored XSSIssue.pageWe sanitized usageLog in JavaScript using the Salesforce SecureFilters library.