# Sonaqube scan action (Github) v4.0.0 failing - wget command not found

**URL:** <https://community.sonarsource.com/t/sonaqube-scan-action-github-v4-0-0-failing-wget-command-not-found/130834>\
**Category:** SonarQube Server / Community Build\
**Tags:** github-actions\
**Created:** [November 21, 2024, 5:43am UTC](https://community.sonarsource.com/t/sonaqube-scan-action-github-v4-0-0-failing-wget-command-not-found/130834 "2024-11-21T05:43:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![varunrocks6](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/varunrocks6/32/64360_2.png) [@varunrocks6](https://community.sonarsource.com/u/varunrocks6)\
**Post date:** [November 21, 2024, 5:43am UTC](https://community.sonarsource.com/t/sonaqube-scan-action-github-v4-0-0-failing-wget-command-not-found/130834/1 "2024-11-21T05:43:37Z")

</div>

**Failure due to this change:** [Comparing v3.0.0...v4.0.0 · SonarSource/sonarqube-scan-action · GitHub](https://github.com/SonarSource/sonarqube-scan-action/compare/v3.0.0...v4.0.0#diff-bfb7d592c6282cb14a155e99385bf5d2910cc05a1bfff536b6fb1cfe75ff0691R29)

**Details:** Sonar scan action fails to run on Github self-hosted runners which use this helm-chart [actions-runner-controller/charts/gha-runner-scale-set at master · actions/actions-runner-controller · GitHub](https://github.com/actions/actions-runner-controller/tree/master/charts/gha-runner-scale-set) with image: [Package actions-runner · GitHub](http://ghcr.io/actions/actions-runner:latest)

_This image doesn’t have wget but because of the sonar scan action changes, there’s a failure._ Since this dependency is added implicitly, there’s no way to fix other than adding wget package prior to using sonar scan action.

**Proposed fix:** `curl` is availble in self-hosted runner image? so you can check if wget is not available, then fail back to curl.

---

<div class="post-metadata">

**Author:** ![antonio.aversa](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/antonio.aversa/32/40757_2.png) [@antonio.aversa](https://community.sonarsource.com/u/antonio.aversa)\
**Post date:** [November 21, 2024, 1:35pm UTC](https://community.sonarsource.com/t/sonaqube-scan-action-github-v4-0-0-failing-wget-command-not-found/130834/3 "2024-11-21T13:35:56Z")

</div>

Hi @varunrocks6,  
Thank you for reporting this issue: it helps us stabilize the `v4` of the GitHub action.

As you correctly pointed out, `wget` is now missing. The previous version of the action was based on a Docker image that had all the dependencies baked into it.

When we moved from Docker to a composite action, we tested the behavior with all [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners) and didn’t encounter issues since those come with `wget` preinstalled and available in the path.

That is, unfortunately, not the case in your GitHub self-hosted runner.  
We are exploring options, including the one that you suggest (using `curl`). We need to be careful since, with the introduction of `v4`, we now want to support all major Operating Systems, not just Linux, and different OS may have different tools available by default.

We have created [a ticket](https://sonarsource.atlassian.net/browse/SQSCANGHA-55) in our tracking system, that you can use to track our progress on the issue.

If you are available to test, we can share a working solution with you before the final release. That would greatly help us to validate the fix before releasing the new version.

Waiting for the fix to be available, you can:

- either stay on the previous major version: `v3.0.0` is still fully functional
- or install the `wget` and ensure it’s in the path, before running the action

Hope this helps address your issue,  
Antonio

---

<div class="post-metadata">

**Author:** ![georgekaz](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/georgekaz/32/63882_2.png) [@georgekaz](https://community.sonarsource.com/u/georgekaz)\
**Post date:** [November 22, 2024, 9:14am UTC](https://community.sonarsource.com/t/sonaqube-scan-action-github-v4-0-0-failing-wget-command-not-found/130834/4 "2024-11-22T09:14:16Z")

</div>

Curl is on the ubuntu self hosted runners and also is installed on the Windows self hosted runner image. wget is on neither, so curl does seem like the correct solution to this problem. Right now we are having to install wget before we run the sonarqube action.

---

<div class="post-metadata">

**Author:** ![antonio.aversa](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/antonio.aversa/32/40757_2.png) [@antonio.aversa](https://community.sonarsource.com/u/antonio.aversa)\
**Post date:** [December 2, 2024, 10:08am UTC](https://community.sonarsource.com/t/sonaqube-scan-action-github-v4-0-0-failing-wget-command-not-found/130834/5 "2024-12-02T10:08:50Z")

</div>

Hi @varunrocks6 and @georgekaz,  
Good news! We have just released `sonarqube-scan-action@v4.1.0`, which should fix your issue.

We now fallback to `curl` when `wget` is not available.

You can read more about the new release of the action [here](https://github.com/SonarSource/sonarqube-scan-action/releases/tag/v4.1.0).

Give it a try and let us know if that fixes your problem.

Best regards,  
Antonio

---

<div class="post-metadata">

**Author:** ![varunrocks6](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/varunrocks6/32/64360_2.png) [@varunrocks6](https://community.sonarsource.com/u/varunrocks6)\
**Post date:** [December 2, 2024, 1:12pm UTC](https://community.sonarsource.com/t/sonaqube-scan-action-github-v4-0-0-failing-wget-command-not-found/130834/6 "2024-12-02T13:12:40Z")

</div>

Hi Antonio - Thank you for the quick turnaround, have removed the workaround of installing wget & confirm that the new version is working.

---

<div class="post-metadata">

**Author:** ![georgekaz](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/georgekaz/32/63882_2.png) [@georgekaz](https://community.sonarsource.com/u/georgekaz)\
**Post date:** [December 4, 2024, 9:22am UTC](https://community.sonarsource.com/t/sonaqube-scan-action-github-v4-0-0-failing-wget-command-not-found/130834/7 "2024-12-04T09:22:12Z")

</div>

Excellent, thanks Antonio
