Dependency changes
The risk: an AI agent adds a dependency with a known vulnerability, or edits a lockfile to pull one in, and the change merges because a version bump looks like routine work.
What Arbiter does: every change to a dependency file your policy lists needs two things on the pull request’s latest commit: a pass from your trusted dependency scan, and an approval from your platform team.
The rule
Section titled “The rule”- The rule covers every change to a listed dependency file, at any depth and in dot-folders: a new file, an edited file, a deleted file, and a file renamed to or from a listed name. The starter policy lists 75 file patterns.
- It needs a passing scan and one approval. A pull request that changes several listed files needs the
same two things, once:
- a passing
dependency-checkresult from your trusted scan, for the latest commit and the current target branch. The scan is OSV-Scanner, run by a workflow kept in your own separate repository, at the commit your policy pins. The workflow posts only its result to Arbiter, and Arbiter counts it only if GitHub’s identity token shows it came from that workflow file at that commit. A check nameddependency-checkfrom any other workflow never counts; - one approval from your platform team (
acme/platformin the starter policy), counted by the same rules as every Arbiter approval: it is the reviewer’s latest decisive review, approves the latest commit, and comes from an active member of the team 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.
- a passing
- The other rules still apply. In the starter policy every pull request also needs a passing trusted secret scan.
- The scan reads the whole repository, not only the files the pull request changes. Your repository’s own
osv-scanner.tomlhas no effect, and the scan ignores no vulnerability. - A change to how checks run needs one more approval. While the pull request also changes a workflow, an action,
or a file listed in
check_definitions, the scan’s result counts only ifacme/securityapproves too. - Arbiter does not wait for Dependabot. Dependabot is GitHub’s service, not part of Arbiter, and GitHub can be late with its alerts and its fix pull requests, at times by hours. For a file the policy lists, Arbiter needs the scan’s pass on the pull request itself, whatever Dependabot has or has not reported.
- Which files the scan reads by name, anywhere in the repository. The starter policy lists each one:
- npm, pnpm and yarn:
package-lock.json,pnpm-lock.yaml,yarn.lock; - Python:
requirements.txt,poetry.lock,Pipfile.lock; - Go:
go.sum, for which the scan reads thego.modbeside it (ago.sumwithout one fails the scan); - Rust:
Cargo.lock; - Java and Kotlin:
pom.xml,gradle.lockfile; - Ruby:
Gemfile.lock; - PHP:
composer.lock.
- npm, pnpm and yarn:
- Which listed files the scan does not read by name. A change to one of these still needs the pass and the
approval, but the pass makes no claim about the file itself:
- manifests whose packages the scan sees only through a lockfile above, if you commit one:
package.json,pyproject.toml,Pipfile,Cargo.toml,Gemfile,composer.json, and Gradle build files; - other files, such as
requirements-dev.txt,uv.lock,setup.cfg,npm-shrinkwrap.json,bun.lock,.npmrc,go.work, ago.modwith nogo.sumbeside it, and every .NET file (*.csproj,packages.lock.json,nuget.configand others). Arbiter claims no scan coverage for these: treat the approval as the only control; - vendored code (a library copied into
vendor/,third_party/,third-party/ornode_modules/), container images (Dockerfile,Containerfile), Git submodules (.gitmodules), and the other ecosystems the starter lists (PDM, conda, Deno, Dart and Flutter, Swift and CocoaPods, Scala, Elixir, Helm). The scan makes no claim about them, so the approval is the only control.
- manifests whose packages the scan sees only through a lockfile above, if you commit one:
- Which files are not protected: any file the policy does not list, for example a requirements file under
another name (
deps/prod.txt), an install script, aMakefilethat downloads a tool,flake.lock, Bazel files,docker-compose.yml, and code copied into a folder with another name. Thethird_partypattern also catches your own code in a folder of that name.
Set it up
Section titled “Set it up”The starter policy (Starter policy and onboarding, “Dependency changes”) lists the patterns and the scan. Then:
-
Set up your trusted repository. The trusted workflows, the small caller file each pilot repository runs, and their setup guide come with the starter files, in the
trusted-workflowsfolder. Follow that guide, including its route check, which confirms that a scan’s result can get through to Arbiter’s address. Whoever can merge to that repository controls the scan, so protect it like your policy repository. -
Pin your scan in the policy. The starter writes the
dependency-checkentry once, at the first dependency rule, and every other dependency rule reuses it. Replace its owner and repository (acme/arbiter-trusted) and its commit. The starter’s commit is forty zeros, which never matches, so every dependency change is blocked until you do. -
Name your platform team in place of
acme/platform. -
Check that GitHub lets the caller run. It runs on the
pull_request_targetevent. If your organization’s Actions settings block that event for a repository, no result arrives from it, and every dependency change there is blocked. -
Add the dependency files your repositories use that the starter does not list, each as a
protected_pathsentry and as an evidence requirement with the same pattern. Copy an existing dependency rule for the requirement, so it needs the same scan and approval:protected_paths:- pattern: "**/flake.lock"label: "Dependencies (Nix)"risk_class: "standard" -
Switch on blocking when you are ready: the starter runs in advisory mode (below).
Patterns ignore letter case, so one spelling matches the others: Package.json is read as package.json is, and a
lower-case dockerfile is caught by **/Dockerfile. The starter still lists nuget.config and NuGet.Config separately,
which is redundant but harmless.
The dependency analysis (optional)
Section titled “The dependency analysis (optional)”The scan finds known vulnerabilities. The dependency analysis looks at what a change adds. It is off unless your policy
has a dependency_analysis section (policy-author manual,
P14).
When a pull request changes a dependency file the section covers, Arbiter reads that file at the pull request’s head and
at its merge base, and names what the change adds. By default it reads package.json, package-lock.json and
npm-shrinkwrap.json (lockfile version 2 or 3), requirements*.txt, constraints*.txt and .txt files under a
requirements folder, and go.mod. It notes, without reading them, any change to go.sum (a change to it without
go.mod is lockfile_only) and to a registry settings file (.npmrc, .yarnrc, .yarnrc.yml, pip.conf, pip.ini).
The findings:
new_package: a package that was not in the merge-base version, in a manifest’s dependency sections or as an entry in an npm lockfile (go.sumis not read), a transitive one included.likely_typosquat: a new package whose name resembles a popular package on Arbiter’s own list (the 5,000 most popular names for npm, PyPI and Go). The finding names the popular package it resembles.lockfile_only: a lockfile changed while the manifest beside it did not (package-lock.jsonwithoutpackage.json,go.sumwithoutgo.mod).source_changed: a package now comes from somewhere other than the default registry: a path, a tarball, a Git or URL source; a lockfile entry from a host that is not the default (npm’sregistry.npmjs.org, PyPI’spypi.organdfiles.pythonhosted.org) or in the policy’sallowed_registries; an npm lockfile entry whose integrity differs from the merge base’s for the same version, or whose registry URL is another package’s tarball; a requirements index, find-links, trusted-host, editable, URL or path line; ago.modreplacedirective; or any change to a registry settings file.not_analysed: a changed file the policy’spathsmatch that Arbiter does not analyse, or an npm lockfile of another version.unparsed: part of a 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 a file Arbiter can’t parse. The check, its comment and the decision record show
each finding’s kind, file and line, and a likely typosquat’s popular name, never what the file says or a package name
from it.
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.
When Arbiter can’t read the change, it denies the pull request, and no approval clears it
(CHANGE_ANALYSIS_UNREADABLE): more than 200 changed files that the analysis reads (dependency files and, with the
workflow analysis on, workflow files); a file over 1 MiB (8 MiB for an npm lockfile), or
over 32 MiB in all; a changed file that is a link or not a regular file; a file Arbiter reads that is malformed
past its limits; 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.
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.
What it does not cover
Section titled “What it does not cover”- New malicious packages. OSV-Scanner finds known vulnerabilities only. A new malicious package, a typosquat, or a lockfile pointing at an unvetted version with no published advisory is not caught by the scan. The platform approval is the control for those, on every dependency pull request, bot updates included. The dependency analysis holds a new package and a likely typosquat for review, but it checks names against a list and reads no package.
- What the dependency analysis does not see:
- dependency files of other ecosystems (
yarn.lock,pnpm-lock.yaml,poetry.lock,Cargo.*, Ruby, PHP, Java and .NET files): not read, and by default not even noticed, because the defaultpathsdo not match them. Add a pattern topathsand a change to such a file is held asnot_analysed, but its contents are still not read; - the
catalog:andpatch:forms that pnpm and Yarn read; - a new version of a package already in the manifest or the lockfile, and a manifest’s
scripts,bin,bundledDependencies,pnpm.overridesandworkspaces; - a package’s install scripts, maintainers, age, or any malware feed. A typosquat is found only against the committed list of popular names.
- dependency files of other ecosystems (
- A vulnerability published after the scan passed. A stored pass has no age limit. A package that becomes known to be vulnerable after the scan passed is not caught until the scan runs again, for example on the next commit.
- Waivers. A known-vulnerable package already in a lockfile the scan reads fails the scan, and so blocks every dependency change, until someone fixes or removes it. The scan has no ignore list.
- Repositories the scan cannot read. A submodule, a Git LFS pointer or any file over 5 MB fails the scan, among other limits Trusted scans lists.
- Dependabot’s own pull requests, for now. Their scan result counts only if GitHub gives Dependabot’s scan runs the identity token the result needs. This release does not yet claim that. Without the token, no result arrives, and those pull requests are blocked.
- A pull request from a fork. The trusted scan still runs, and its result is stored, but Arbiter cannot count approvals on a fork, so the change stays blocked until it is opened from a branch in your repository (Starter policy and onboarding, “Pull requests from forks”).
- Advisory mode. The rule blocks the merge only in enforce mode, with Arbiter’s check required on the branch. 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.
What the pull request author sees
Section titled “What the pull request author sees”- The check:
Arbiter / authorizereads, for example, “Blocked: needs approval from acme/platform”, “Blocked: needs trusted check dependency-check to pass” or “Blocked: trusted check dependency-check failed” (“Would block: …” in advisory mode), with “(+1 more)” or similar when something else is also missing. - The comment names the dependency files changed and what is missing, with a step for each:
- no scan result yet: let the trusted scan run on the latest commit, or re-run it from the Actions tab if it did not start;
- a failed scan: open the scan’s run in the Actions tab, fix what it found, push, and let it pass;
- no approval: ask members of
acme/platformto approve (1 needed).
- The scan’s run log names no vulnerable package. To see which ones failed, run OSV-Scanner on the branch yourself.
- Arbiter checks the pull request again as soon as it stores a new scan result, and after each review.
- The pull request author guide explains the comment and which approvals count.
What Arbiter reads
Section titled “What Arbiter reads”The scan rule reads no dependency file and no scanner output: the scan runs in your own GitHub Actions. The data rule lists every other read, such as the files an ordinary required check runs. With the
dependency analysis on, Arbiter reads the changed dependency files in memory and keeps only each finding’s kind, file
and line (and a likely typosquat’s popular name); see the “Workflow and dependency files” row in
What Arbiter receives, keeps and deletes. The scan rule uses the paths the pull
request changes, the approvals on GitHub, the members of the named team, and the scan’s result: the
check name, the commit and success or failure. For each result, Arbiter keeps the repository, the pull request
number and target branch, the commit, the workflow and its pinned commit, the conclusion and the run’s numbers, until
they are deleted. What Arbiter receives, keeps and deletes lists every field.
Built from Arbiter 0.1.3 at commit 05d1dcb.