Hi,
after I've updated from SonarQube 5.4 to 5.6 and from Java 7
to Java 8 for both the sonar-maven-plugin and the SonarQube server
itself, Sonar reports violations of FindBugs Security rules that I
suppressed in the code before.
(I've also updated the Java plugin from 3.13.1 to 3.14, but that's probably unrelated, right?)
It seems the following pattern for suppressing a violation in the code does not work anymore:
@SuppressWarnings("findsecbugs:COMMAND_INJECTION")
public static int execute(String command) throws IOException, InterruptedException {
Process p = Runtime.getRuntime().exec(command);
...
Instead I have to use // NOSONAR now to suppress it, e.g.
public static int execute(String command) throws IOException, InterruptedException { Process p = Runtime.getRuntime().exec(command); // NOSONAR
...
Using // NOSONAR is definitely not so nice, because it not only suppresses the mentioned rule but all Sonar rules.
Is this a new bug in Sonar? Is there a JIRA issue for this or can you open one? Thank you.
Cheers,
Andreas
ps: Suppressing violations in the SonarQube UI is no option for us. We want to have these in the source code.