# Getting an HTTP 403 error when running a GitHub Action

**URL:** <https://community.sonarsource.com/t/getting-an-http-403-error-when-running-a-github-action/190334>\
**Category:** SonarQube Server / Community Build\
**Tags:** dotnet\
**Created:** [October 20, 2026, 4:37pm UTC](https://community.sonarsource.com/t/getting-an-http-403-error-when-running-a-github-action/190334 "2026-10-20T16:37:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RodAtDOH](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@RodAtDOH](https://community.sonarsource.com/u/RodAtDOH)\
**Post date:** [October 20, 2026, 4:37pm UTC](https://community.sonarsource.com/t/getting-an-http-403-error-when-running-a-github-action/190334/1 "2026-10-20T16:37:58Z")

</div>

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

Must-share information (formatted with [Markdown](https://commonmark.org/help/)):

- 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)

---

<div class="post-metadata">

**Author:** ![andres](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/andres/32/76342_2.png) [@andres](https://community.sonarsource.com/u/andres)\
**Post date:** [October 23, 2026, 10:07am UTC](https://community.sonarsource.com/t/getting-an-http-403-error-when-running-a-github-action/190334/2 "2026-10-23T10:07:15Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [October 30, 2026, 10:07am UTC](https://community.sonarsource.com/t/getting-an-http-403-error-when-running-a-github-action/190334/3 "2026-10-30T10:07:49Z")

</div>

Closed on October 30, 2026, 10:07am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
