Static analysis, security hotspots, duplication, and test coverage for src/, server/, and shared/.
| Item | Location |
|---|---|
| Project | sonarcloud.io/project/overview?id=RaminNietzsche_CVE-Radar |
| Config | sonar-project.properties (CI) |
| CI workflow | .github/workflows/quality-sonarcloud.yml |
| GitHub secret | SONAR_TOKEN |
| Coverage | npm run test:ci → coverage/lcov.info (Node node:test + V8) |
- Organization:
raminnietzsche - Project key:
RaminNietzsche_CVE-Radar - Open project dashboard
In SonarCloud → CVE-Radar → Administration → Analysis Method:
- Select CI-based analysis (GitHub Actions).
- Disable Automatic Analysis — required for CI. The workflow runs
scripts/disable-sonar-autoscan.shon each analysis; if it still fails, open Administration → Analysis Method and turn off Automatic Analysis manually.
- SonarCloud → My Account → Security
- Generate Token — name e.g.
github-actions-cve-radar - Type: Global Analysis Token or Project Analysis Token for
RaminNietzsche_CVE-Radar - Copy the token (shown once).
Web UI: Settings → Secrets → Actions → New repository secret → name SONAR_TOKEN
CLI (from maintainer machine):
gh secret set SONAR_TOKEN --repo RaminNietzsche/CVE-Radar
# paste token when promptedVerify:
gh secret list --repo RaminNietzsche/CVE-Radar | grep SONAR_TOKENgh workflow run quality-sonarcloud.yml --repo RaminNietzsche/CVE-RadarOr push a change under src/ / server/ / tests/.
Require check SonarCloud Code Analysis on main after the first green run.
- Workflow:
Quality / SonarCloud— job SonarCloud Code Analysis - Triggers: PR/push to
main(app paths);workflow_dispatch - Steps: token check → checkout (full history) →
npm ci→npm run test:ci→ verifycoverage/lcov.info→ Sonar scan → Quality Gate - Missing token: job fails with link to this doc and Actions secrets page
- PR decoration: requires
pull-requests: writeonGITHUB_TOKEN(configured in workflow)
npm run test:ci
# Optional — requires SonarScanner CLI + SONAR_TOKEN in env:
sonar-scanner| Symptom | Action |
|---|---|
sonar.projectKey, sonar.organization missing |
Ensure sonar-project.properties exists at repo root (not .sonarcloud.properties). |
SONAR_TOKEN is not set |
Complete step 4 above. |
| 0% coverage | Run npm run test:ci first; confirm coverage/lcov.info and sonar.javascript.lcov.reportPaths. |
| Duplicate PR comments | Disable Automatic Analysis in SonarCloud (step 2). |
| CI + Automatic Analysis conflict | Error: running CI analysis while Automatic Analysis is enabled — run scripts/disable-sonar-autoscan.sh or disable in SonarCloud UI. |
| Python “all versions” warning | Set sonar.python.version=3.12 in sonar-project.properties (CI arg also passed). |
| Quality Gate failed | Run failed step Quality Gate details in the workflow log. Common: new_reliability_rating — fix bugs in SonarCloud dashboard. |
| PLSQL data dictionary warning | Project uses PostgreSQL migrations, not Oracle. sonar-project.properties sets sonar.plsql.file.suffixes=pks,pkb and excludes server/db/migrations/**. Do not configure Oracle JDBC — rules S3641/S3921/S3618/S3651 are N/A. |
| Workflow skipped | Path filters — run workflow_dispatch or touch app paths. |
- ACTIONS-SECRETS.md
- Workflows README · quality/README.md
- CODECOV.md — complementary coverage dashboard
- security-codeql.yml — complementary SAST