Skip to content

chore: harden Github Actions workflows - #3559

Draft
Florence-Njeri wants to merge 8 commits into
asyncapi:masterfrom
Florence-Njeri:hardening-GA
Draft

chore: harden Github Actions workflows#3559
Florence-Njeri wants to merge 8 commits into
asyncapi:masterfrom
Florence-Njeri:hardening-GA

Conversation

@Florence-Njeri

@Florence-Njeri Florence-Njeri commented May 25, 2026

Copy link
Copy Markdown
Contributor

Description

Security hardening of workflow files:

  • Added permissions: {} at workflow level with minimal per-job overrides
  • Moved all ${{ }} template expressions into env: blocks to prevent shell/script injection
  • Pinned all action versions to full commit SHAs
  • Added persist-credentials: false on checkouts

Related issue(s)

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated all GitHub Actions workflows to use pinned versions of actions/github-script (v9.0.0) instead of floating version references across automation workflows, enhancing stability and security.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a2570aae-b76e-4d0b-bae2-c9aa7a01f340

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This pull request pins the actions/github-script action to a specific commit SHA (v9.0.0) across 26 files: one composite action and 25 GitHub Actions workflows. All floating version tags (v4, v6, v7) are replaced with the same pinned commit 3a2844b7e9c422d3c10d287c895573f7108da1b3. No workflow logic, script behavior, or job structure is modified.

Changes

Pin actions/github-script to v9.0.0 Commit SHA

Layer / File(s) Summary
Pin actions/github-script across all workflows and actions
.github/actions/verifyTSCMember/action.yml, .github/workflows/add-good-first-issue-labels.yml, .github/workflows/ambassador_management.yml, .github/workflows/automerge.yml, .github/workflows/automerge-for-humans-*.yml, .github/workflows/automerge-orphans.yml, .github/workflows/bounty-program-commands.yml, .github/workflows/cancel-event.yml, .github/workflows/create-event-workflow-reusable.yml, .github/workflows/help-command.yml, .github/workflows/maintainer_management.yml, .github/workflows/maintainers-tsc-changes-verification.yaml, .github/workflows/microgrant-program-commands.yml, .github/workflows/notify-tsc-members-mention.yml, .github/workflows/please-take-a-look-command.yml, .github/workflows/release-announcements.yml, .github/workflows/send-events-newsletter.yml, .github/workflows/tsc_management.yml, .github/workflows/update-docs-in-website.yml, .github/workflows/update-maintainers.yaml, .github/workflows/update-pr.yml, .github/workflows/validate-maintainers.yml, .github/workflows/vote-*.yml, .github/workflows/welcome-first-time-contrib.yml
All uses: actions/github-script references are updated from floating major/minor version tags to pinned commit @3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0. The change affects 65 step usages across management, automation, notification, and utility workflows. All script execution logic and workflow triggers remain unchanged.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 From v7's floating dreams to SHA so true,
Pinned versions lock the script-action anew,
Twenty-five workflows marching in a line,
All pointing to v9, a grand design!
Security and certainty combine,
This little hop makes actions align. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The PR title 'chore: harden Github Actions workflows' is partially related to the changeset. While the PR does harden workflows by pinning actions/github-script versions, the title is overly broad and generic. The more specific action (pinning a specific action) is not clearly conveyed. Consider a more specific title like 'chore: pin actions/github-script to v9.0.0 in GitHub Actions workflows' to better reflect the primary change and make the intent immediately clear.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@asyncapi-bot

Copy link
Copy Markdown
Contributor

@derberg @bandantonio @thulieblack Please take a look at this PR. Thanks! 👋

@Florence-Njeri Florence-Njeri changed the title chore: pin actions/github-script chore: harden Github Actions workflows May 25, 2026
…xpressions into env variables to prevent attackers from injecting code into the templateable templates
steps:
- name: Checkout base commit
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Checkout head commit
uses: actions/checkout@v4
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

steps:
- name: Checkout main branch
uses: actions/checkout@v3
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
run: ls -la
- name: Checkout one commit before last one
uses: actions/checkout@v3
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants