Skip to content

Installing sonarqube on a github self hosted runner in aws linux server

0

I want to install sonarqube on a github linux self hosted runner which has been installed on my aws linux server which only has a private ip address and which is of t2.medium instance size.

When I run pipeline in github actions using the runner, it should analyse the code quality and give feedback

How to do this in the best possible way with maximum security and without any cost?

If anyone has done a similar setup, would appreciate a step by step detailed solution on how to implement it

asked a month ago65 views

1 Answer
0

Hello.

If minimizing costs is the only priority, I believe you could set this up for the price of a single EC2 instance by running SonarQube—using Docker, for example—on an EC2 instance configured as a GitHub Actions self-hosted runner.
If they are running on the same EC2 instance, you should be able to access them via localhost.
https://hub.docker.com/_/sonarqube

However, the GitHub documentation below states that there is a risk of permanent compromise by untrusted code executed within the workflow; therefore, from a security perspective, I think it is better to host it on a separate EC2 instance or similar, even though this entails additional costs.
https://docs.github.com/en/actions/reference/security/secure-use?learn=getting_started&learnProduct=actions#hardening-for-self-hosted-runners

Self-hosted runners for GitHub do not have guarantees around running in ephemeral clean virtual machines, and can be persistently compromised by untrusted code in a workflow.

EXPERT

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.