Skip to main content
In this guide you’ll learn how to configure and test GitHub Actions policies at the enterprise level to explicitly allow or block specific actions and reusable workflows. The steps below walk through configuring a repository policy in the enterprise settings, the meaning of the Marketplace verified creator badge, creating allow/block lists, and validating the policy by running example workflows. I’m in the enterprise account settings, on the Policies tab where repository policies were previously created.
A dark-mode GitHub organization settings page for "NextGen Gaming." The Policies > Repository policies view lists one repository policy called "repo-policy-1" and shows a green "New policy" button.

Enterprise Actions policy: scope and main options

You can apply an Actions policy to all organizations in the enterprise or narrow it to specific organizations. There are three main approaches to control which actions and reusable workflows are permitted:
  • Allow all actions and reusable workflows (any author).
  • Allow only actions and reusable workflows that belong to the enterprise.
  • Allow a restricted set, for example:
    • Only GitHub-created actions.
    • Marketplace actions from publishers with the verified creator badge.
Table — Policy controls and examples What the verified creator badge means
A screenshot of the GitHub Docs page titled "About marketplace badges" in dark mode, showing breadcrumbs, the page heading and explanatory text about publisher/marketplace badges with note and warning sections. Browser tabs and the window UI are visible across the top.
The verified creator badge indicates GitHub has validated the publisher (ownership of their domain), confirmed a contact email, and enforced two‑factor authentication for the organization. This increases confidence in the provenance of Marketplace actions. See the GitHub Docs about marketplace badges for full details: https://docs.github.com/en/marketplace/marketplace/badges/about-marketplace-badges
Use the verified‑creator option when you want to reduce risk from third‑party actions and only allow Marketplace actions whose publishers have been validated by GitHub.

Allow / block lists: patterns and syntax

You can specify a comma-separated list of actions or reusable workflows to explicitly allow or to explicitly block. Important syntax points:
  • Use the ! prefix to block an action.
  • Wildcards, tags, and SHAs are supported.
  • Reusable workflow references must include the workflow path and ref.
Example patterns and usage:
When you save the policy it is persisted at the enterprise level. In this walkthrough, I applied the policy across all organizations.

Testing the policy in a repository

To validate the enterprise Actions policy, test it against a repository workflow. For this demo I used the GHAS schedules demo repository and updated its CI workflow to include:
  • A local composite action (./composite-action) — allowed
  • A random, non‑Marketplace action (some-random/action@v2) — expected to be blocked
  • A verified Marketplace action (Super-Linter) — expected to be allowed
Example workflow file saved at .github/workflows/using-composite-workflow.yml:
I committed this change to the main branch. Because the workflow references some-random/action@v2 — an action not allowed by the enterprise policy — the run will fail during startup.
If a workflow references any action that the enterprise policy disallows, the workflow fails immediately at startup. Use this behavior to validate your allow/block settings before deploying changes widely.
When the workflow ran, it failed at startup with an explicit error stating that some-random/action@v2 is not allowed because actions must be from an approved or verified source.
A GitHub Actions run page showing a failed workflow titled "Add Super-linter action to CI workflow #3" with status "Startup failure" and a message that the workflow graph cannot be shown. An error note says the action "some-random/action@v2" is not allowed because actions must be from an approved/verified source.
The error clearly indicates the unverified action is not permitted. Under the chosen policy only GitHub‑created actions or Marketplace actions whose publishers are verified are allowed.

Additional validation: third‑party PR‑Agent action

To further test the policy, I added a PR‑Agent step (a third‑party action) to the workflow. This can be in a separate workflow file such as .github/workflows/pr-agent.yml:
After committing these changes, the run again failed at startup. The startup error annotation listed both the random action and the PR‑Agent action as disallowed because neither is verified in the Marketplace under the enterprise policy.
A GitHub Actions run page showing a failed workflow titled "Add PR Agent action step to CI workflow" with status "Startup failure." The workflow graph is empty and an annotation reports an error that certain actions are not allowed in the repository/enterprise.
Table — Test outcomes

Other Actions policy settings

Enterprise Actions policy also provides additional controls you can manage from the Actions settings area:
  • Artifact and log retention periods — control how long artifacts and logs are kept.
  • Approval requirements for workflows from forks or external contributors — require explicit approval before such workflows run.
  • Runner groups, custom runner images, and OIDC configurations — configure runner access and identity provider options.
A dark‑theme screenshot of a GitHub Actions settings page showing retention controls (unused version retention, maximum version age, and artifact/log retention) with numeric input fields and Save buttons. Below that are radio options for approval rules for running workflows from forked or external contributors.

Summary and recommendations

  • Enterprise Actions policies let you centrally control which actions and reusable workflows can run across your organizations.
  • Use the verified‑creator Marketplace option and explicit allow/block lists to reduce exposure to untrusted third‑party actions.
  • Always test policies in a controlled repository and confirm disallowed actions are blocked during workflow startup.
  • When rolling out stricter policies, communicate changes to repo maintainers and provide guidance on approved Marketplace actions or how to publish verified actions through your enterprise.
Links and references

Watch Video