Used software:
SonarQube Developer Edition 9.9.1 LTS
Sonar-scanner 4.8.0.2856
Jenkins 2.387.3 LTS
SonarQube Scanner for Jenkins plugin 2.15
SonarQube deployed inside Kubernetes with Docker image
Hi Community. We are using SonarQube in our CI infrastructure and faced with weird behaviour of security hotspot resolution status retaining. Please help us to understand the root of this SonarQube behaviour.
In project, as a new code definition for a branches we are using Reference Branch
and it points to master
.
The example of how the issue workflow looks like is below:
- Security hotspot was merged into
master
from somefeature/Previous_Feature_Brach
branch. - During SonarQube analysis of
master
branch, SonarQube detected the security hotspot “Make sure using this hardcoded IP address “1000::70” is safe here”. - Next, we marked the security hotspot as a
safe
. - Next we created a new feature branch
feature/Feature_Branch
frommaster
branch. - During the analysis of the
feature/Feature_Branch
SonarQube detects the security hotspot marked as asafe
and it is seen in activity (Sensitive data was changed):
## Recent activity:
* May 4, 2023 at 11:14 AM
The issue has been copied from branch 'master' to branch 'feature/Feature_Branch'
**user1** -April 29, 2023 at 12:29 PM
Resolution changed to SAFE
Status changed to REVIEWED (was TO_REVIEW)
* April 29, 2023 at 1:47 AM
The issue has been copied from branch 'feature/Previous_Feature_Brach' to branch 'master'
**user2@users.noreply.github.com** created Security Hotspot-April 28, 2023 at 1:42 PM
- Next, another feature branch
feature/another_feature_branch
was created frommaster
but in another date. - During SonarQube analysis of
feature/Another_Feature_Branch
, SonarQube detects the same security hotspot “Make sure using this hardcoded IP address “1000::70” is safe here” but it has statusTO REVIEW
:
###Recent activity:
user2@users.noreply.github.com
created Security Hotspot
-
June 8, 2023 at 10:35 AM
- We changed the issue status as
safe
and push thefeature/Another_Feature_Branch
intomaster
branch. - During the analysis of
master
branch, SonarQube found the same security hotspot “Make sure using this hardcoded IP address “1000::70” is safe here” despite that we already set it’s status as asafe
previously and we need to change the security hotspot resolution tosafe
again:
## Recent activity:
**user3** -June 10, 2023 at 1:56 PM
Resolution changed to SAFE
Status changed to REVIEWED (was TO_REVIEW)
* June 9, 2023 at 1:47 AM
The issue has been copied from branch 'feature/Another_Feature_Branch' to branch 'master'
**user2@users.noreply.github.com** created Security Hotspot-June 8, 2023 at 10:35 AM
What we expect:
- If the security hotspot was marked as a
safe
it should retain it’s status to another branches crated frommaster
. - If the security hotspot was marked as a “safe” in
master
branch before, it should’t create the same security hotspot with.
Please help to find solution to solve this weird SonarQube behaviour.
Great thanks for advice!