Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG Sonarcloud not detected consistently #4237

Closed
matmair opened this issue Jul 12, 2024 · 4 comments
Closed

BUG Sonarcloud not detected consistently #4237

matmair opened this issue Jul 12, 2024 · 4 comments
Labels
check/SAST kind/bug Something isn't working

Comments

@matmair
Copy link

matmair commented Jul 12, 2024

Describe the bug
We have SonarCloud enabled on the repo for a long time now and got a full SAST score accordingly. Now the score is very low but we did not change anything in the settings.

Reproduction steps
Steps to reproduce the behavior:

  1. Enable SonarCloud
  2. Wait a few months
  3. Get full score
  4. Wait more?
  5. Get low score

Expected behavior
A full score as SonarCloud runs on every commit to master. Maybe also a better indication of which commits the tooling is missing / is detected to be missing.

Additional context
Latest scorecard run is here: https://github.com/inventree/InvenTree/actions/runs/9902504293/job/27356513547

@matmair matmair added the kind/bug Something isn't working label Jul 12, 2024
@spencerschrock
Copy link
Member

A full score as SonarCloud runs on every commit to master

Currently, Scorecard only awards points for SAST run on a PR before merge, not after merge.

Maybe also a better indication of which commits the tooling is missing / is detected to be missing.

At one time you could pass --show-details and --verbosity debug to see this, but I believe this was lost in the transition.

Here is what Scorecard currently sees for HEAD, looking back 30 commits at the PRs they came from.

PR:  7640  checked:  false
PR:  6772  checked:  false
PR:  7585  checked:  false
PR:  7630  checked:  false
PR:  7629  checked:  false
PR:  7626  checked:  false
PR:  7625  checked:  false
PR:  7620  checked:  false
PR:  7611  checked:  false
PR:  7614  checked:  false
PR:  7617  checked:  false
PR:  7619  checked:  false
PR:  7618  checked:  false
PR:  7616  checked:  false
PR:  7610  checked:  false
PR:  7609  checked:  false
PR:  7598  checked:  false
PR:  7596  checked:  true
PR:  7601  checked:  false
PR:  7599  checked:  false
PR:  7540  checked:  true
PR:  7595  checked:  false
PR:  7591  checked:  false
PR:  7590  checked:  true
PR:  7581  checked:  false
PR:  7584  checked:  false
PR:  7587  checked:  false
PR:  7588  checked:  true
PR:  7589  checked:  false
PR:  7586  checked:  false

@matmair
Copy link
Author

matmair commented Jul 13, 2024

Thank you for the information @spencerschrock, I will try to locate what changed in our SonarCloud config that PRs are not analysed anymore. Could the information how to find unanalyzed PRs be added to the doc section about SAST? I found that very helpful.

@matmair
Copy link
Author

matmair commented Jul 17, 2024

I have followed up on this and there was an issue with our SAST config/provider runs - the detections of scorecard were correct. Sorry for effort required to triage this

@matmair matmair closed this as completed Jul 17, 2024
@spencerschrock
Copy link
Member

I have followed up on this and there was an issue with our SAST config/provider runs - the detections of scorecard were correct. Sorry for effort required to triage this

No worries, I've made a note to make it easier to debug and document in a SAST/Code-Review troubleshooting steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
check/SAST kind/bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants