Add sha_pinning_required check for GitHub Actions permissions#28
Merged
Add sha_pinning_required check for GitHub Actions permissions#28
Conversation
Co-authored-by: david3107 <20040740+david3107@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add new sha_pinning_required check under allowed_actions policy
Add sha_pinning_required check for GitHub Actions permissions
Oct 10, 2025
Contributor
|
@copilot In the yaml policy repo file we should change the wording from |
Co-authored-by: david3107 <20040740+david3107@users.noreply.github.com>
Contributor
Author
Done! Renamed Changes made in commit 0f8c2a6:
|
david3107
approved these changes
Oct 10, 2025
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.
Overview
This PR implements support for the new
sha_pinning_requiredfield that GitHub recently added to the Actions permissions API endpoints. This security feature ensures that workflow actions are referenced by their full commit SHA rather than by tag or branch, preventing potential supply chain attacks.Changes
API Integration
Added support for retrieving the
sha_pinning_requiredfield from:GET /repos/{owner}/{repo}/actions/permissions- Repository-level actions permissionsGET /orgs/{org}/actions/permissions- Organization-level actions permissions (new endpoint integration)Repository-Level Checks
Updated
ActionsChecks.tsto validatesha_pinning_requiredsetting:Organization-Level Checks
Created new
OrgActionsChecks.tsevaluator to check organization-wide actions settings:enabled_repositories- which repos can use GitHub Actions (all/none/selected)allowed_actions- which actions can be used (all/local_only/selected)sha_pinning_required- whether SHA pinning is enforcedPolicy Configuration
Repository Policy (
policies/repository.yml):Organization Policy (
policies/organization.yml):Note: The repository policy field was renamed from
allowed_actionstoactionsfor consistency with the organization policy structure.Documentation
Updated both
repository.readme.mdandorganization.readme.mdwith:sha_pinning_requiredparameterType Definitions
Actionsinterface (renamed fromAllowedActions) to include optionalsha_pinning_requiredfieldactionssection toOrgPolicyinterfaceRepoPolicyto useactions: Actionsinstead ofallowed_actions: AllowedActions@octokit/typesTesting
Security Impact
This change enables organizations to enforce SHA pinning for GitHub Actions, which:
Closes #
Original prompt
Fixes #27
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.