Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLS validation is missing for [UPDATE] operation on [Program_Case_Task__c] with field(s) [Unknown] #1706

Open
ChWeiHeng opened this issue Dec 30, 2024 · 1 comment
Labels
SFGE Issues related to the Salesforce Graph Engine

Comments

@ChWeiHeng
Copy link

Have you verified this is Salesforce Code Analyzer specific?

Yes

Description

I have a method in Apex for updating and creating custom object data, but when I added field permission validation for others, I did not scan any errors when adding data. However, when updating, I tried to place validation for all fields or in other classes, but the results were still the same
1735525648722
1735525667055(1)

Output / Logs

CodeAnalyzerDFA.csv

Steps To Reproduce

I encountered this error during the second step of running the scanning code

Expected Behavior

My expected result was to pass the code analyzer's detection normally, but he gave me incorrect information

Operating System

Window11

Salesforce CLI Version

@salesforce/cli/2.67.7 win32-x64 node-v22.11.0

Code Analyzer Plugin (@salesforce/sfdx-scanner) Version

@salesforce/sfdx-scanner 4.7.0 Uninstalled JIT Plugins: community 3.3.2 custom-metadata 3.3.37 dev 2.5.0 devops-center 1.2.26 env 3.0.33 functions 1.23.0 signups 2.6.1 @salesforce/sfdx-plugin-lwc-test 1.2.1

Additional Context (Screenshots, Files, etc)

No response

Workaround

Set permission verification for all fields, save methods to other Apex classes, and scan to separate the added and updated methods into different methods

Urgency

High

@stephen-carter-at-sf stephen-carter-at-sf added the SFGE Issues related to the Salesforce Graph Engine label Dec 30, 2024
@jfeingold35
Copy link
Collaborator

@ChWeiHeng , I'm not sure I understand the issue. It sounds like you're saying that replacing the first codeblock with the second one introduces a new violation that you feel is incorrect. Do I have that right?
If so, could you please post the contents of the PublicUtils.checkFieldUpdate method so we can see what it's doing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SFGE Issues related to the Salesforce Graph Engine
Projects
None yet
Development

No branches or pull requests

3 participants