We’ve been facing a persistent issue with JS taint analysis in SonarQube.
One of our repositories takes over an hour to complete the scan and even started taking 24 hours after which we reverted some of the code, while other repositories finish within 1–2 minutes.
We are running SonarQube Developer Edition v2025.4.1 via Helm on Kubernetes, and we’ve already tried the following steps:
• I have raised a community support earlier as well for the same repo which was resolved by enabling jasmin sensor and then it used to take 30-40 mins, but it again increased to 60 mins now. link
• Tried increasing heap size where scan is running to 10GB, no difference in scan time
Despite these efforts, the scan time hasn’t improved.
Need help in analyzing why it is taking 60 min now and why taint analysis time increased to 24 hours after 1 new file addition
First, can you try allocating more memory, using sonar.javascript.node.maxspace? A minimum of 4Gb is recommended, but for larger projects you may need more.
Thanks for those details. On the face of it, 179 lines doesn’t seem egregious, but I suppose each of those lines is … heavy.
BTW, I’ve since learned that while having a tsconfig.json can make the regular JS analysis more efficient, it has no impact on the taint analysis pass.
Anyway, this is flagged for the experts. Hopefully they’ll be along soon.
What module system does it use? imports? requires?
Does it contain any dynamic imports (e.g. import or require inside of control flow, such as if-else or loops)?
Does it attempt to perform tricky reflection or instrumentation operations of some sort ?
In your first message, you said adding a file made the analysis time increasing to 24h,
was this file ts or js or something else ? does one of the questions above relate to the added files?
Do you have, by any chance, the capacity to analyse this project on a test server were you could change the analyser version ?
What module system does it use? imports? requires? - require
Does it contain any dynamic imports (e.g. import or require inside of control flow, such as if-else or loops)? - no
Does it attempt to perform tricky reflection or instrumentation operations of some sort ? - no
The file we added was a JS file but we removed it due to long scan time, none of the question relates to that added file.
we can create test server but cannot scan using it as we have single License key based on server ID
thank you for you answers and taking the time to investigate with us.
Sadly you answers does not allow us to pinpoint the corner case with certainty.
Since 2025.4.1 we did a lot of improvement on JS/TS taint analysis engine, to contain abnormally long analysis times.
Until you can upgrade, one possible workaround is to create a specific Quality profile for this project, for Javascript and Typescript language, with the following rules disabled: