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
arun thakurarun thakur 

checkmarx :APEX CURD and FLS issues

Hi Guys,

 

We got an error that our code not Enforced SF CRUD and FLS(http://wiki.developerforce.com/index.php?title=Enforcing_CRUD_And_FLS) from Checkmarx report. we could not found anything wrrong in the code. please help me to resolve this issue,

---------------------------------------------
public class DefaultValues
{
public void SetDefaultValues()
{
if(Account.sObjectType.getDescribe().isCreateable())

if (Schema.sObjectType.Account.fields.Name.isCreateable() &&Schema.sObjectType.Account.fields.Description__c.isCreateable() && Schema.sObjectType.Account.fields.ObjectType__c.isCreateable() && Schema.sObjectType.Account.fields.EnabledStatus__c.isCreateable() )
{
List<Account> ListAccont=new List<Account>();
Account ObjAccountExact=new Account();
ObjAccountExact.Name='1st Pass - Strict';
ObjAccountExact.Description__c='Acct Name, Phone & City Exact';
ObjAccountExact.ObjectType__c='account';
ObjAccountExact.EnabledStatus__c='false';
ListAccont.Add(ObjAccountExact);
insert ListAccont;

}
}

}

 

Vinita_SFDCVinita_SFDC
arun thakurarun thakur

Hi 

 

I checked all the referenced links but they were not helpful to resolve my code issue..  

LSKozLSKoz
Is it an error? Or is it just a warning?

You only have to worry about the critical and serious errors. The warnings are something of best practices. Not to be ignored, but not to worry about.
arun thakurarun thakur

Throwing critical and serious errors:CRUD/FLS create issue with high Severity. 

 

 

 

Sridhar BonagiriSridhar Bonagiri
Hi Arun,

We are also facing the same type issues, have you got any resolution for these issues.

Regards,
Sridhar Bonagiri
Ghanshyam BhattGhanshyam Bhatt

Hi All,

I faced the same issue. I browsed various blogs and websites for solution.
So finally i decided a discussion with SFDC security Review team.

In intial discussion, they told that there may be some false positive reported.

As i will get more detail from them, then i will post here more.

Regards,
Ghanshyam Bhatt

Saleem Baba M DSaleem Baba M D

Hi All,

Did anyone find the solution to this, This is buring issue with one of my client.

Thanks,
SaleemBaba Mohammed

Saleem Baba M DSaleem Baba M D
@arun thakur, have you found any solution to this, because i'm also running with the same problem. If you have solution to it, Can you share it with me?

Thanks,
Saleem Baba
syed furqan 1syed furqan 1
This is a bit late for answer. Someone else might find it useful 
try this class to check fls by just passing query 

https://github.com/sonicfurqan/CheckCURDSalesforce.git