Getting an HTTP 403 error when running a GitHub Action

I’ll put in the answers I can, as best I can, in-line:

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension) : SonarQube 2026.5.2.132813
  • how is SonarQube deployed: zip, Docker, Helm : (I am not sure)
  • what are you trying to achieve: I’m trying to get GitHub’s Dependabot working in the repo’s GitHub Workflow. Note that this worked fine, a couple weeks ago when I last used it. We’re using a GitHub Self-Hosted Runner on one of our Windows Servers, which worked 2 weeks ago
  • what have you tried so far to achieve this: All I’ve done is enabled Dependabot Alerts, Dependency Graph, and Malware Alerts in the repo’s Settings

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

Here is a snipper from the GitHub Action showing the HTTP 403 error. This happened in the Build and analyze step:

Run D:\actions-runner_work_temp\scanner\dotnet-sonarscanner begin /k:“OUR-GITHUB-DOMAIN_BasicBlazor_178d9a00-8481-4012-8cef-41124c336fa3” /d:sonar.token=“${env:SONAR_TOKEN}” /d:sonar.host.url=“${env:SONAR_HOST_URL}”
D:\actions-runner_work_temp\scanner\dotnet-sonarscanner begin /k:“OUR-GITHUB-DOMAIN_BasicBlazor_178d9a00-8481-4012-8cef-41124c336fa3” /d:sonar.token=“${env:SONAR_TOKEN}” /d:sonar.host.url=“${env:SONAR_HOST_URL}”
dotnet build .\BasicBlazor\BasicBlazor.slnx
D:\actions-runner_work_temp\scanner\dotnet-sonarscanner end /d:sonar.token=“${env:SONAR_TOKEN}”
shell: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.EXE -command “. ‘{0}’”
env:
SONAR_TOKEN: ***
SONAR_HOST_URL: ***
JAVA_HOME: D:\actions-runner_work_tool\Java_Zulu_jdk\17.0.20-8\x64
JAVA_HOME_17_X64: D:\actions-runner_work_tool\Java_Zulu_jdk\17.0.20-8\x64
SonarScanner for .NET 12.0
Using the .NET Core version of the SonarScanner for .NET
Pre-processing started.
Preparing working directories…
09:39:33.277 Updating build integration targets…
09:39:33.537 Using SonarQube 2026.5.2.132813.
09:39:34.338 Fetching analysis configuration settings…
09:39:34.350 WARNING: To analyze private projects make sure the scanner user has ‘Browse’ permission.
Unhandled exception. System.Net.Http.HttpRequestException: Response status code does not indicate success: 403.
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at SonarScanner.MSBuild.PreProcessor.WebClientDownloader.TryDownloadIfExists(Uri url, Boolean logPermissionDenied)
at SonarScanner.MSBuild.PreProcessor.SonarQubeClient.SonarQubeBase.DownloadComponentProperties(String component)
at SonarScanner.MSBuild.PreProcessor.SonarQubeClient.SonarQubeBase.DownloadProperties(String projectKey, String projectBranch)
at SonarScanner.MSBuild.PreProcessor.PreProcessor.FetchArgumentsAndRuleSets(SonarQubeBase client, ProcessedArgs args, BuildSettings settings)
at SonarScanner.MSBuild.PreProcessor.PreProcessor.DoExecute(BuildSettings buildSettings, ProcessedArgs localSettings)
at SonarScanner.MSBuild.PreProcessor.PreProcessor.Execute(IEnumerable`1 args)
at SonarScanner.MSBuild.BootstrapperClass.PreProcess()
at SonarScanner.MSBuild.BootstrapperClass.Execute()
at SonarScanner.MSBuild.Program.Execute(String args, IRuntime runtime)
at SonarScanner.MSBuild.Program.Main(String args)
at SonarScanner.MSBuild.Program.(String args)

Hey @RodAtDOH, it looks like the SonarQube token that the scanner is using during the analysis doesn’t have Browse and Execute Analysis permissions over that particular project or is expired. It’s getting a 403 when running some API call (we can’t see which call specifically in your logs, we would need debug-level scanner logs for that). In any case, your best bet is to:

  • Create a new token, making sure it has Browse and Execute Analysis permissions over this project.
  • Configure it in your GitHub repo to be used by the scanner instead of this one, typically accomplished with a repository secret named SONAR_TOKEN.