Who runs what

Every place Redline runs, the credential it holds there, and how far that credential reaches.

ℹ

For the platform team setting up or auditing Redline, and for any engineer who wants to know what Redline can touch before they onboard.

The model in one table

Redline writes into repositories and reads across an organisation, so it owes you an exact account of its blast radius: what each credential could reach if it were misused or leaked. Each row below holds a different credential, and none can do another row's job.

WhoRuns whereRunsCredentialCan reach
YouYour machine, in one checkoutinit, verify, review, removeYour own GitHub authThe one repository you are in. init and remove open a pull request; they do not push.
The merge gateThe onboarded repository's CI, on each pull requestpolicy, exemptThe run's own GITHUB_TOKENThe pull request that triggered it, in that repository only.
Platform team: measureScheduled, in the source repository and redline-metricsmetrics, registry, verifyREDLINE_ORG_READ_TOKENEvery repository in the org, read-only. It writes nothing to them.
Platform team: distributeThe source repository, on a change to standards/syncREDLINE_SYNC_TOKENEvery registered repository, and only by opening a pull request.
Platform team: test the reviewerredline-metrics, weeklyseed-canary.ymlREDLINE_CANARY_TOKENThe canary repositories only.
Redline maintainersThis repository's CIThe four source-check scriptsThe CI run's own tokenThis repository only.

Three things follow from it:

  • Onboarding grants Redline nothing. No product repository holds a Redline secret. The central tokens are created by a person on the platform team, never by redline init.
  • The widest credential is read-only. Only the measurement token reaches every repository, and it cannot write.
  • Nothing pushes to your default branch. Every write into a product repository arrives as a pull request.

The sections below give the evidence for each row.

You, on your own machine

redline init, redline verify, redline review and redline remove run in your shell, from a checkout.

  • Credential: your own GitHub auth and nothing else. cli/platforms/github/client.ts reads GH_TOKEN, then GITHUB_TOKEN, then falls back to gh auth token. Redline never creates or stores a credential. .redline.json records your choices, not a secret.
  • Reach: the repository you are in. It cannot reach a second repository or act on the organisation.
  • Without admin rights it still works. Whatever your token cannot change is recorded for an administrator rather than skipped — see Onboard a repository.

Six more commands need no credential and contact no host: status, explain, doctor, evidence (writes only .redline.json), funnel (a file under ~/.redline, off by default) and completion.

Does a local review send my code anywhere?

Not unless you choose an endpoint that does. The default embedded engine calls no model: it prints a prompt for the assistant already running the command.

The api engine calls an endpoint. For the openai provider the default is http://localhost:11434/v1, a local Ollama server. cli/review/engines/api.ts asks for no API key when the endpoint is localhost, 127.0.0.1 or [::1]. With a local model, the diff stays on your machine:

terminal
$ redline review --engine api --provider openai --model qwen2.5-coder:14b

A remote endpoint with no key fails instead of sending an unauthenticated request. See Reviewing before you push.

The merge gate, in your repository's CI

You do not run redline policy or redline exempt. The merge gate does: workflows/redline-gate.yml, called on each pull request by the thin .github/workflows/redline.yml that redline init installs.

  • Credential: the run's own GITHUB_TOKEN, which GitHub scopes to one repository. The gate's whole grant is below.
  • Reach: the pull request that triggered it. A repository-scoped token cannot address another repository.
  • No model call. redline policy checks only the deterministic rules, the ones a program can decide. AI review is a separate concern.
workflows/redline-gate.yml — the entire grant
permissions:
  contents: read
  pull-requests: write

The platform team, on a schedule

Three central tokens, each created and stored by a person on the platform team. They could have been one token. They are three so that each can be reasoned about on its own.

Measure: REDLINE_ORG_READ_TOKEN

Read-only. It runs redline metrics and redline registry from redline-collect.yml, dashboard.yml, inbox.yml, weekly-digest.yml, verify-onboarding.yml and .github/workflows/registry.yml. redline-collect.yml states it where the token is used: “Read-only: repo metadata + pull requests across the org. No write scope.”

Some of these workflows declare contents: write, pages: write or issues: write. Those apply to the central repository the job runs in, through the run's own token: committing telemetry, publishing a page, opening a tracking issue. They never apply to the repositories being measured.

✓

Why measurement is central. A collector in every repository would need a cross-repository token stored in every one of them. One read token in one central repository has a far smaller blast radius.

Distribute: REDLINE_SYNC_TOKEN

One workflow, workflows/redline-sync.yml, running redline sync. The file documents its scope where the secret is used: contents, pull_requests and workflows write on each target repository.

  • It only opens pull requests. The file's header: standards are distributed “never as direct pushes, and never as a merge”. Merging is the repository's decision.
  • Its targets are derived, not listed. They come from registry.json, rebuilt nightly from the .redline.json each onboarded repository carries. A repository that runs redline remove drops out without anyone editing a list.
  • It refuses to distribute stale files. The job runs render-self.mjs --check before it opens anything.

More on Distribution and drift.

Test the reviewer: REDLINE_CANARY_TOKEN

workflows/seed-canary.yml opens a throwaway pull request of known-bad code on a canary repository each week, to check the reviewer still catches it — see Seeded corpus. That needs write access, so it gets its own token, and the file limits it:

workflows/seed-canary.yml — header
#   secrets.REDLINE_CANARY_TOKEN   contents:write + pull_requests:write on the canary
#                                  repos ONLY. Never an org-wide token.

Redline's own maintainers

.github/workflows/ci.yml runs the four source checks — validate.mjs, assign-rule-ids.mjs, render-self.mjs and check-pins.mjs — on this repository. release.yml runs the first three again before a publish. They need no credential beyond the CI run's own.

Only check-pins.mjs uses the network. It compares each pinned action and image with the tag its comment names, and checks the gate's redlinegate version against npm. It runs here and nowhere else; the gate never runs it in your repository. All of them are on Maintainer scripts.

Limits

⚠

The workflows on this page are GitHub Actions, and they reach GitHub repositories only. The CLI onboards and verifies Azure DevOps repositories by hand, but the register is discovered from GitHub, redline sync refuses an Azure entry as unsupported, and verify-onboarding.yml checks GitHub entries only. Today, nothing on a schedule measures or syncs an Azure repository — see Telemetry & validation.

For what redline init installs in one repository, see Onboard a repository. To take it back out, see Removing Redline.