forcedotcom / sfdx-scanner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] InternalExecutionError has been thrown when running sf scanner run dfa

Jellybean0708 opened this issue · comments

Have you tried to resolve this issue yourself first?

Yes

Bug Description

An InternalExecutionError error has been thrown during run sf scanner dfa.
Here is code.
image

Output / Logs

"3","3","D:\PMS e-cloudsoft\ec-print-gitee\eDocument DX-master\force-app\main\default\classes\ECP_DataMappingCtrl.cls","359","26","ECP_DataMappingCtrl","getDataSourceMapping","","","","InternalExecutionError","Graph Engine identified your source and sink, but you must manually verify that you have a sanitizer in this path. Then, add an engine directive to skip the path. Next, create a Github issue for the Code Analyzer team that includes the error and stack trace. After we fix this issue, check the Code Analyzer release notes for more info. Error and stacktrace: UnexpectedException: ArrayLoadExpression{properties={FirstChild=true, BeginLine=364, DefiningType_CaseSafe=ecp_datamappingctrl, LastChild=false, DefiningType=ECP_DataMappingCtrl, EndLine=364, childIdx=0, BeginColumn=47}}: com.salesforce.graph.symbols.PathScopeVisitor.afterVisit(PathScopeVisitor.java:761);com.salesforce.graph.symbols.DefaultSymbolProviderVertexVisitor.afterVisit(DefaultSymbolProviderVertexVisitor.java:737);com.salesforce.graph.vertex.ArrayLoadExpressionVertex.afterVisit(ArrayLoadExpressionVertex.java:58);com.salesforce.graph.ops.expander.ApexPathExpander.performAfterVisit(ApexPathExpander.java:577);com.salesforce.graph.ops.expander.ApexPathExpander.visit(ApexPathExpander.java:536);com.salesforce.graph.ops.expander.ApexPathExpander.visit(ApexPathExpander.java:523)","https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/apexflsviolation-rule.html","InternalExecutionError","sfge"

Steps To Reproduce

Run the below command with sf scanner extension:
sfdx scanner run dfa --format csv --outfile CodeAnalyzerDFA.csv --target="./" --projectdir="./" --category="Security" --sfgejvmargs "-Xmx10g" --pathexplimit -1 --rule-thread-count 2 --rule-thread-timeout 3600000

Expected Behavior

The result should show the code issue instead of the Internal Execution error.

Operating System

Windows 11

Salesforce CLI Version

@salesforce\cli\2.42.6 win32-x64 node-v20.12.2

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

@salesforce/sfdx-scanner: 4.3.2

Java Version

java version "17.0.9" 2023-10-17 LTS

Additional Context (Screenshots, Files, etc)

No response

Workaround

No response

Urgency

Low

Duplicate of 1497.