Skip to content

Pin GitHub Actions and update preview workflow - #312

Open
AasthathecoderX wants to merge 1 commit into
meshery:masterfrom
AasthathecoderX:workflow-audit
Open

Pin GitHub Actions and update preview workflow#312
AasthathecoderX wants to merge 1 commit into
meshery:masterfrom
AasthathecoderX:workflow-audit

Conversation

@AasthathecoderX

@AasthathecoderX AasthathecoderX commented Aug 7, 2026

Copy link
Copy Markdown

Summary

This PR audits and updates the GitHub Actions workflows in accordance with the preview workflow review checklist.

Changes made

  • Pinned GitHub Actions to immutable commit SHAs.
  • Updated GitHub Actions to the latest supported major versions where applicable.
  • Audited pull_request_target usage:
    • .github/workflows/label-commenter.yml
    • .github/workflows/labeler.yml
  • Updated the preview deployment comment to the standardized format with the deployment tracking note.
  • Verified that wait-for-pages-deployment is not present in this repository.
  • Verified that package.json does not include hugo-extended, so no Hugo CLI/Dart Sass cleanup was required.

Actions updated

  • actions/checkout
  • actions/labeler
  • peaceiris/actions-label-commenter
  • release-drafter/release-drafter
  • slackapi/slack-github-action

Validation

  • Verified workflow configuration locally.
  • Opened this PR to trigger the build and deploy preview workflows for validation.
  • pull_request_target workflows were detected as expected.
  • Netlify reported no site content changes and skipped the site build, which is expected since this PR only updates workflow files.

Summary by CodeRabbit

  • New Features
    • Preview deployment comments now provide helpful timing information and a link to deployment progress for open pull requests.
  • Chores
    • Improved the reliability and security of site builds, previews, releases, labeling, and notifications by using immutable commit SHAs.
    • Updated GitHub Actions to newer supported major versions where applicable while preserving existing workflow behavior.

Signed-off-by: AasthathecoderX <bhat.aasthaa@gmail.com>
@netlify

netlify Bot commented Aug 7, 2026

Copy link
Copy Markdown

Deploy Preview for meshery-play canceled.

Name Link
🔨 Latest commit 95d492e
🔍 Latest deploy log https://app.netlify.com/projects/meshery-play/deploys/6a75f13076d96d000803416a

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The pull request pins GitHub Actions to commit SHAs across site, labeling, release, and Slack workflows. Preview comments now indicate when GitHub Pages deployment may still be in progress.

Changes

Workflow updates

Layer / File(s) Summary
Pin workflow actions
.github/workflows/build-and-deploy-site.yml, .github/workflows/label-commenter.yml, .github/workflows/labeler.yml, .github/workflows/release-drafter.yml, .github/workflows/slack.yml
The workflows now use fixed action revisions for checkout, Node setup, GitHub Pages deployment, labeling, Release Drafter, and Slack notifications.
Report preview deployment status
.github/workflows/deploy-site-preview.yml
Preview comments now show a deployment note for non-closed pull requests and no note for closed pull requests.

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

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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.
Title check ✅ Passed The title clearly and concisely describes both main changes: pinning GitHub Actions and updating the preview workflow.
✨ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/label-commenter.yml:
- Line 22: Pin the peaceiris/actions-label-commenter action to the exact commit
SHA resolved from v1.10.0 instead of the mutable tag, and retain a # v1.10.0
version comment for auditability. Leave the already-pinned actions/checkout
reference unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 35b7fdd0-ff06-4691-986f-191fc28767af

📥 Commits

Reviewing files that changed from the base of the PR and between c59e99b and 95d492e.

📒 Files selected for processing (6)
  • .github/workflows/build-and-deploy-site.yml
  • .github/workflows/deploy-site-preview.yml
  • .github/workflows/label-commenter.yml
  • .github/workflows/labeler.yml
  • .github/workflows/release-drafter.yml
  • .github/workflows/slack.yml

steps:
- name: Checkout repo 🛎️
uses: actions/checkout@master
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

sha="$(git ls-remote \
  https://github.com/peaceiris/actions-label-commenter.git \
  'refs/tags/v1.10.0^{}' | awk '{print $1}')"

if [[ -z "$sha" ]]; then
  sha="$(git ls-remote \
    https://github.com/peaceiris/actions-label-commenter.git \
    'refs/tags/v1.10.0' | awk '{print $1}')"
fi

[[ "$sha" =~ ^[0-9a-f]{40}$ ]]
printf 'Use SHA: %s\n' "$sha"
rg -n 'peaceiris/actions-label-commenter@' .github/workflows/label-commenter.yml

Repository: meshery/play

Length of output: 259


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf 'Workflow contents:\n'
cat -n .github.workflow/label-commenter.yml 2>/dev/null || cat -n .github/workflows/label-commenter.yml

printf '\nGit tag object inspection for peaceiris/actions-label-commenter v1.10.0:\n'
tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/peaceiris/actions-label-commenter.git "$tmp/clone" >/dev/null 2>&1
git -C "$tmp/clone" rev-parse --verify 'v1.10.0^{commit}' >/tmp/checkout_commit.txt 2>/dev/null || true
git -C "$tmp/clone" rev-parse --verify 'v1.10.0@{commit}' >/tmp/checkout_commit2.txt 2>/dev/null || true
cat /tmp/checkout_commit.txt /tmp/checkout_commit2.txt

rm -rf "$tmp"

Repository: meshery/play

Length of output: 996


Pin peaceiris/actions-label-commenter before merging.

This workflow exposes GITHUB_TOKEN to actions/checkout, and actions/checkout is pinned. Pin the remaining mutable action peaceiris/actions-label-commenter@v1.10.0 to an exact commit SHA that resolves from the tag, and keep a version comment such as # v1.10.0 for auditability.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/label-commenter.yml at line 22, Pin the
peaceiris/actions-label-commenter action to the exact commit SHA resolved from
v1.10.0 instead of the mutable tag, and retain a # v1.10.0 version comment for
auditability. Leave the already-pinned actions/checkout reference unchanged.

@banana-three-join banana-three-join left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please keep the scope of the audit only to the Build Site Preview and the Site Preview Post-Build workflows. Revert on the changes made to any of the other workflows.

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.

2 participants