GitHub Actions hardening just became a calendar item. Workflow lockfiles went generally available on 28 October 2026, and from 2 December 2026 GitHub Actions blocks pull_request_target events by default in all public repositories, unless an Actions event policy explicitly allows them. Around those two dates, 2026 also changed defaults for caches, actions/checkout and OIDC subjects, and some of those changes can break pipelines that work today.

This guide is Loop's recommended order of work, based on GitHub's documentation and changelog entries and on write-ups from Wiz and Capgemini. The idea: one focused pass of roughly 90 minutes per repository, ordered by blast radius, instead of a big-bang rewrite of every workflow. CI holds your deploy keys and your cloud trust, so the repos that deploy or publish go first.

GitHub Actions hardening in 90 minutes: the order of work

A rough time budget per repo, which you should adjust to your own size:

Step What Budget
1 Inventory risky triggers, mutable refs and OIDC trust 15 min
2 Read-only permissions: at workflow level 10 min
3 Lock deploy and publish workflows 25 min
4 Fix pull_request_target (public repos) 20 min
5 Cache hygiene 10 min
6 OIDC subjects and runner IP allowlists 10 min plus cloud-side changes

Start with repositories that can deploy to production or publish packages. A repo that only runs unit tests with no secrets can wait for the next sprint.

Before you start, re-check GitHub's changelog. Dates and rollout details in this area have already moved once: pull_request_target enforcement was previously scheduled for 2 November 2026.

Steps 1 and 2: Inventory, then read-only permissions

You cannot fix what you have not listed. Search every repo for the triggers that run with elevated context, and for mutable action references:

grep -rnE "pull_request_target|workflow_run|issue_comment" .github/workflows
grep -rnE "uses: [^ ]+@(v[0-9]+|main|master)" .github/workflows

Then list every cloud role or federated credential that trusts GitHub OIDC: AWS IAM roles, Azure federated credentials, GCP workload identity providers. You will need this list in step 6, and it is the part teams most often forget because it lives outside the repo.

Next, set permissions: to read-only at workflow level and grant write scopes per job:

permissions:
  contents: read

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
  release:
    needs: build
    permissions:
      contents: read
      id-token: write   # only the job that logs in to the cloud
    runs-on: ubuntu-latest
    steps:
      - run: echo "deploy here"

The point is containment. A compromised action runs with the job's GITHUB_TOKEN and whatever secrets that job can read, and a broad token lets it write back to the repo. Also set the repository or organization default token permission to read-only so a new workflow starts safe.

Step 3: Lock the workflows that deploy or publish first

GitHub's workflow dependency lockfiles are generally available on GitHub Enterprise Cloud, Enterprise Cloud with data residency, Team and Free plans, according to the 28 October 2026 changelog entry. The gh actions-lock CLI extension generates .github/workflows/actions.lock for actions and their transitive dependencies. Prefer it over hand-pasted SHAs: you get the transitive dependencies too, and it is far less error-prone.

Adoption is gradual. Workflows are onboarded individually, and once a workflow is onboarded, Actions requires each of its dependencies to be in the lockfile and runs the recorded commit. That is why we suggest starting with deploy and publish workflows. Practical details:

  • Dependabot keeps working. When it opens a version update for an action in an onboarded workflow, it regenerates the matching lockfile entry in the same pull request.
  • Add the stale-lockfile check to CI, so a workflow change without a lockfile update fails visibly.
  • Review before you lock. GitHub is explicit that lockfiles don't determine whether a dependency is safe. A lockfile records what you decided to trust, so read each action, and its transitive dependencies, before the first lock.

The allowlist gotcha

If your organization uses an allowed-actions policy, check it before onboarding. For workflows covered by a lockfile, the policy checks each locked dependency by its commit SHA, not by the tag or branch in the workflow file. Entries pinned to a tag or branch, such as actions/checkout@v6, therefore don't match. Use a wildcard or the full SHA in the allowlist.

The good news: locked dependencies satisfy the "Require actions to be pinned to a full-length commit SHA" policy without changes to the workflow file. Dependencies that are not in the lockfile still need a full-length SHA.

Step 4: Split or rewrite every pull_request_target workflow

The trigger runs in the base repository's context and can access its secrets, so untrusted fork code could steal them. That is why GitHub is changing the default. The rule initially runs in evaluate mode, so you can see which runs it would block. Private and internal repositories aren't affected, and the change does not apply to GitHub Enterprise Server.

Before permanent enforcement, GitHub scheduled two brownouts: 9 November and 16 November 2026, each from 16:00 to 18:00 UTC. During those windows, pull_request_target runs blocked by the default rule fail with an error annotation instead of executing; afterwards the rule returns to evaluate mode. Use Insights to see which runs the rule would block before the 16 November window.

For each hit from your inventory:

  1. Does it need the trigger at all? Many workflows use pull_request_target only to get secrets for tests or previews. Those can usually become a plain pull_request workflow with no secrets.
  2. Keep privileged jobs to PR metadata. Labeling, commenting and triage are fine. Never check out and execute fork code beside secrets.
  3. If it truly needs the trigger, allow it explicitly in an applicable Actions event policy and use workflow-file targeting so only the specific workflow is allowed, not the whole repo.

Two warnings from Wiz's analysis matter here. First, the backported protections live inside actions/checkout, so pinning to a SHA from before the 20 July 2026 backport runs legacy code without the safety checks. A SHA-pinned checkout that you considered "secure" may silently miss GitHub's new guard. Second, the guard has gaps: the default policy doesn't apply to private and internal repositories or to workflow_run, and allow-unsafe-pr-checkout: true re-enables untrusted fork checkouts. Grep for that flag. Wiz also points out that the checkout protections cover only pull_request_target and workflow_run: bot-command workflows on issue_comment that check out PR code remain exploitable and need their own authorization checks.

The takeaway is that SHA pinning is not a finish line. It tells you which code runs, not whether that code is safe.

Step 5: Cache hygiene

Caches are a quiet path from a low-trust workflow into a trusted one. According to GitHub's dependency caching reference, runs triggered by other events that resolve to the default branch get read-only access to default-branch caches. They can restore existing caches but cannot create or overwrite them. This includes pull_request_target, issue_comment and workflow_run. The pull_request event is not affected.

What to do:

  • Save caches only from trusted push workflows, and let PR workflows restore them. If a workflow lost its cache saves after this change, move the save into a separate workflow triggered by an event with read-write cache access, such as push.
  • Don't override the default casually. Explicitly declaring cache-mode: write or write-only overrides the secure read-only default for low-trust triggers, and cache contents are not signed or verified.
  • Use cache-mode: none in release and publish workflows. Our recommendation: a release job has no business restoring bytes it did not just build.

Step 6: OIDC to Azure and AWS, plus runner IP allowlists

This is the step most likely to break a working deployment.

Immutable subjects

Per GitHub's OpenID Connect reference, repositories created after 15 July 2026 use an immutable default subject format with the owner ID and repository ID. Renames and transfers after that date also move a repo to it. Existing repos can opt in at the organization or repository level through the OIDC settings UI or the REST API. It is not available on GitHub Enterprise Server.

Capgemini describes the failure mode on Azure: Azure keeps matching the old name-based format while GitHub sends the ID-based one, so the deployment fails. Flexible Federated Credentials need an updated matching expression, for example one that includes claims['repository_owner_id'] or claims['repository_id']. Capgemini also notes that only the subject changes: other claims such as job_workflow_ref stay name-based.

A safe sequence:

  1. For each repo in your inventory, check which subject format it emits today.
  2. Update the federated credential (Azure) or the sub condition in the trust policy (AWS) before you create, rename or transfer a repo, or opt in.
  3. Copy the exact subject format from GitHub's current OIDC reference, not from older blog posts.
  4. Prefer exact environment-scoped subjects over wildcards. A wildcard that survives a rename is convenient; it is also the thing that trusts more than you intended.

Azure shops: runner IP allowlists

GitHub announced on 28 October 2026 that Actions schedules eligible jobs across a multi-cloud compute pool, so eligible Linux jobs may run on AWS as well as Azure. It covers standard 2-core and 4-core Linux runners and compatible 2-core and 4-core larger runners, not Windows runners or runners with private networking. Free, Pro and Team accounts use it automatically; Enterprise Cloud customers opt in through the enterprise Actions policies.

Runners in the expanded pool use additional outbound IP addresses. Allowlists limited to Azure or Microsoft-owned ranges, including Microsoft Entra Conditional Access policies, can block connections or authentication from them. GitHub publishes all runner ranges in the actions array from GET https://api.github.com/meta and recommends keeping allowlists in sync with that endpoint. It is a rolling change, so review your allowlists now rather than after a failed login.

Key takeaways

  • Do one 90-minute pass per repo, starting with workflows that deploy or publish.
  • Inventory pull_request_target, workflow_run, issue_comment, mutable uses: refs and every OIDC trust relationship first.
  • Set permissions: read-only at workflow level; grant write per job.
  • Use gh actions-lock instead of pasted SHAs, add the stale-lockfile check, and review each action before locking. A lockfile does not prove safety.
  • Fix allowlists: tag-pinned entries like actions/checkout@v6 don't match locked workflows; use a wildcard or full SHA.
  • Rework pull_request_target workflows in public repos before 2 December 2026 (the second brownout is on 16 November), and watch for old SHA-pinned checkouts and allow-unsafe-pr-checkout: true.
  • Save caches from push workflows only; use cache-mode: none for release and publish workflows.
  • Update Azure and AWS trust before creating, renaming or transferring repos; check IP allowlists against GitHub's published ranges.