Skip to content

[AAASM-235] 🔧 (ci): Harden SonarCloud guard in reusable CI workflow#23

Merged
Chisanan232 merged 8 commits into
masterfrom
v0.0.0/AAASM-235/fix_ci_dependabot_guard
May 2, 2026
Merged

[AAASM-235] 🔧 (ci): Harden SonarCloud guard in reusable CI workflow#23
Chisanan232 merged 8 commits into
masterfrom
v0.0.0/AAASM-235/fix_ci_dependabot_guard

Conversation

@Chisanan232
Copy link
Copy Markdown
Contributor

Description

Two targeted hardening changes to .github/workflows/rw_run_all_test_and_record.yaml:

  1. sonar_token: required: false — corrects the secret declaration from required: true to required: false. GitHub does not pass secrets to Dependabot PR runs, so marking it required is misleading and could cause validation warnings.

  2. if: ${{ secrets.sonar_token != '' }} on the SonarCloud Scan step — adds an explicit empty-token guard as defense-in-depth alongside the existing label-based skip. If the dependencies label is ever removed or renamed, this guard still prevents the SonarCloud step from running with an empty token.

The existing label-based guard (!contains(github.event.pull_request.labels.*.name, 'dependencies')) remains in place on the Codecov and SonarCloud jobs and continues to be the primary mechanism. This PR makes the SonarCloud step additionally resilient at the step level.

Type of Change

  • 🔧 Configuration / CI change

Breaking Changes

  • No

Related Issues

  • Related Jira ticket: AAASM-235
  • Related Jira Epic: AAASM-1

Testing

  • No tests required (explain why)

CI change only — pre-commit run against the specific changed file passes cleanly. The changes are additive guards and do not affect workflow behaviour for normal human-authored PRs.

Checklist

  • Self-review of the diff completed
  • Documentation updated if behaviour changed
  • Commits are small and follow the Gitmoji convention

Chisanan232 and others added 8 commits May 2, 2026 15:41
Replace invalid step-level secrets check with actor-based job guard.
The secrets context is not available in step if: expressions within
workflow_call workflows, which caused 0s "workflow file issue" failures.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 2, 2026

@Chisanan232 Chisanan232 merged commit 5c31270 into master May 2, 2026
22 checks passed
@Chisanan232 Chisanan232 deleted the v0.0.0/AAASM-235/fix_ci_dependabot_guard branch May 2, 2026 11:21
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