Skip to content

ci: skip the sonarqube scan when the token isn't there - #74

Merged
crenshawdev merged 1 commit into
mainfrom
ci/sonar-skip-without-token
Nov 1, 2026
Merged

crenshawdev merged 1 commit into
mainfrom
ci/sonar-skip-without-token

Conversation

@crenshawdev

Copy link
Copy Markdown
Owner

The SonarQube scan now runs only when SONAR_TOKEN is available. Dependabot pull requests don't get Actions secrets, and the fork check from #70 let them through to a scan that failed with "Not authorized or organization not found", which is what failed the Coverage job on #72. A new step checks for the token and is the only step that receives it, and the cache and scan steps run only when it's there. Putting the token in the job's env would have been shorter, but it would hand the token to the cargo llvm-cov build and every dependency build script it runs.

So far the only check is that the workflow parses. This PR's own run should still scan, since it has the secret. #72 tests the skip once it's rebased onto this.

Dependabot pull requests don't get Actions secrets, and the fork check
let them through to a scan that failed without a token. The token now
goes only to a step that checks for it, not to the whole coverage job.
@sonarqubecloud

sonarqubecloud Bot commented Nov 1, 2026

Copy link
Copy Markdown

@crenshawdev
crenshawdev merged commit 952f978 into main Nov 1, 2026
5 checks passed
@crenshawdev
crenshawdev deleted the ci/sonar-skip-without-token branch November 1, 2026 14:33
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.

1 participant