Skip to content

[release/v7.5.6] [StepSecurity] ci: Harden GitHub Actions tokens#27224

Merged
daxian-dbw merged 1 commit intoPowerShell:release/v7.5.6from
daxian-dbw:backport/release/v7.5.6/27202-601f0167e
Apr 9, 2026
Merged

[release/v7.5.6] [StepSecurity] ci: Harden GitHub Actions tokens#27224
daxian-dbw merged 1 commit intoPowerShell:release/v7.5.6from
daxian-dbw:backport/release/v7.5.6/27202-601f0167e

Conversation

@daxian-dbw
Copy link
Copy Markdown
Member

Backport of #27202 to release/v7.5.6

Triggered by @daxian-dbw on behalf of @step-security-bot

Original CL Label: CL-BuildPackaging

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Hardens GitHub Actions token permissions in shared CI workflows on the release branch. This is a required tooling/security posture update for repository automation.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Cherry-pick applied cleanly to release/v7.5.6. The change is limited to GitHub workflow permission declarations in three workflow files and validation will rely on backport PR CI for the release branch.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Medium risk because it changes CI authentication permissions across shared workflows and could expose missing permissions in automation, but the scope is tightly limited to workflow token configuration already validated on main.

@daxian-dbw daxian-dbw added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Apr 9, 2026
Copilot AI review requested due to automatic review settings April 9, 2026 06:34
@daxian-dbw daxian-dbw requested a review from a team as a code owner April 9, 2026 06:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Backports the security hardening from #27202 to the release/v7.5.6 branch by explicitly setting least-privilege GITHUB_TOKEN permissions in shared GitHub Actions workflows.

Changes:

  • Add workflow-level permissions with contents: read to the reusable xUnit test workflow.
  • Add workflow-level permissions with contents: read to the reusable Windows packaging workflow.
  • Add workflow-level permissions with contents: read to the Copilot setup workflow.

Reviewed changes

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

File Description
.github/workflows/xunit-tests.yml Restricts token permissions for the reusable xUnit workflow to read-only repository contents.
.github/workflows/windows-packaging-reusable.yml Restricts token permissions for the reusable Windows packaging workflow to read-only repository contents.
.github/workflows/copilot-setup-steps.yml Restricts token permissions for the Copilot setup workflow to read-only repository contents.

@daxian-dbw daxian-dbw merged commit 147da84 into PowerShell:release/v7.5.6 Apr 9, 2026
40 checks passed
@daxian-dbw daxian-dbw deleted the backport/release/v7.5.6/27202-601f0167e branch April 9, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants