Hey @smcmanis ,
Thank you for your report and for the helpful log files! 
We recently rolled out a new JS/TS security analysis engine. It performs a substantially deeper and better analysis to detect security vulnerabilities than the old one, and this is why it takes longer.
In your first file (post-jasmin
), with the new sensor enabled, you can see:
Sensor JsSecuritySensorV2 [jasmin] (done) | time=466593ms
In the second file (pre-jasmin
), with the old sensor, you can see:
Sensor JsSecuritySensor [security] (done) | time=69237ms
Hence, the new security sensor takes 467s where the old one took 69s. I do understand that ~7x increase of the sensor time is far from ideal, and we are looking into this.
With the switch you used, sonar.jasmin.internal.disabled=true
, you can switch back to the old engine. In your third file (post-jasmin-jasmin-disabled
), the reported time is:
Sensor JsSecuritySensor [security] (done) | time=1809ms
This is substantially shorter than in the pre-jasmin
case, however, the sensor was not just skipped: It simply used analysis data that was available in the cache to give you a faster analysis.
You can see this in your third file (post-jasmin-jasmin-disabled
):
04:29:02.569 INFO 1868/1868 source files have been analyzed
04:29:02.570 INFO Hit the cache for 1854 out of 1868
04:29:02.571 INFO Miss the cache for 14 out of 1868: FILE_CHANGED [14/1868]
That is, in this case, only 14 out of 1868 needed to be re-analyzed. For the rest, cached data was used. This is why it was so fast.
In your second file (pre-jasmin
), you can see the cache was not used, so the old sensor did a full run:
05:40:32.397 INFO 1867/1867 source files have been analyzed
05:40:32.398 INFO Hit the cache for 0 out of 1867
05:40:32.399 INFO Miss the cache for 1867 out of 1867: ANALYSIS_MODE_INELIGIBLE [1867/1867]
I can’t be sure why the cache was not used in this case. It is possible that this was not a PR analysis, but a branch analysis, and this is why the cache was not used. Another possibility: At the same time as the new JS/TS security sensor was released, we also made some improvements to the caching mechanism (this is independent of the new sensor): It may also be that it was not correctly working before for some reason.
All in all, with sonar.jasmin.internal.disabled=true
, you should be fine, though. If you want to double-check the timings with the caching mechanism disabled, you can disable it with sonar.analysisCache.enabled=false
. Also see Incremental analysis setup & SonarQube.
I hope this helps you around the issue. 
I would be grateful if you could provide us with more information to help resolve your issue with the new JS security sensor. In particular, it would be very helpful if you could provide:
- For the
pre-jasmin
run: The contents of the .scannerwork
directory (according to your logs, in E:\projects\q\q\SharedWebUi\modules\.scannerwork
) if you still have it. You can zip it and send it to me as a PM.
- For the
post-jasmin
run: If possible, would it be possible for you to provide (also via PM) an unredacted version of the logs? Seeing the file names might provide us with some clue into what the problem might be.
With this information, I would be happy to take a deeper look into what might be the problem in your case. 