I wanted to see Sonarqube detection capabilities on security side as a SAST. I installed Sonarqube 7.6 Developer edition with demo license.
And used Webgoat.net project that born to be vulnerable. It has many vulnerabilities like XSS, SQLi, RCE etc.
The projects:
The result was worse than expected.
Hardcoded passwords, ReDos(Regex Dos) as blocker and also
Cookie with httponly flag and dangerous eval usage issues found.
You should use SonarQube 7.7 DE because it adds 11 injection vulnerability rules on top of the existing Vulnerabilities and Security Hotspots.
WebGoat.NET is a very special benchmark because there are multiple clones of it and I’m not sure to know which one is the “official” one.
On SonarSource’s side, we are analyzing this version: https://github.com/rapPayne/WebGoat.Net which received recently some commits. But there is also:
On my side, I did not manage to find a full list of all the vulnerabilities that are in the WebGoat.Net project.
If you have such list, I’ll be happy to look at it.
I’m using SonarAnalyzer.CSharp Version=7.14.0.8411 (latest available as nuget package) (https://www.nuget.org/packages/SonarAnalyzer.CSharp/) directly as an analyzer in visual studio. I also ended up using WebGoat (https://github.com/rapPayne/WebGoat.Net) as a benchmark for sanity check on using sonar analyzer to checkout how it works (I start using sonar very recently).
Likewise @enderhb, I’ve got very few feedbacks on security and vulnerabilities. Issue S3330 (Cookies HttpOnly property should be true) was the only security-related issue I got, even though this project should have plenty of security issues (on SQL queries, for example, like @Alexandre_Gigleux posted above).
@Alexandre_Gigleux suggested the usage of sonarqube 7.7. I’m not using sonarqube, but I’m using the latest available C# analyzer (I believe it’s the same sonarqube uses on the background, can I assume that?). So I’m up to date with newer rules.
Does anyone knows why can’t I get the same outputs (like reporting issues on sql queries)? Can it be only versions mismatching?