Java rule keys recently changed and no longer use the “squid” prefix. Can you check on the Rules pages if the rule S2068 still have the “squid” prefix on your SQ DE 8.2?
In all cases, I suggest you upgrade your Java analyzer to the v6.3 which has better performance. That won’t resolve your ignore security hotspots problem but at least your installation will run better.
Dumb mistake on my part: I had just copied “squid” from the example. It should have been “javascript”, but I’m still getting the security hotspot reports for these files.
Now I’ve got the analysis scope configured like this:
Were you able to find out the solution? I have been trying to do the same for javascript (node specifically) but unable to get any proper result. The hotspots are still showing up in Sonar
The rule S2068 is not supposed to run on test files. I believe the scan is not properly configured. Test files should be identified using the property sonar.tests and main files using sonar.sources.
Here is an extract from the documentation:
When you do that, only rules dedicated to tests will be executed on test files and the rule S2068 will be only executed on main files … and as a consequence you will have nothing to ignore.
I’m having the same issue - I don’t think that the rule not supposed to be being run on tests is an acceptable solution, there are other scenarios where this is required for example Sonarcloud is showing a false positive for rule https://sonarcloud.io/organizations/workivate/rules?languages=js&open=javascript%3AS5332&q=http on my SVG components because of the xmlns="http://www.w3.org/2000/svg" xml namespace.
to my .sonarcloud.properties file but this does not remove the hotspots.
I also added the same rule manually within the sonarcloud UI and this did not work either - when do these settings take effect, is it during the next scan? It would be good if after changing the scope a new analysis was triggered so I could actually see if my changes are having an effect.