Sonarqube upload


Can any one please help me.

I’ve use case to import the issues only from one sonarqube and export to another sonarqube, it’s basically to avoid the source code being uploaded to sonarqube. I tried using /api/issues to download the issues in the json format. and now not sure how to export. I tried using sonar-scanner with that issues json but that was not successful because of the json missing a few fields. can any one please help how to achive this?


Hello @brittosj, welcome to our Community :slight_smile:


Whatever method you use, you won’t be able to do this. You can’t have issues on code that does not exist on SQ. Basically, issues are reported on a specific location (piece(s) of code, on a specific line(s), on a specific file(s)), if the location disappears, so does the issue.

I’m curious, why would you need to do that?


Thanks Antoine for the response.

It’s because of the contractual agreement, we shouldn’t share the code to the third party but just need to share the sonarqube test results only.


Hmm, ok. In that case you can use the JSON export to build your own external report (CSV, PDF, etc.) or even use it as is. It has all someone need to take action (well, without the code context and nice UI ofc).

Look for example at It returns all information about each issues, including the precise location(s). You don’t really need to import this back into another SQ instance.

Would that help?