Safeguard
Security Guides•

How do I limit which GitHub Actions my organization can run?

Use the organization Actions policy: allow only GitHub and verified creators or a named list, and require full commit SHA pins. Steps and trade-offs.

Safeguard Security Team
4 min read

In your organization's Actions settings, choose a policy that allows only actions from your own organization, plus an explicit list of others, and turn on the option that requires actions to be pinned to a full length commit SHA. Then no one can add an arbitrary action to a workflow without it being reviewed.

Why a policy beats a habit

Reviews and pinning work when everyone remembers them. A policy works when someone is in a hurry. GitHub's secure use reference notes that a single compromised action in a workflow can reach all secrets configured on the repository, so limiting what can be used shrinks that exposure at the source.

What the policy offers

GitHub's documentation for organizations describes choices for which actions and reusable workflows may run. In broad terms:

PolicyEffect
Allow all actions and reusable workflowsNo restriction
Allow actions from your organization onlyBlocks everything else, including actions written by GitHub such as checkout
Allow your organization plus select othersLocal actions and reusable workflows run, with extra options you choose

The docs list the extra options for the select policy: allow actions created by GitHub, allow Marketplace actions by verified creators, and allow specified actions and reusable workflows by name or pattern. A warning from the docs worth repeating: if you choose your organization only, actions authored by GitHub, including checkout, are blocked, which breaks most workflows.

Separately, a checkbox requires actions to be pinned to a full length commit SHA. When on, all actions must be pinned, including your own organization's and those authored by GitHub. Reusable workflows can still be referenced by tag.

Set it up in five steps

  1. Inventory the actions your repositories use today. A search of workflow files for uses: gives the list.
  2. Decide the allowlist. Start with GitHub's own actions and the few third-party ones you rely on.
  3. In organization settings, open Actions, then General, and choose the select policy.
  4. Add the allowed actions by name. Use patterns carefully, since a wide pattern allows more than you intend.
  5. Enable the SHA pinning requirement, and convert existing references to SHAs first so you do not break builds.

If your organization sits under an enterprise with its own policy, the docs note you may not be able to change these settings, because the enterprise setting overrides.

Keep the allowlist alive

An allowlist that nobody maintains turns into a ticket queue. Put a short process in place:

  • A request names the action, why it is needed and which repositories will use it.
  • A reviewer runs the checks in our post on reviewing a third-party action.
  • Approved actions are added by SHA or version pattern.
  • Once a quarter, remove entries nobody uses.

Also restrict who creates runners and PR approvals

GitHub's docs say organization owners can choose which repositories may create repository level self-hosted runners, and you can also block workflows from creating or approving pull requests. Both limits belong in the same settings visit.

Where Safeguard fits

Safeguard's policies and guardrails operate on dependencies and code changes at the pull request. The action allowlist is a GitHub setting, and the two complement each other.

Quick check

Will pinning enforcement break my existing workflows?

Yes, any workflow still referencing a tag will fail. Convert references to full SHAs before enabling the requirement.

Do reusable workflows have to be pinned too?

Per GitHub's docs, reusable workflows can still be referenced by tag under the pinning requirement, so review those references separately.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.