Trust model
What a proof establishes, who it defends against, and where it stops: every threat with the test that holds it, and the gaps that are still open.
Overview#
A sound proof (mlola receipt check exit 0) establishes this, and no more: for this contract (by digest), at this commit, each criterion got the verdict shown, and each verdict follows from the evidence recorded with it. The contract was the approved one, or the proof says it was not.
It does not establish that the software is correct, that the contract says everything that matters, or that the evidence was gathered somewhere honest. How far the evidence can be trusted depends on where it came from.
Where evidence comes from#
| Layer | Who produced the evidence | How far it goes |
|---|---|---|
api | Mlola sent the GET and read the answer | What the app answered, at the base URL, at that time |
browser | Mlola drove or watched the page and read it | What the page showed and the server stored |
test | The project's own test run wrote a JUnit report; Mlola read it | What that run reported. Mlola does not run the tests |
manual | Nobody yet | A person checks it; never counted as proven |
The test layer is the weakest by construction: the report is written by a job that runs the change's code, so that code could write a different report. Put the criteria that matter most on api or browser.
Who this defends against#
- An agent that wants to look done: it edits the contract, edits its tests, reuses an old report, or says “done” with nothing behind it. This is the main case.
- A pull request's code running in CI, including a dependency it pulls in. It runs with whatever the job has.
- Anyone handed a proof later, a reviewer or an auditor who did not see the run. They check it offline.
Not defended: someone who can push to the default branch or change the repository's settings; a compromised CI runner; a compromised release of the CLI itself (pin the version, as the action does).
Boundaries#
| Where | What runs there | Holds the key |
|---|---|---|
| The change's job | The change's code: tests, app, mlola prove | No |
| The sealing job | Only the pinned CLI: mlola receipt seal, then receipt check | Yes |
| Anyone, later | Only the CLI: mlola receipt check --trust --commit | Needs the public key |
A person stands at two points: approving the contract before the change, and reading the review list on the proof.
Threats, and the test that holds each#
| Threat | What stops it | |
|---|---|---|
| T1 | The change rewrites or weakens its own contract | Compared with the base branch: changed or new goes to its approver, auto-merge is off; --approved pins digests approved elsewhere |
| T2 | A model's draft is used before a person approved it | No API or browser check of a draft runs until its digest is approved; an edit after approval holds it again |
| T3 | The change edits the tests that prove it | Not independent, and on the review list. A contract naming test files that do not exist leaves the criterion not proven |
| T4 | An old green report is reused for new code | A report older than a file the change touched proves nothing |
| T5 | The proof is edited, or forged and re-sealed | The digest; and every verdict, the review list and auto-merge judged again from the record |
| T6 | An agent proves against a contract of its own | The MCP tool takes a file name from the operator's directory, never a path |
| T7 | The change edits the CI that proves it | On the review list, auto-merge off (mlola.proof/2) |
| T8 | A proof of one commit is presented for another | --commit on receipt check and receipt seal |
| T9 | Code in the change reads the signing key | The key lives only in a sealing job that runs none of the change's code; it signs only a sound proof |
| T10 | Model output decides where a check goes | A draft never names a host; the base URL comes from a person |
| T11 | The app redirects an API check elsewhere, with its token | Redirects are followed only on the app's host |
| T12 | A secret ends up in a proof | Tokens are never recorded; secrets are masked in all text |
Each row names its test in the repository's docs/trust-model.md. A threat without a test is not listed here as handled.
Still open#
- T13. The change's job writes a false test report, or a false proof, before it is sealed. Sealing does not detect this: the seal says the proof was sound when checked, not that its observations were honest. It is limited to that one pull request, visible in its run, and
apiandbrowserevidence is gathered by Mlola itself. - T14. The change alters how tests run (a script, a runner setting) so a case passes without testing anything. A named case that did not run is not proven; one that ran and asserts nothing is not caught.
- T15. Evidence from one environment read as another. A proof against
localhostin CI says nothing about production. Deployment proofs are not built until a user needs one. - T16. Someone with write access edits the workflow to read the key. Keep the key in a GitHub environment with protection rules, and put
.github/underCODEOWNERS.
What a signature means#
| Where it was signed | What it says |
|---|---|
A developer's machine (mlola receipt keygen) | That machine issued it |
| The CI job that ran the change | Nothing reliable: that job's code could read the key. Do not do this |
A sealing job (mlola receipt seal) | The proof was intact and consistent when a job that ran none of the change's code checked it, and it is about that commit |
A signature tied to the workflow's identity (GitHub's OIDC artifact attestations) would need no key to keep. It is not built: pull requests from forks do not get the token it needs, and private repositories need GitHub Enterprise Cloud.