Skip to content

SCANJLIB-334 Warn when sonar.host.url overrides SonarQube Cloud URL properties - #314

Merged
damien-urruty-sonarsource merged 2 commits into
masterfrom
task/dam/SCANJLIB-334-warn-host-url-overrides-scanner-urls
Oct 12, 2026
Merged

damien-urruty-sonarsource merged 2 commits into
masterfrom
task/dam/SCANJLIB-334-warn-host-url-overrides-scanner-urls

Conversation

@damien-urruty-sonarsource

Copy link
Copy Markdown
Contributor

Summary

  • Log a warning in ScannerEndpointResolver when sonar.host.url is defined together with sonar.scanner.sonarcloudUrl and/or sonar.scanner.apiBaseUrl, since only the host URL is used to resolve endpoints (including API URL for engine download)
  • Add unit tests covering the warning and the no-warning case

@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

SCANJLIB-334

@damien-urruty-sonarsource
damien-urruty-sonarsource marked this pull request as ready for review October 10, 2026 09:42
@damien-urruty-sonarsource
damien-urruty-sonarsource requested a review from a team as a code owner October 10, 2026 09:42
@damien-urruty-sonarsource
damien-urruty-sonarsource force-pushed the task/dam/SCANJLIB-334-warn-host-url-overrides-scanner-urls branch from 042f754 to 0d36c1e Compare October 12, 2026 07:46
@sonarqube-next

Copy link
Copy Markdown

@damien-urruty-sonarsource
damien-urruty-sonarsource merged commit 358ca6e into master Oct 12, 2026
11 checks passed
@damien-urruty-sonarsource
damien-urruty-sonarsource deleted the task/dam/SCANJLIB-334-warn-host-url-overrides-scanner-urls branch October 12, 2026 08:00
@gitar-bot

gitar-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Adding a warning when sonar.host.url overrides Cloud URL properties changes scanner logs and could flag intentional mixed configurations; endpoint selection remains unchanged.

Adds a warning in ScannerEndpointResolver when sonar.host.url is set alongside sonar.scanner.sonarcloudUrl or sonar.scanner.apiBaseUrl, since only the host URL is used to resolve endpoints. Unit tests cover both the warning and the no-warning case. No issues found.

Verification Repos 4 inspected

Functional validation No results

Rules No rules evaluated

Broader impact Repos 4 inspected
Cross-repo 4 repositories inspected 0 open impacts

SonarSource/sonar-scanner-cli Inspected
SonarSource/sonar-scanner-maven Inspected
SonarSource/sonar-scanner-gradle Inspected
SonarSource/sonar-scanner-cargo Inspected

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants