From 0616cf910781aafea747dfecb14716e54ba21ae4 Mon Sep 17 00:00:00 2001 From: 0x5t4l1n Date: Tue, 8 Sep 2026 13:07:16 +0530 Subject: [PATCH 1/2] ci: consolidate duplicate SonarQube workflows, add quality gate check build.yml (added by the SonarCloud onboarding wizard) and sonarcloud.yml both scanned on the same push/PR triggers, which would run two competing analyses against the same project. Keep build.yml's SHA-pinned actions and add the missing quality-gate-action step, which is what actually fails the job (and therefore blocks merging) when the SonarCloud quality gate fails - sonarqube-scan-action alone always exits 0 once it uploads results, regardless of gate outcome. --- .github/workflows/build.yml | 5 +++++ .github/workflows/sonarcloud.yml | 32 -------------------------------- 2 files changed, 5 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/sonarcloud.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e68b148..94788d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,3 +17,8 @@ jobs: uses: SonarSource/sonarqube-scan-action@7006c4492b2e0ee0f816d36501671557c97f5995 # v8.1.0 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: Quality Gate Check + uses: SonarSource/sonarqube-quality-gate-action@7a5fffe8e523c40e0c740b6bc2712ab503e52efa # v1.2.0 + timeout-minutes: 5 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml deleted file mode 100644 index 78b250b..0000000 --- a/.github/workflows/sonarcloud.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: SonarCloud Code Analysis - -on: - push: - branches: [main] - pull_request: - types: [opened, synchronize, reopened] - -permissions: - contents: read - pull-requests: read - -jobs: - sonarcloud: - name: SonarCloud - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: SonarCloud Scan - uses: SonarSource/sonarqube-scan-action@v4 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - - name: Quality Gate Check - uses: SonarSource/sonarqube-quality-gate-action@v1 - timeout-minutes: 5 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From bb952b3c6ae5cc23a23bde734e0cbaf2956e8daf Mon Sep 17 00:00:00 2001 From: 0x5t4l1n Date: Tue, 8 Sep 2026 13:09:45 +0530 Subject: [PATCH 2/2] fix: use real SonarCloud organization and project key Placeholders (CHANGE_ME_org-key / CHANGE_ME_0x5t4l1n_AURHub) caused the scan to fail immediately since no such org/project exists. Values taken from the SonarCloud onboarding wizard's own generated config. --- sonar-project.properties | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index 4104e69..3547d04 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,9 +1,6 @@ # SonarCloud project configuration. -# Replace sonar.organization / sonar.projectKey with the values shown on your -# SonarCloud project's Administration > General Settings page after you -# import this repo at https://sonarcloud.io/projects/create -sonar.organization=CHANGE_ME_org-key -sonar.projectKey=CHANGE_ME_0x5t4l1n_AURHub +sonar.organization=0x5t4l1n +sonar.projectKey=0x5t4l1n_AURHub sonar.sources=backend,frontend/src sonar.exclusions=frontend/.vite/**,frontend/dist/**,**/__pycache__/**