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.
| Who | Runs where | Runs | Credential | Can reach |
|---|---|---|---|---|
| You | Your machine, in one checkout | init, verify, review, remove | Your own GitHub auth | The one repository you are in. init and remove open a pull request; they do not push. |
| The merge gate | The onboarded repository's CI, on each pull request | policy, exempt | The run's own GITHUB_TOKEN | The pull request that triggered it, in that repository only. |
| Platform team: measure | Scheduled, in the source repository and redline-metrics | metrics, registry, verify | REDLINE_ORG_READ_TOKEN | Every repository in the org, read-only. It writes nothing to them. |
| Platform team: distribute | The source repository, on a change to standards/ | sync | REDLINE_SYNC_TOKEN | Every registered repository, and only by opening a pull request. |
| Platform team: test the reviewer | redline-metrics, weekly | seed-canary.yml | REDLINE_CANARY_TOKEN | The canary repositories only. |
| Redline maintainers | This repository's CI | The four source-check scripts | The CI run's own token | This 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.tsreadsGH_TOKEN, thenGITHUB_TOKEN, then falls back togh auth token. Redline never creates or stores a credential..redline.jsonrecords 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:
$ 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 policychecks only the deterministic rules, the ones a program can decide. AI review is a separate concern.
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.jsoneach onboarded repository carries. A repository that runsredline removedrops out without anyone editing a list. - It refuses to distribute stale files. The job runs
render-self.mjs --checkbefore 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:
# 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.