I was not able to reproduce this behavior. Which scanner do you use? This information is set via properties by scanner, I think you should check the way how this link is provided (if it starts with the protocol for example) .
How did you configure the URL to your sources? It seems that it is defined as github.com/project instead of https://github.com/project. SonarQube uses the provided URL as given. If it’s a relative URL like github.com/project then it will appear relative to the SonarQube server. (This is just standard HTML behavior.)
If you don’t know where you specified the URL, I suggest to search in your sources, for example git grep -w github.com/project to find the location, and change it to be a complete URL with https:// prefix.
It could come for example from sonar.links.scm. It can also be detected from other properties defined within build.gradle or other configuration files of Gradle. It’s not easy to pinpoint all the possible places. I will update this thread when I have more accurate information but that will take time. You may find the location faster yourself by searching in your code as I suggested in my previous comment.
Thank you for the explanation.
I’m sorry to say, but I can no longer reproduce this issue. I don’t remember which project was affected but I remember clearly that of all relevant properties I could find there was an absolute URL prefixed with http:// so it wasn’t clear to me why this became an issue in SQ.
I can only confirm that we never construct this URL from parts. That is, we never take some part of it from somewhere, and then decide to add https:// or not. We look for a value specified by sonar.links.scm or other, and use it as is. So the solution is always going to be in the project’s configuration.