Github Actions integration reporting success when there are Sonar failures

ALM: Github

CI system: Github Actions

Scanner command used when applicable: this is my github actions build.yml
push:
branches:
- main
pull_request:
types:
[opened, synchronize, reopened]
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v6
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

and for sonar settings:

  • enable issue annotations: true
  • enable summary content: true
  • automatic anaysis: false

Languages:

across several languages + repositories + projects

Error observed/Steps to reproduce:

i see the github action to upload to sonarcube called in every PR and in the regular build. i see the PR triggered in sonar and the analysis runs normally. however, when sonar fails, it does not report back to github actions. furthermore, it does not comment on the PR. everything from sonar is always shown as successful in github.

the odd part is that this initially worked fine - we changed our github organization name a few weeks ago, and we updated the sonarcloud github integration, and it shows successful “connected” messages in settings - however, this failure reporting issue persists.

not sure what else to try - we may have to halt our subscription if this is not resolved and go with a different vendor for SCA, integration with github actions is a must

Hey there.

Is your project properly bound?

If so – as a troubleshooting step, you might try to change the binding and then switch it back, and see if that kicks the behavior back where it should be. That’s not to say we have nothing to fix, but it’ll help narrow down some possibilities. :slight_smile:

1 Like

Hello, thanks for the response!

It was bound, but re-binding as you said by switching and then switching back did the trick! Thank you!

One bug that I noticed, very minor:

When I go to New → Analyze New Project → Don’t see your repo? Check your GitHub app configuration. → Click link to check configuration, it redirects to our old organization name, which is invalid and produces a 404 in GitHub.

Not urgent, but curious if there’s a way to refresh our org name somehow too! Tried connecting a new org with the new org name, but produced an error that it’s already joined and didn’t change any behavior that I could see.