Docs · Security
Security: the trust model, signing, and how to verify
What ModernCI protects, who and what it trusts, and the commands that let you check it yourself.
What it guarantees
A commit lands on a target branch only if it is a fast-forward of the tip that was checked, every required gate check passed on exactly that tree, and any guarded change has a current approval from a person. The landing process re-checks all of this itself, from the store, before it pushes. A PR counts as landed only when the landing log says so, and the landing process raises integrity.branch_rewritten for any target move that is not in that log.
Out of scope today: a compromised engine that forges check results (runners do not sign results yet).
Separate processes, separate keys
| Process | Holds | Cannot |
|---|---|---|
| Engine | A read-only forge key. | Push to a target branch: the git host allows only the landing key there. |
| Landing process | The landing key; its own OS user and directory. | Be reached except through a local Unix socket from the engine's user. Its database role can read and append the landing log, nothing else. |
| Signer | The release signing key; its own OS user. | Sign anything but a content digest or a ModernCI provenance statement. It never sees artifact content. |
| Jobs | Only the secrets released to that job, and a job token. | Read the engine's, landing or signing keys, or other tenants' data. |
The git host enforces the landing rule: protect each target branch so only the landing key can push. ModernCI verifies the protection by pushing to a sentinel branch mci/probe/<target>.
Who can change what
- Settings (budgets, approvers, forges, compute, features) are changed by a person in ModernCI, never read from a file in the repo. A
.ci/file containing such a key is refused. Anyone who can push a branch therefore cannot change how CI is judged. - Guarded files (everything under
.ci/) and gate changes need an approval: a passkey (WebAuthn) assertion over a challenge bound to the tenant, repo, PR, kind, exact head commit and the guarded content at the base. A new push, or a different base, invalidates it. The API verifies the assertion and the landing process verifies it again. A passkey is required whichever way the person signed in. - Roles and tokens: an API token belongs to one identity (person or agent) with a role at tenant or project level. Tokens are shown once and stored as hashes. Agents cannot approve. Rights stop at the tenant boundary; the operator has none inside a tenant unless the tenant grants support access for a limited time (
mci support grant/mci support revoke). - Audit: tenant admins read the audit log with
mci audit --tenant "$TENANT". - Delegated approval is an operator-only development mode for one named tenant. It is counted as a bypass in the landing log and raises a standing alarm while on. Do not enable it for customers.
Secrets
Secrets are write-only and are released to a job only through the job's secret channel (never a command line), redacted from logs. A forge or compute connection's config is refused if it contains a secret-looking key. Writing secrets (mci secrets put) is not available yet.
Job identity
A running job can fetch a short-lived OpenID Connect token that names its tenant, repo, ref, commit, check and run. It is used for keyless signing and cloud federation with no stored credentials. Tokens live at most 10 minutes, are audience-scoped, and only a running job can get one. Claims, key rotation and the Fulcio certificate extensions: oidc.
Releases: signing and provenance
A release built by a landed release step is, in order (ModernCI's own release step is in development; it is not yet configured):
- packaged reproducibly (
mci release package); - signed by the signer process (Ed25519 key file; Sigstore keyless, KMS and HSM plugins follow behind the same seam);
- accompanied by SLSA v1.0 build provenance that the platform generates, not the job: the repository,
refs/heads/main, "landed", the config hash, the source commit and tree, and the builder (modernci), signed as a DSSE envelope; - published as signed channel metadata: a key set signed by the root key, then a snapshot and a short-lived timestamp signed by an update key, naming the signed release manifest.
An install accepts an update only if the manifest signature, the artifact sha256 and signature, and the provenance policy all verify, the version is higher, and it was never rolled back.
Verify it yourself
Verify the latest release of a channel, as an updater would (the signed metadata chain, sha256, provenance policy):
mci release verify --channel https://releases.example.net/channels/stable \
--root-key ed25519:<64 hex> --repository https://git.example.net/modernci.git
Verify any artifact with its Sigstore bundle and a policy file:
mci attestation verify widget.tar.gz \
--bundle widget.tar.gz.sigstore.json --policy policy.json
The command checks the signature, the signing identity, the transparency log entry (when the policy requires one) and the provenance policy, and exits non-zero with verification failed: ... on any mismatch. Policies for key-signed releases and for keyless signatures from jobs are in oidc. Add --trusted-root <file> to verify against a private Sigstore instance or offline. Inside a job, mci attestation sign <artifact> --bundle <out> signs with the job's token.
Check the version a commit would get, from the repository alone (no state outside it):
mci release version --repo . --main main --commit HEAD
Check a downloaded tarball against its published checksum:
sha256sum -c mci-0.1.42-x86_64-linux.tar.gz.sha256