Skip to content

CI workflow changes

The risk: an AI agent edits a workflow or an action so that a required check passes whatever it tests, or so that CI runs new code once the change reaches your default branch, and the change merges because it looks like routine CI upkeep.

What Arbiter does: every change under .github/, and to any action.yml or action.yaml, needs an approval from your platform team. While a pull request changes a workflow or action, its check results count only if your security team approves too. This rule does not read the workflow: it acts on where the change is, not what it says. If you also turn on the workflow analysis (workflow_analysis in your policy, off unless you add it), Arbiter reads the changed workflow and action files and holds a change that adds a risky trigger, a widened permission, an unpinned action or untrusted input in a script.

  • Every change to a listed path needs one approval from your platform team (acme/platform in the starter policy). The starter lists .github/**, **/action.yml and **/action.yaml, so this covers workflows, local actions, a CODEOWNERS file under .github/, Dependabot settings and an action defined in any folder. GitHub also reads a CODEOWNERS file at the root or in docs/, which the starter does not list: add it if you keep it there. A new file, an edited file, a deleted file and a file renamed into or out of a listed path all count, and so do dot-files such as .github/workflows/.hidden.yml.
  • A change to how checks run needs your security team too (acme/security, the check_definitions approvers). These paths are .github/workflows/**, .github/actions/**, **/action.yml and **/action.yaml, always, plus any you add under check_definitions.paths. So is an action’s whole folder (the built code and the script an action runs, beside its action.yml), and so is what a required check’s workflow calls: a local reusable workflow, a local action, a JavaScript action’s main, pre and post files, and a Docker action’s Dockerfile. So is what a required check runs: Arbiter reads every run: step and follows the scripts it starts (shell, a Makefile, a package.json script, a command found through PATH, Python, JavaScript and TypeScript, and Terraform), and the test files a test runner finds by itself (policy-author manual P4). While a pull request changes one of them, none of its required checks count until that team approves, not even a passing trusted scan. The starter requires the secret scan on every pull request, so every workflow or action change needs both approvals.
  • Some setups make the ordinary required checks count as missing, and no approval clears it (policy-author manual P4): a link or submodule where checks are defined (replace it with a file); a call to code by a name that can move, such as a tag or branch (@v4, @main), an image tag or an expression, which you pin to a full commit (a step that calls an action from actions/ or github/ is exempt); a pinned workflow or action in another repository that Arbiter can’t read; a check from a service other than GitHub Actions; a run: step Arbiter can’t trace (an unknown variable, eval, a program fed by a pipe such as curl … | bash, a script in another language, a build, task or container tool such as go, cargo, gradle or docker, or a shell form outside the fixed set it reads: the manual lists them, with a rewrite for the common ones); and more than 8 calls deep, 400 files or 8 MB. A trusted check is not affected.
  • CODEOWNERS and dependabot.yml under .github/ need only the platform approval, as they do not change how checks run.
  • Each approval counts only if it is the reviewer’s latest decisive review, approves the latest commit, and comes from an active member of that team in your organization, whose account is also on the policy’s approver list (P16), who did not open the pull request, author or commit any of its commits, or create or push to its branch. A review by a bot does not count.

The starter policy (Starter policy and onboarding) already has these rules. Adapt them to your repository.

  1. Name your teams: the platform team in each required_approvals, and the security team in check_definitions.approvers (policy-author manual, P4). Pick two different teams, so two groups see the change.

  2. List the files outside .github/ that CI reads and that Arbiter does not follow:

    • a config file a tool finds on its own, without a step naming it (a scanner’s config file, for example), and any file the manual says Arbiter can miss (P4).

    Arbiter already treats an action’s whole folder, what a required check’s workflow calls, and what it runs (the scripts its run: steps start, and the files they use), as check definitions: a change to one needs the check_definitions approval without a listing. A link or submodule where checks are defined makes the ordinary required checks count as missing, and no approval clears it. Replace it with a regular file; listing the file it points to does not help.

  3. Add each one three times, to also ask your platform team to approve a file or folder (a CI scripts folder, for example): to protected_paths, to evidence_requirements with the platform approval, and to check_definitions.paths. Keep the paths already in that list:

    protected_paths:
    - pattern: "ci-scripts/**"
    label: "CI scripts"
    risk_class: "standard"
    evidence_requirements:
    - path_pattern: "ci-scripts/**"
    required_approvals: { team: "acme/platform", min_approvals: 1 }
    check_definitions:
    paths: ["**/.gitleaks.toml", "**/.gitleaksignore", "ci-scripts/**"]
    approvers: { team: "acme/security", min_approvals: 1 }
  4. Pair it with GitHub’s own settings, listed in the starter guide, to limit what a pull request’s workflow run can reach. setup-check reports where they stand: the default token, approval for outside contributors’ runs, secrets any workflow can use, and long-lived cloud keys; the last two need the administrator’s own GitHub token (administrator manual, A9c).

  5. Switch on blocking when you are ready: the starter runs in advisory mode (below).

Patterns ignore letter case, so a change under .Github/ is held like one under .github/, and Action.yml is a check definition like action.yml.

Off unless your policy has a workflow_analysis section (policy-author manual, P13). A sample policy with it on is the starter’s policies/acme/ci-workflows.

When a pull request changes a workflow file (directly in .github/workflows/, named .yml or .yaml) or an action file (action.yml or action.yaml, at any depth), Arbiter reads that file at the pull request’s head and at its merge base, and names what the change adds. Every kind but privileged_trigger compares the file with its merge-base version:

  • privileged_trigger: the workflow runs on a trigger not proven safe. Only pull_request, push, schedule and workflow_dispatch are; every other trigger, pull_request_target, workflow_run and merge_group included, is privileged. It is raised on any change to such a file, not only when the trigger is new, so even a typo fix in a pull_request_target workflow is held.
  • permissions_widened: a job, or the workflow’s default, gains a write permission it didn’t have; a job that is new, or was narrower before, and has no permissions: block (it then counts as getting every permission the repository allows); or a job that newly passes secrets: inherit.
  • unpinned_action: a uses: that is not pinned to a full 40-character commit SHA (a Docker image to its sha256 digest). Actions from the owners in pin_exempt_owners need no pin; by default those are actions and github.
  • untrusted_input: a ${{ }} expression in a run: script, or an actions/github-script script, that reads a value an outsider can set, such as github.head_ref or a pull request’s title. Only a short list of values, such as github.sha and secrets.<name>, counts as safe.
  • base_moved: the base branch changed the file after the pull request branched off, so the check may not be reading the file you will merge.
  • unparsed: part of the file Arbiter could not read.

Each finding is held until the team the section names approves. A kind listed under deny is denied, and no approval clears it; listing any kind also denies unparsed and base_moved. The check, its comment and the decision record show each finding’s kind, file and line, never what the file says.

Tested by automated tests only in this release. Its live end-to-end cases on real repositories come in a later release. Turn it on in advisory mode first, and check its findings on your own pull requests before you switch on blocking.

It reads GitHub within a request budget: a GitHub answer without its rate-limit header denies the pull request (request_budget), so run one Arbiter server per installation.

When Arbiter can’t read the change, it denies the pull request, and no approval clears it (CHANGE_ANALYSIS_UNREADABLE): more than 200 changed workflow or action files; a file over 1 MiB, or over 32 MiB in all; a changed file that is a link or not a regular file; a file with a duplicate key, a YAML tag, more than 100 aliases or nesting past 64 levels; more than 10 seconds of parsing; or GitHub unreadable or out of requests. The analysis works only on a running Arbiter server, not on the GitHub Action: with the section in the policy, the Action denies every pull request.

  • A pull request’s own workflow run. GitHub can run a branch’s workflows, as the branch changed them, as soon as it is pushed, before anyone approves and before Arbiter’s check on its pull request. Arbiter’s check can hold only the merge; it does not stop or cancel a workflow run. GitHub’s settings limit what that run can reach: setup-check reports them (A9c) but does not change them, and a workflow file can still raise its own permissions: whatever the repository’s default token allows.
  • The content of the change, unless you turn on the workflow analysis. Without it, a new pull_request_target trigger and a typo fix get the same rule, and your approvers judge the change. With it, Arbiter looks only for the findings above. It does not see: an untrusted value passed through env:, written to GITHUB_ENV or GITHUB_OUTPUT, or given to an action’s with: inputs; actions/github-script code that reads the event payload with no ${{ }}; runs-on, environment:, container or services changes; what a reusable workflow or action in another repository contains (only its pin); a 40-character pin that names a commit in a fork of the action’s repository; a permission scope GitHub adds later; a new step that reuses an expression already used elsewhere in the same job.
  • A private repository that sends secrets or write tokens to fork pull-request workflows. pull_request counts as safe because GitHub’s default withholds both from a fork’s run. The workflow analysis doesn’t read that setting, so on a repository that changes it, a pull_request workflow is not held. setup-check reports the setting (W2, administrator manual A9c).
  • A file Arbiter does not follow. Arbiter follows what a required check’s workflow calls and runs, and an action’s whole folder, by reading the files; it does not run them. A pull request can change a file a check runs without Arbiter asking for the check_definitions approval in the cases the policy-author manual lists under “What Arbiter can miss” (P4): for example a config file a tool finds on its own without a step naming it, a library that imports a repository file by a string name, or a test runner whose root isn’t its config’s folder. A script that no required check’s workflow runs is not followed at all, and neither is a trusted check’s code (it lives in another repository). Arbiter also refuses a safe check in some cases (the ordinary required checks then count as missing). Closing these is planned for a later release. Until then, make an important check a trusted check, or list the file you know it reads.
  • Another repository. A reusable workflow or action kept in another repository changes there, not in this pull request. It must be called by a full commit: Arbiter reads it at that commit when its App is installed there, and counts the ordinary required checks as missing when it can’t read it. Keep it under that repository’s own review.
  • One person in both teams. An approval from someone in both teams counts for each, so one review can meet both.
  • A pull request from a fork. Arbiter cannot count approvals on a fork, so a change to a listed path is not allowed until it is opened from a branch in your repository. The check says GitHub data could not be read.
  • Advisory mode. The rule blocks the merge only in enforce mode, with Arbiter’s check required on the branch (administrator manual, A8). In advisory mode, which the starter ships with, the check is neutral (“Would block”) and the pull request can merge. Two exceptions: Arbiter denies every pull request, in every mode, when it cannot confirm that the policy repository is protected, or when the target branch does not require the check with “Require branches to be up to date before merging” on.
  • The check: for a workflow change with no approval, Arbiter / authorize reads “Blocked: needs approval from acme/platform (+1 more)” (“Would block: …” in advisory mode). With the platform approval alone it reads “Blocked: changes how checks are defined”.
  • The comment names the protected area, for example GitHub configuration (workflows, actions, CODEOWNERS, Dependabot) with the changed file, and says what is missing: an approval from acme/platform that counts on the latest commit, and, for a workflow or action, that the pull request “changes how checks are defined, so check results cannot count”. Its next steps are to ask members of acme/platform, then of acme/security, to approve (1 needed each).
  • Arbiter checks the pull request again after each push and each review.
  • The pull request author guide explains the comment and which approvals count.

The path rule adds nothing to what Arbiter reads: it uses the paths the pull request changes, the approvals on GitHub, the members of the named teams, and the results of the checks your policy requires. When your policy requires an ordinary check, Arbiter also reads the repository’s file list and, in memory, the workflow, action and script files that check runs, to work out which paths are check definitions; it keeps none of them and logs only a fixed reason. With the workflow analysis on, Arbiter reads the changed workflow and action files in memory and keeps only each finding’s kind, file and line; see What Arbiter receives, keeps and deletes. setup-check’s reads of the Actions settings are in that page’s “Setup check” row, and the workflow analysis’s reads are in its “Workflow and dependency files” row.


Built from Arbiter 0.1.3 at commit 05d1dcb.