Repository navigation
Add Sonar config parity checks and CI scan integration - #31
Conversation
|
Warning Review limit reached
Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughSonar exclusion scopes are expanded and checked for parity between local and Cloud configuration. The check runs through pre-commit, pre-push, and CI, while main-branch CI can run a token-gated SonarQube Cloud scan. Documentation and README status visibility are updated. ChangesSonar scope integration
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
231-233: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winDisable checkout credential persistence.
The static analysis warning identifies credential persistence on this checkout. No later step needs to push, so add
persist-credentials: falseto keep the GitHub token out of the repository configuration available to downstream commands and actions.Proposed fix
with: fetch-depth: 0 + persist-credentials: false🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 231 - 233, Update the actions/checkout step in the CI workflow to set persist-credentials to false alongside fetch-depth, ensuring checkout credentials are not retained for downstream commands or actions.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Line 228: Move SONAR_TOKEN out of the job-level env in cloud-scans-after-gates
and inject it only in the Sonar scan step. Retain a non-secret job-level
availability flag, and use the token-presence output or step condition to gate
the scan without exposing the secret to checkout, installs, tests, Codecov, or
Safety steps.
In `@scripts/check_sonar_properties.py`:
- Around line 18-25: Sanitize diagnostics throughout the property parsing and
validation flow: remove source filenames, paths, raw exception text, and
property keys from messages in the visible parsing logic and the related
exception/reporting branches. Retain only fixed descriptive messages plus safe
context such as line numbers or exception type, while preserving the existing
validation behavior.
---
Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 231-233: Update the actions/checkout step in the CI workflow to
set persist-credentials to false alongside fetch-depth, ensuring checkout
credentials are not retained for downstream commands or actions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: aabcb2e3-150b-49fe-a5bd-9bfaa7f700c2
📒 Files selected for processing (9)
.github/workflows/ci.yml.pre-commit-config.yaml.sonarcloud.propertiesCHANGELOG.mdREADME.mddev-docs/HARNESS_ENGINEERING.mdscripts/check_sonar_properties.pysonar-project.propertiestests/unittests/test_check_sonar_properties.py
What changed
scripts/check_sonar_properties.pyto verify the shared Sonar analysis-scope settings stay identical betweensonar-project.propertiesand.sonarcloud.properties.csv,tsv,xlsx,xls,json,db,sqlite,parquet) in both Sonar config files.Why
Summary by CodeRabbit
Quality & Security
Documentation