From 381d1975f063b6977e102d2c9d519ea9e2354f42 Mon Sep 17 00:00:00 2001 From: "rmotta.net:~#" <114815819+rmottanet@users.noreply.github.com> Date: Sat, 24 Jan 2026 17:08:15 -0300 Subject: [PATCH 1/4] feat(workflows): add sonarqube workflow for ci/cd --- .github/workflows/sonar.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/sonar.yml diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml new file mode 100644 index 0000000..507a485 --- /dev/null +++ b/.github/workflows/sonar.yml @@ -0,0 +1,19 @@ +name: Build +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] +jobs: + sonarqube: + name: SonarQube + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 221cd595f4a9be5c72cf3afe378731546a9ba888 Mon Sep 17 00:00:00 2001 From: "rmotta.net:~#" <114815819+rmottanet@users.noreply.github.com> Date: Sat, 24 Jan 2026 17:09:42 -0300 Subject: [PATCH 2/4] feat(workflows): create sonar-project.properties for sonarcloud setup Add initial SonarCloud configuration for the project --- sonar-project.properties | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..b68d52b --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,14 @@ +sonar.projectKey=rmottanet_gitnap +sonar.organization=rmottanet + + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=gitnap +#sonar.projectVersion=1.0 + + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +#sonar.sources=. + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8 From 20402b8ee522deb5328800833954095ed06fd020 Mon Sep 17 00:00:00 2001 From: "rmotta.net:~#" <114815819+rmottanet@users.noreply.github.com> Date: Sat, 24 Jan 2026 17:16:12 -0300 Subject: [PATCH 3/4] feat(workflows): add quality gate status badge to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9edcf4d..30efad4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=rmottanet_gitnap&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=rmottanet_gitnap) + # GitNap: Bash Script Collection ## ctrl+s :v: From 89e2a20ab488631c4cfc2ce9764fce4c6de3f9c4 Mon Sep 17 00:00:00 2001 From: "rmotta.net:~#" <114815819+rmottanet@users.noreply.github.com> Date: Sat, 24 Jan 2026 17:22:00 -0300 Subject: [PATCH 4/4] fix(workflows): potential fix for code scanning alert no. 10 workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/sonar.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 507a485..94f1a9e 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -5,6 +5,8 @@ on: - main pull_request: types: [opened, synchronize, reopened] +permissions: + contents: read jobs: sonarqube: name: SonarQube