Skip to content

ci: pin all external GitHub Actions to commit SHAs (Sonar S7637) - #6019

Merged
renecannao merged 7 commits into
GH-Actionsfrom
ci/pin-github-actions-shas-gh-actions
Aug 10, 2026
Merged

ci: pin all external GitHub Actions to commit SHAs (Sonar S7637)#6019
renecannao merged 7 commits into
GH-Actionsfrom
ci/pin-github-actions-shas-gh-actions

Conversation

@renecannao

@renecannao renecannao commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Companion to #6018 (v3.0 callers): resolves SonarCloud security hotspot rule S7637 ("External GitHub Actions and workflows should be pinned to a commit hash") for all external actions referenced by the reusable workflows on this branch.

Every external uses: reference is now pinned to the full commit SHA with a trailing # <tag> comment. One commit per action:

Action Tag Pinned SHA
actions/checkout v4 11d5960a326750d5838078e36cf38b85af677262
LouisBrunner/checks-action v2.0.0 6b626ffbad7cc56fd58627f774b9067e6118af23
actions/upload-artifact v4 ea165f8d65b6e75b540449e92b4886f43607fa02
actions/cache/restore, actions/cache/save v4 0057852bfaa89a56745cba8c7296529d2fc39830
github/codeql-action (init, analyze) v3 c4dd10e44af883a891fe31ced449bcb4a6728b9b
hoverkraft-tech/ci-github-common (set/get-matrix-outputs) 0.14.0 d6367a8f0299d93cca9b42e287a56d2157f72060

Each SHA was verified against the upstream repository (tag resolution + commit lookup via the GitHub API). The SHAs match the ones used in #6018 where the same action/tag is involved; codecov/codecov-action was already pinned on this branch (cd6fee57b) and is untouched.

Scope notes:

  • The commented-out github/codeql-action/autobuild@v2 line in ci-codeql.yml is left as-is.
  • Internal reusable-workflow references (sysown/proxysql/.github/workflows/*.yml@...) are out of scope for S7637.
  • All changed files re-parse cleanly as YAML (verified per commit).

Summary by CodeRabbit

  • Chores
    • Pinned CI workflow actions to immutable commit references instead of mutable version tags.
    • Preserved existing workflow behavior, configuration, and version annotations.
    • Improved build and test pipeline reproducibility and supply-chain security.

Resolves SonarCloud security hotspot S7637 (external GitHub Actions
should be pinned to a commit hash) for actions/checkout.

v4 -> 11d5960a326750d5838078e36cf38b85af677262
Resolves SonarCloud security hotspot S7637 for LouisBrunner/checks-action.
Same SHA already used by the pinned call sites on v3.0.

v2.0.0 -> 6b626ffbad7cc56fd58627f774b9067e6118af23
Resolves SonarCloud security hotspot S7637 for actions/upload-artifact.

v4 -> ea165f8d65b6e75b540449e92b4886f43607fa02
Resolves SonarCloud security hotspot S7637 for actions/cache/restore.

v4 -> 0057852bfaa89a56745cba8c7296529d2fc39830
Resolves SonarCloud security hotspot S7637 for actions/cache/save
(same repo and tag as actions/cache/restore).

v4 -> 0057852bfaa89a56745cba8c7296529d2fc39830
Resolves SonarCloud security hotspot S7637 for github/codeql-action
(init and analyze). The autobuild reference is commented out and left
as-is.

v3 -> c4dd10e44af883a891fe31ced449bcb4a6728b9b
…it SHA

Resolves SonarCloud security hotspot S7637 for the
set-matrix-output/get-matrix-outputs composite actions.

0.14.0 -> d6367a8f0299d93cca9b42e287a56d2157f72060
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7ec8d832-5f4f-4917-9f94-20e323e8cc19

📥 Commits

Reviewing files that changed from the base of the PR and between 8a77264 and 3e0115f.

📒 Files selected for processing (67)
  • .github/workflows/ci-3p-aiomysql.yml
  • .github/workflows/ci-3p-django-framework.yml
  • .github/workflows/ci-3p-laravel-framework.yml
  • .github/workflows/ci-3p-mariadb-connector-c.yml
  • .github/workflows/ci-3p-mysql-connector-j.yml
  • .github/workflows/ci-3p-pgjdbc.yml
  • .github/workflows/ci-3p-php-pdo-mysql.yml
  • .github/workflows/ci-3p-php-pdo-pgsql.yml
  • .github/workflows/ci-3p-postgresql.yml
  • .github/workflows/ci-3p-sqlalchemy.yml
  • .github/workflows/ci-basictests.yml
  • .github/workflows/ci-builds.yml
  • .github/workflows/ci-codeql.yml
  • .github/workflows/ci-legacy-clickhouse-g1.yml
  • .github/workflows/ci-legacy-g1.yml
  • .github/workflows/ci-legacy-g2-genai.yml
  • .github/workflows/ci-legacy-g2.yml
  • .github/workflows/ci-legacy-g3.yml
  • .github/workflows/ci-legacy-g4.yml
  • .github/workflows/ci-legacy-g5.yml
  • .github/workflows/ci-legacy-g6.yml
  • .github/workflows/ci-legacy-g7.yml
  • .github/workflows/ci-legacy-g8.yml
  • .github/workflows/ci-legacy-g9.yml
  • .github/workflows/ci-maketest.yml
  • .github/workflows/ci-mariadb10-galera-g1.yml
  • .github/workflows/ci-mariadb10-galera-g2.yml
  • .github/workflows/ci-mariadb10-galera-g3.yml
  • .github/workflows/ci-mariadb10-galera-g4.yml
  • .github/workflows/ci-mariadb10-galera-g5.yml
  • .github/workflows/ci-mariadb10-galera-g6.yml
  • .github/workflows/ci-mariadb10-galera-g7.yml
  • .github/workflows/ci-mariadb10-galera-g8.yml
  • .github/workflows/ci-mariadb10-galera-g9.yml
  • .github/workflows/ci-mysql56-single-g1.yml
  • .github/workflows/ci-mysql84-g1.yml
  • .github/workflows/ci-mysql84-g2.yml
  • .github/workflows/ci-mysql84-g3.yml
  • .github/workflows/ci-mysql84-g4.yml
  • .github/workflows/ci-mysql84-g5.yml
  • .github/workflows/ci-mysql84-g6.yml
  • .github/workflows/ci-mysql84-g7.yml
  • .github/workflows/ci-mysql84-g8.yml
  • .github/workflows/ci-mysql84-g9.yml
  • .github/workflows/ci-mysql84-gr-g1.yml
  • .github/workflows/ci-mysql84-gr-g2.yml
  • .github/workflows/ci-mysql84-gr-g3.yml
  • .github/workflows/ci-mysql84-gr-g4.yml
  • .github/workflows/ci-mysql84-gr-g5.yml
  • .github/workflows/ci-mysql84-gr-g6.yml
  • .github/workflows/ci-mysql84-gr-g7.yml
  • .github/workflows/ci-mysql84-gr-g8.yml
  • .github/workflows/ci-mysql84-gr-g9.yml
  • .github/workflows/ci-mysql90-gr-g1.yml
  • .github/workflows/ci-mysql93-gr-g1.yml
  • .github/workflows/ci-mysql95-gr-g1.yml
  • .github/workflows/ci-mysqlx.yml
  • .github/workflows/ci-no-infra-g1.yml
  • .github/workflows/ci-package-build.yml
  • .github/workflows/ci-pg-compat.yml
  • .github/workflows/ci-pgsql-socket-g1.yml
  • .github/workflows/ci-repltests.yml
  • .github/workflows/ci-selftests.yml
  • .github/workflows/ci-set_parser_algorithm_3-g1.yml
  • .github/workflows/ci-shuntest.yml
  • .github/workflows/ci-taptests-pgsql-cluster.yml
  • .github/workflows/ci-unittests.yml
📜 Recent review details
🔇 Additional comments (67)
.github/workflows/ci-maketest.yml (1)

31-31: LGTM!

Also applies to: 44-44, 75-81

.github/workflows/ci-3p-aiomysql.yml (1)

43-43: LGTM!

Also applies to: 56-56, 86-86, 170-176

.github/workflows/ci-3p-django-framework.yml (1)

43-43: LGTM!

Also applies to: 56-56, 86-86, 188-194

.github/workflows/ci-3p-laravel-framework.yml (1)

43-43: LGTM!

Also applies to: 56-56, 86-86, 181-187

.github/workflows/ci-3p-mariadb-connector-c.yml (1)

43-43: LGTM!

Also applies to: 56-56, 86-86, 176-182

.github/workflows/ci-3p-mysql-connector-j.yml (1)

43-43: LGTM!

Also applies to: 56-56, 86-86, 169-175

.github/workflows/ci-3p-pgjdbc.yml (1)

40-40: LGTM!

Also applies to: 53-53, 82-82, 180-187

.github/workflows/ci-3p-php-pdo-mysql.yml (1)

43-43: LGTM!

Also applies to: 56-56, 86-86, 169-175

.github/workflows/ci-3p-php-pdo-pgsql.yml (1)

40-40: LGTM!

Also applies to: 53-53, 83-83, 166-172

.github/workflows/ci-3p-postgresql.yml (1)

40-40: LGTM!

Also applies to: 53-53, 82-82, 176-183

.github/workflows/ci-3p-sqlalchemy.yml (1)

46-46: LGTM!

Also applies to: 59-59, 89-89, 183-196, 217-217

.github/workflows/ci-basictests.yml (1)

99-99: LGTM!

Also applies to: 111-111, 273-281, 291-291, 388-388

.github/workflows/ci-builds.yml (1)

130-130: LGTM!

Also applies to: 145-145, 167-167, 462-462, 471-471, 527-527, 536-536, 580-580, 590-590, 601-601, 614-614, 633-639

.github/workflows/ci-codeql.yml (1)

37-37: LGTM!

Also applies to: 59-59, 83-83, 92-92, 119-123

.github/workflows/ci-pg-compat.yml (1)

39-39: LGTM!

Also applies to: 98-98

.github/workflows/ci-package-build.yml (1)

122-122: LGTM!

Also applies to: 135-135, 156-156

.github/workflows/ci-legacy-g7.yml (1)

101-101: LGTM!

Also applies to: 114-114, 283-291, 402-402

.github/workflows/ci-legacy-g8.yml (1)

33-33: LGTM!

Also applies to: 46-46, 215-223, 334-334

.github/workflows/ci-legacy-g9.yml (1)

33-33: LGTM!

Also applies to: 46-46, 215-223, 334-334

.github/workflows/ci-mariadb10-galera-g1.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mariadb10-galera-g2.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-taptests-pgsql-cluster.yml (1)

75-75: LGTM!

Also applies to: 88-88, 228-236, 333-333

.github/workflows/ci-unittests.yml (1)

23-23: LGTM!

Also applies to: 35-35, 139-145

.github/workflows/ci-legacy-clickhouse-g1.yml (1)

33-33: LGTM!

Also applies to: 46-46, 216-224, 335-335

.github/workflows/ci-legacy-g1.yml (1)

101-101: LGTM!

Also applies to: 114-114, 283-291, 402-402

.github/workflows/ci-legacy-g2-genai.yml (1)

46-46: LGTM!

Also applies to: 59-59, 229-237, 350-350

.github/workflows/ci-legacy-g2.yml (1)

96-96: LGTM!

Also applies to: 108-108, 271-279, 376-376

.github/workflows/ci-mysql84-g9.yml (1)

33-33: LGTM!

Also applies to: 46-46, 215-223, 334-334

.github/workflows/ci-mysql84-gr-g1.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mysql84-gr-g2.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mysql84-gr-g3.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mysql84-gr-g4.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mysql84-gr-g5.yml (1)

33-33: LGTM!

Also applies to: 46-46, 206-214, 325-325

.github/workflows/ci-mysql84-gr-g6.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-legacy-g3.yml (1)

101-101: LGTM!

Also applies to: 114-114, 283-291, 402-402

.github/workflows/ci-legacy-g4.yml (1)

101-101: LGTM!

Also applies to: 114-114, 284-292, 403-403

.github/workflows/ci-legacy-g5.yml (1)

101-101: LGTM!

Also applies to: 114-114, 281-289, 400-400

.github/workflows/ci-legacy-g6.yml (1)

101-101: LGTM!

Also applies to: 114-114, 283-291, 402-402

.github/workflows/ci-mysql84-gr-g7.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mysql84-gr-g8.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mysql84-gr-g9.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mysql90-gr-g1.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mysql93-gr-g1.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mysql95-gr-g1.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mysqlx.yml (1)

41-41: LGTM!

Also applies to: 53-53, 212-219, 242-242, 254-254, 493-493, 520-520, 532-532, 702-708

.github/workflows/ci-mariadb10-galera-g3.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mariadb10-galera-g4.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mariadb10-galera-g5.yml (1)

33-33: LGTM!

Also applies to: 46-46, 206-214, 325-325

.github/workflows/ci-mariadb10-galera-g6.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mariadb10-galera-g7.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-no-infra-g1.yml (1)

101-101: LGTM!

Also applies to: 114-114, 282-290, 401-401

.github/workflows/ci-pgsql-socket-g1.yml (1)

33-33: LGTM!

Also applies to: 46-46, 215-223, 334-334

.github/workflows/ci-repltests.yml (1)

31-31: LGTM!

Also applies to: 68-68, 189-197, 206-206

.github/workflows/ci-selftests.yml (1)

31-31: LGTM!

Also applies to: 203-211, 220-220

.github/workflows/ci-set_parser_algorithm_3-g1.yml (1)

33-33: LGTM!

Also applies to: 46-46, 215-223, 334-334

.github/workflows/ci-shuntest.yml (1)

31-31: LGTM!

Also applies to: 68-68, 185-193, 202-202

.github/workflows/ci-mariadb10-galera-g8.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mariadb10-galera-g9.yml (1)

33-33: LGTM!

Also applies to: 46-46, 208-216, 327-327

.github/workflows/ci-mysql56-single-g1.yml (1)

39-39: LGTM!

Also applies to: 52-52, 221-229, 340-340

.github/workflows/ci-mysql84-g1.yml (1)

101-101: LGTM!

Also applies to: 114-114, 283-291, 402-402

.github/workflows/ci-mysql84-g2.yml (1)

101-101: LGTM!

Also applies to: 114-114, 283-291, 402-402

.github/workflows/ci-mysql84-g3.yml (1)

101-101: LGTM!

Also applies to: 114-114, 283-291, 402-402

.github/workflows/ci-mysql84-g4.yml (1)

101-101: LGTM!

Also applies to: 114-114, 283-291, 402-402

.github/workflows/ci-mysql84-g5.yml (1)

33-33: LGTM!

Also applies to: 46-46, 213-221, 332-332

.github/workflows/ci-mysql84-g6.yml (1)

33-33: LGTM!

Also applies to: 46-46, 215-223, 334-334

.github/workflows/ci-mysql84-g7.yml (1)

33-33: LGTM!

Also applies to: 46-46, 215-223, 334-334

.github/workflows/ci-mysql84-g8.yml (1)

33-33: LGTM!

Also applies to: 46-46, 215-223, 334-334


📝 Walkthrough

Walkthrough

The pull request pins GitHub Actions references to immutable commit SHAs across CI workflows. Existing inputs, conditions, artifact settings, checks, and workflow control flow remain unchanged.

Changes

GitHub Actions pinning

Layer / File(s) Summary
Third-party workflow actions
.github/workflows/ci-3p-*.yml
Pins checks, checkout, cache, artifact, and matrix actions to commit SHAs.
Build and security workflows
.github/workflows/ci-builds.yml, .github/workflows/ci-codeql.yml, .github/workflows/ci-package-build.yml, .github/workflows/ci-pg-compat.yml
Pins build, cache, CodeQL, checkout, package, and artifact actions.
Legacy and database workflows
.github/workflows/ci-legacy-*.yml, .github/workflows/ci-mariadb10-*.yml, .github/workflows/ci-mysql*.yml
Pins repeated checks, checkout, and artifact-upload references across legacy and database test matrices.
Test workflows
.github/workflows/ci-basictests.yml, .github/workflows/ci-repltests.yml, .github/workflows/ci-selftests.yml, .github/workflows/ci-shuntest.yml, .github/workflows/ci-taptests-pgsql-cluster.yml, .github/workflows/ci-unittests.yml
Pins action references used by test, failure-artifact, coverage, and final check steps.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Poem

A rabbit checks each workflow line,
And pins each action, neat and fine.
No tags may drift across the way,
The same steps run the same each day.
“Hop!” says the bunny, “SHA-secure!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: pinning external GitHub Actions to commit SHAs to address Sonar S7637.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/pin-github-actions-shas-gh-actions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Pins all external GitHub Actions to verified commit SHAs with corresponding tag comments to satisfy Sonar rule S7637. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud

Copy link
Copy Markdown

@renecannao
renecannao merged commit 5c53604 into GH-Actions Aug 10, 2026
3 checks passed
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