[release/v7.5.6] [StepSecurity] ci: Harden GitHub Actions tokens#27224
Merged
daxian-dbw merged 1 commit intoPowerShell:release/v7.5.6from Apr 9, 2026
Merged
Conversation
Signed-off-by: StepSecurity Bot <[email protected]>
Contributor
There was a problem hiding this comment.
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
permissionswithcontents: readto the reusable xUnit test workflow. - Add workflow-level
permissionswithcontents: readto the reusable Windows packaging workflow. - Add workflow-level
permissionswithcontents: readto 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. |
SeeminglyScience
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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
Regression
REQUIRED: Check exactly one box.
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.
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.