Skip to content

fix: pin GitHub Actions to commit SHAs - #492

Open
PrekshithD-Microsoft wants to merge 1 commit into
devfrom
psl-workflows-update
Open

fix: pin GitHub Actions to commit SHAs#492
PrekshithD-Microsoft wants to merge 1 commit into
devfrom
psl-workflows-update

Conversation

@PrekshithD-Microsoft

@PrekshithD-Microsoft PrekshithD-Microsoft commented Aug 26, 2026

Copy link
Copy Markdown

This pull request updates all GitHub Actions in the repository's workflow files to use explicit commit SHA references instead of version tags. This change improves the security and stability of the CI/CD pipeline by ensuring that workflows use immutable, reviewed versions of third-party actions.

The most important changes include:

Security and Stability Improvements:

Workflow Consistency:

  • The updates are applied consistently across all workflows, including those for template validation, Azure deployments, Docker builds, linting, pull request checks, stale bot, test automation, and more, ensuring uniform security practices throughout the CI/CD pipeline. (see all references above)

No functional changes to workflow logic or steps were made—only the method of referencing action versions was changed for improved supply chain security.## Purpose

  • ...

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

@github-actions

Copy link
Copy Markdown
Tests Skipped Failures Errors Time
1 0 💤 0 ❌ 1 🔥 5.231s ⏱️

Copilot AI 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.

Pull request overview

This pull request hardens the repository’s CI/CD supply chain by replacing GitHub Actions version tags in workflow uses: entries with immutable commit SHA pins across .github/workflows/.

Changes:

  • Updated third-party GitHub Actions references (e.g., actions/checkout, actions/setup-python, azure/login, Docker actions, etc.) from moving tags to pinned commit SHAs.
  • Kept human-readable version context via inline comments (e.g., # v6, # v7) next to each SHA.
  • Applied the updates consistently across validation, test, deployment, Docker, maintenance, and policy-check workflows.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/validate-bicep-params.yml Pins checkout/setup-python/upload-artifact actions to SHAs for deterministic validation runs.
.github/workflows/test.yml Pins checkout/setup-python actions to SHAs to stabilize test workflow dependencies.
.github/workflows/test-automation.yml Pins checkout/setup-python/azure-login/upload-artifact actions to SHAs for automated test runs.
.github/workflows/test-automation-v2.yml Pins checkout/setup-python/azure-login/upload-artifact actions to SHAs for the v2 automation pipeline.
.github/workflows/telemetry-template-check.yml Pins checkout action to a SHA for consistent telemetry template checks.
.github/workflows/stale-bot.yml Pins stale/checkout/upload-artifact actions to SHAs for predictable maintenance automation.
.github/workflows/scheduled-Dependabot-PRs-Auto-Merge.yml Pins checkout action to a SHA for stable scheduled automations.
.github/workflows/pylint.yml Pins checkout/setup-python actions to SHAs for consistent lint tooling setup.
.github/workflows/pr-title-checker.yml Pins semantic PR action to a SHA for deterministic PR title enforcement.
.github/workflows/job-docker-build.yml Pins checkout/buildx/azure-login/build-push actions to SHAs for reproducible Docker builds.
.github/workflows/job-deploy.yml Pins checkout/azure-login actions to SHAs for reliable deployment jobs.
.github/workflows/job-deploy-windows.yml Pins checkout/setup-azd/azure-login actions to SHAs for Windows deployment consistency.
.github/workflows/job-deploy-linux.yml Pins checkout/setup-azd/azure-login actions to SHAs for Linux deployment consistency.
.github/workflows/job-cleanup-deployment.yml Pins azure-login action to a SHA for deterministic cleanup execution.
.github/workflows/deploy.yml Pins checkout/azure-login actions to SHAs for consistent end-to-end deploy workflow runs.
.github/workflows/build-docker.yml Pins checkout/azure-login/buildx/build-push actions to SHAs for stable Docker build workflow.
.github/workflows/broken-links-checker.yml Pins checkout and lychee action to SHAs for deterministic link checking.
.github/workflows/azure-dev.yml Pins checkout/setup-azd/azure-login actions to SHAs for stable Azure dev workflow runs.
.github/workflows/azd-template-validation.yml Pins checkout and template-validation action to SHAs for deterministic template validation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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