Run Code analysis take a long time for Angular Project

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) - * Enterprise Edition Version 9.2.4 (build 50792)
  • what are you trying to achieve - Reduce the biuld time for PR Scans
  • what have you tried so far to achieve this - Excluded files that need not be scanned.

We have an angular project where the Run Code Analysis step takes 40-50 mins. With too many PR’s that need to be approved before merge in to trunk - this time obviously is unacceptably high.

I did go through this post:

and did similar analysis whereby I can see:

Sensor TypeScript analysis [javascript] (done) | time=267624ms
Sensor JsSecuritySensor [security] (done) | time=1973815ms (32 Mins).

As per this post: Disabling JsSecuritySensor on feature branches?

This issue was supposed to have been fixed in Version 9.1 while ours is 9.2.4.

Can somone help me with this?

Hello @Mihir_Mehta, welcome to our community.

In order to investigate, could you share the logs of an analysis and the contents of the ucfg2 folder, found under .scannerwork? The directory contains our intermediate program representation we use for security analysis and will help us debug this issue. It is derived from the original source code, however it cannot be used to reconstruct the original - we discard all information from it which is irrelevant for our security analysis. You can send it to me by a private message on this forum.



Hello Gyula,

I am afraid I am unable to find the .scannerwork folder

Here the logs:
Run Code Analysis (1.0 MB)

Hello @Mihir_Mehta,

Thank you for the logs. You can find the .scannerwork folder in the directory from which SonarScanner is running, in this case on the CI machine. Alternatively, you can try to execute SonarScanner locally and find the directory there.



I have been able to find the folder but facing some issues extracting it from our server on the Azure cloud. Its a big folder 150 MB. Once am able to extract it - i’ll try and upload a zip of it. Am on leave for the next couple of days so this might take some time.

I’ve been able to download the ucfg2 folder and zipped it and the size of the zip is 45 MB so am not able to upload it. Is there some other way i can share it?