We are having a similar issue to what Ryan describes, which started occurring after our upgrade to SonarQube Enterprise 10.3. This is happening on both our test and production SonarQube instances. We do not have automatic user, group, and permission provisioning enabled with GitHub. We use SAML (via Pingfederate) to manage user authentication. We do have a DevOps platform integration configured with our self-hosted GitHub instances. Our Default visibility of new projects
is set to Public
.
This is the testing I’ve completed on our test instance and the results I’m seeing:
- Created a new public GitHub repository named
sonarqube-test
. A SonarQube scan is run via a GitHub Actions workflow step. For this example, the SonarScanner for Gradle plugin is being used
- A SonarQube project for
sonarqube-test
didn’t exist yet, so a new one was created
- Our
Default permissions template for projects
is applied, granting the expected access
- Problem: the Project visibility is set to
PRIVATE
, not the default PUBLIC
I enabled TRACE logging for this testing to get as much info as possible and have included what appear to be the relevant logs for this project creation. I redacted some info, replacing it with: {redacted description}
.
Web.log:
2024.01.05 15:46:00 INFO web[{redacted id}][o.s.s.a.w.GithubProjectCreatorFactory] DevOps configuration SonarQube auto-detected for project {redacted owner}/sonarqube-test
2024.01.05 15:46:00 TRACE web[{redacted id}][sql] time=10ms | sql=INSERT INTO components ( kee, uuid, uuid_path, branch_uuid, name, long_name, qualifier, scope, language, description, private, path, copy_component_uuid, enabled, created_at, b_changed, deprecated_kee, b_copy_component_uuid, b_description, b_enabled, b_language, b_long_name, b_name, b_path, b_qualifier ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, null, null, null, 0, null, null, null, null, null ) | params=com.{redacted namespace}:sonarqube-test, {uuid}, {uuid_path}, {branch_uuid}, sonarqube-test, sonarqube-test, TRK, PRJ, 12, 12, true, 12, 12, true, 2024-01-05 15:46:00.356
2024.01.05 15:46:00 TRACE web[{redacted id}][sql] time=5ms | sql=INSERT INTO projects ( kee, qualifier, uuid, name, description, private, tags, creation_method, created_at, updated_at ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ) | params=com.{redacted namespace}:sonarqube-test, TRK, {uuid}, sonarqube-test, 12, true, 12, SCANNER_API_DEVOPS_AUTO_CONFIG, 1704469560356, 1704469560356
Access.log:
{redacted IP} - - [05/Jan/2024:15:46:01 +0000] “POST /api/ce/submit?projectKey=com.{redacted namespace}%3Asonarqube-test&projectName=sonarqube-test&characteristic=devOpsPlatformUrl%3Dhttps%3A%2F%2F{redacted github url}%2Fapi%2Fv3&characteristic=devOpsPlatformProjectIdentifier%3D{redacted owner}%2Fsonarqube-test&characteristic=branch%3Dmaster&characteristic=branchType%3DBRANCH HTTP/1.1” 200 44 “-” “ScannerGradle/4.0.0.2929/Gradle 8.0.2” “{redacted id}”
One thing I noticed is that this log message is new: DevOps configuration SonarQube auto-detected
(our GitHub app is named “SonarQube”). I don’t see it present for project creation logs pre-10.3.
I’m assuming that this new log message is related to this change included in the full release notes for 10.3. However I haven’t been able to figure out why/how this is causing SonarQube to create new projects as PRIVATE
instead of PUBLIC
. Any guidance you can provide on this is appreciated, and please let me know if you need additional information from me. This issue is causing permissions problems with our applications that interact with SonarQube because their access is based on the projects being public.