External issues ignored

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube enterprise 9.9.1, scanner 5.0.1
  • how is SonarQube deployed: zip, Docker, Helm
    Docker
  • what are you trying to achieve
    Scan the report json file and display the items from issues array
  • what have you tried so far to achieve this

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

In my project we use a external analyser which generates a report in json, I’m try to scan the report and show it in sonarqube but when I’m scanning I get error like:
“External issues ignored for 1 unknown files, including:/file/path/filename.mp”
and other report also throws similar error.
I’m running the scanner in different location just with the report.json file with me.
I use docker sonarscanner.
Although the file extension is not supported by sonar, and I don’t have the project files (I have only the report.json file with me), I need to run the scanner and extract the content from issues report json file and display it.
can anyone please help me?

Hi,

Welcome to the community!

This simply isn’t going to work. Analysis attaches issues to files. Without the files, there’s nowhere to attach the issues.

 
Ann

Ok, let say Even if I have access to the files, they are not recognized by the SonarQube, the files that I work with has different extensions and those languages/files are not recognized by sonar, but we have a external analyzer that generates the issues report json for sonarqube. can you plz suggest any work arounds?

Hi,

Try setting your file extensions in the Secrets “Language” in the List of file path patterns to include.

 
HTH,
Ann

But I use sonar 9.9 I don’t see secrets lang support in the 9.9 docs… Does it support?

Hi,

Ah. Secrets detection was added in 10.3.

 
Ann

Yeah, so can I do something else with my version?

Hi,

Your other option is to create a plugin to recognize and analyze your language. Upgrading would be easier. :smiley:

 
Ann

Any docs or guides I can refer to for the development of custom lang plugin? Also I have an analysed report of the files just need help in figuring out how to attaches issues to files…

Hi,

There are not. Your best bet is to look at an open-source analyzer and follow its pattern.

Really, your best bet is to upgrade.

 
Ann

Figured a way for attaching issues with files, but now struggling with scanning files under .dir folder,
basically scanner is ignoring the folders that begin with “.” any suggestions?

Hi,

Check your analysis log. Are those files ignored by your SCM? If so, analysis is likely ignoring them too.

 
Ann

No those files are tracked in git, it’s just scanner is ignoring them.

Hi,

If you want to dig into that you should create a new thread with all the details.

 
Ann

will do that, Thanks!!