Skip to content

BUILD-11393: Fix check-sca failures caused by local-ref#258

Merged
bwalsh434 merged 1 commit into
masterfrom
bugfix/bwalsh/BUILD-11393-fix-constant-check-sca-failures-from-local-ref
May 15, 2026
Merged

BUILD-11393: Fix check-sca failures caused by local-ref#258
bwalsh434 merged 1 commit into
masterfrom
bugfix/bwalsh/BUILD-11393-fix-constant-check-sca-failures-from-local-ref

Conversation

@bwalsh434
Copy link
Copy Markdown
Contributor

@bwalsh434 bwalsh434 commented May 15, 2026

Context

What Changed?

  • Fixed by changing ref back to the full repo + action@master rather than local ref, as the local ref doesn't work when called from the ruleset.

@hashicorp-vault-sonar-prod
Copy link
Copy Markdown

hashicorp-vault-sonar-prod Bot commented May 15, 2026

BUILD-11393

@sonarqubecloud
Copy link
Copy Markdown

@bwalsh434 bwalsh434 marked this pull request as ready for review May 15, 2026 16:14
@bwalsh434 bwalsh434 requested a review from a team as a code owner May 15, 2026 16:14
Copilot AI review requested due to automatic review settings May 15, 2026 16:14
@sonar-review-alpha
Copy link
Copy Markdown
Contributor

sonar-review-alpha Bot commented May 15, 2026

Summary

This PR fixes check-sca workflow failures by reverting from a local action reference (./check-sca) to the full remote reference (SonarSource/ci-github-actions/check-sca@master).

The local reference approach doesn't work when the action is called from rulesets — the workflow engine can't locate the action.yml file at the relative path in that context. Using the full repo reference ensures the action resolves correctly regardless of where it's invoked.

The change also removes the sparse-checkout: check-sca step since the full repository reference no longer needs it.

What reviewers should know

What to review: This is a single YAML file change in .github/workflows/check-sca.yml — straightforward to verify.

Key context: The issue occurs because local action references (relative paths like ./check-sca) only work in the context of the repository where the workflow runs. When called from an external context like a ruleset, the path can't be resolved. The fix uses the canonical remote reference, which works consistently.

Check for: If there are other workflows in this repo that might have adopted the same local reference pattern, they could have the same issue — worth scanning for similar patterns.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

Copy link
Copy Markdown
Contributor

@sonar-review-alpha sonar-review-alpha Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ✅

Clean, minimal fix. The actions/checkout step is still necessary — check-sca discovers project keys from config files in the calling repo (.sonarlint/connectedMode.json, sonar-project.properties, etc.) via WORKING_DIRECTORY, so the checkout must remain even though the action is now fetched remotely.

🗣️ Give feedback

@bwalsh434 bwalsh434 merged commit b448170 into master May 15, 2026
20 checks passed
@bwalsh434 bwalsh434 deleted the bugfix/bwalsh/BUILD-11393-fix-constant-check-sca-failures-from-local-ref branch May 15, 2026 16:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SCA required workflow so it can run the check-sca action from this repository when invoked from consuming repositories via rulesets.

Changes:

  • Removes sparse checkout of the local check-sca directory.
  • Replaces the local action reference with SonarSource/ci-github-actions/check-sca@master.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

with:
sparse-checkout: check-sca
- uses: ./check-sca
- uses: SonarSource/ci-github-actions/check-sca@master
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.

3 participants