function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pratik Raut 14Pratik Raut 14 

Parameter Tampering error - Checkmarx

Hi All,
In the code scanning, I am facing the Parameter Tampering issue.
Scan Result:
User-added image
Can anyone please provide me any solution on this?

Thanks,
Pratik
Raj VakatiRaj Vakati
If you store the value in the varibale and use it you will get the error 
in your case you are storing  the torderId from the URL param and using in query that is causing an issue .. 

Please try like this it will go 
 
taskOrder = [select Id from FedCap_Opportunity__c where Id =:ApexPages.currentPage().getParameters().get('tid')];


 
Pratik Raut 14Pratik Raut 14
Hi All,
In the code scanning, I am facing the Parameter Tampering issue in the get/set variables and local variables.
Scan Result:
User-added image
Here, recordTypeId is a local variable. Sample code:
Id recordTId  = apexpages.currentpage().getparameters().get('recordTId');
if(recordTId != Null){
    recordTypeId = (''+recordTId).substring(0,15);
}

User-added image
Here, agency is a get/set variable.
public String agency{get;set;}
Can anyone please provide me any solution on this?

Thanks,
Pratik