Add Actions policies support

Open
#1,127 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
54/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
github, javascript, yaml
Domain
api, devtools

Research direction

Read the repository's existing settings and plugin handling entry points to find how repository configuration is translated into GitHub API calls. Compare that flow with the Actions policies REST API linked in the issue and determine how the proposed actions_policies configuration maps to its fields. Done means repository Actions policies can be managed from configuration; add or update tests for the configuration and API behavior.

Written by the indexing model from the issue text.

Description

enhancement

Prerequisites:

  • Is the functionality available in the GitHub UI? If so, please provide a link to information about the feature.

Yes, check https://docs.github.com/en/actions/concepts/about-actions-policies

Yes, see https://docs.github.com/en/rest/actions/policies?apiVersion=2026-03-10

New Feature

Please describe the desired new functionality:

I expect the ability to manage (repository) actions policies, e.g. by a new plugin. Here's how the configuration may look like, based on API fields:

.github/repos/.yml (or settings.yml / suborgs/*.yml)

actions_policies:
  - name: restrict-deploy-workflows
    enforcement: active
    conditions:
      workflow_path:
        include:
          - .github/workflows/deploy*.yml
        exclude:
          - .github/workflows/deploy-docs.yml
    rules:
      - type: restrict_actions_actors
        parameters:
          allowed_actors:
            - id: 12345
              type: Team
      - type: restrict_action_events
        parameters:
          allowed_events:
            - push
            - workflow_dispatch

  - name: audit-everything
    enforcement: evaluate
    rules:
      - type: restrict_action_events
        parameters:
          allowed_events: [push, pull_request, schedule]
Dominant language
JavaScript
Stars
942
Forks
238
PR merge metrics
No merged PRs in 30d

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github-community-projects/safe-settings

All issues in github-community-projects/safe-settings

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.