mergeseal 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/CONTRIBUTING.md +64 -2
- package/README.md +29 -6
- package/dist/cli-contract.d.ts +2 -0
- package/dist/cli-contract.js +8 -0
- package/dist/cli.js +24 -0
- package/dist/coding/git.js +5 -0
- package/dist/intoto.d.ts +34 -1
- package/dist/intoto.js +316 -13
- package/dist/keyless/asn1.d.ts +26 -0
- package/dist/keyless/asn1.js +269 -0
- package/dist/keyless/bundle.d.ts +52 -0
- package/dist/keyless/bundle.js +163 -0
- package/dist/keyless/cli.d.ts +11 -0
- package/dist/keyless/cli.js +182 -0
- package/dist/keyless/errors.d.ts +17 -0
- package/dist/keyless/errors.js +29 -0
- package/dist/keyless/fulcio.d.ts +13 -0
- package/dist/keyless/fulcio.js +104 -0
- package/dist/keyless/index.d.ts +16 -0
- package/dist/keyless/index.js +12 -0
- package/dist/keyless/oidc.d.ts +29 -0
- package/dist/keyless/oidc.js +130 -0
- package/dist/keyless/x509.d.ts +91 -0
- package/dist/keyless/x509.js +670 -0
- package/dist/portable/index.d.ts +5 -2
- package/dist/portable/index.js +4 -1
- package/docs/aaif-sandbox-thesis.md +51 -0
- package/docs/cli-contract.md +27 -2
- package/docs/intoto-predicate-v1.md +155 -0
- package/docs/ucan-biscuit.md +3 -1
- package/package.json +5 -1
- package/spec/intoto/mergeseal_receipt_v1.proto +47 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# MergeSeal and the AAIF Sandbox
|
|
2
|
+
|
|
3
|
+
A thesis for the Agentic AI Foundation Sandbox, and for the Identity & Trust Working Group. This document is the argument. It is not a filing. MergeSeal has not submitted it to the AAIF or to in-toto.
|
|
4
|
+
|
|
5
|
+
Copyright 2026 MergeSeal. MergeSeal <team@mergeseal.dev>
|
|
6
|
+
|
|
7
|
+
## The gap
|
|
8
|
+
|
|
9
|
+
Agents change code, then say the checks passed. The person who merges that change often cannot see which checks ran, on which bytes, or whether a human co-signed. Identity systems answer a different question: who the agent is, who it acts for, and what it is allowed to do. They do not, by themselves, bind a test run to a diff.
|
|
10
|
+
|
|
11
|
+
MergeSeal is that binding. A runner that holds the signing key issues one Ed25519 certificate. The agent never sees the key. The core plus one seal is at most 192 bytes. A verifier with the public key accepts or rejects it on the machine that already has the commit. The check does not upload source, prompts, diffs, or claim values. v0.1.0 shipped on 29 November 2026 under Apache-2.0. The project contact is MergeSeal <team@mergeseal.dev>.
|
|
12
|
+
|
|
13
|
+
## What the Sandbox asks for
|
|
14
|
+
|
|
15
|
+
The AAIF [described the Sandbox phase](https://aaif.io/blog/aaif-sandbox-phase) on 1 September 2026. Entry is a working implementation plus either early external interest or a credible thesis, and a named, active maintainer. In return the project gets standard foundation infrastructure. It does not get funding, marketing, or a promise of graduation. A six-month checkpoint and a twelve-month window lead either to a Growth application or to an archival discussion.
|
|
16
|
+
|
|
17
|
+
MergeSeal meets that bar as a thesis, not as a claim of membership. The implementation is public at [github.com/mergeseal/mergeseal](https://github.com/mergeseal/mergeseal) and [mergeseal.dev](https://mergeseal.dev). The maintainer of record is MergeSeal, at team@mergeseal.dev, listed in `MAINTAINERS.md`. Governance, the Contributor Covenant, and the Developer Certificate of Origin are in the repository. None of that is an application. A maintainer would still have to file one.
|
|
18
|
+
|
|
19
|
+
## Fit with Identity & Trust
|
|
20
|
+
|
|
21
|
+
The [Identity & Trust Working Group](https://aaif.io/working-groups/identity-trust) is open. Its [charter](https://github.com/aaif/wg-identity-and-trust/blob/main/charter.md), approved on 12 May 2026 and updated on 9 October 2026, covers how an agent is identified, how it authenticates, how it shows where it came from, how delegation and consent are represented, and how a relying party decides whether to trust an action. The charter is explicit about what the group does not do: it does not ratify formal standards, and it does not define a full security architecture for agent execution.
|
|
22
|
+
|
|
23
|
+
MergeSeal sits on the provenance edge of that charter, and stops there.
|
|
24
|
+
|
|
25
|
+
- **What produced this change.** The seal names a tier (a developer machine or an isolated runner), an issuer, and a key id. The subject digest is the certificate subject. A relying party can see which runner class signed the checks without learning the source.
|
|
26
|
+
- **What a human approved.** `humanCosigned` is one bit. It says a human signature covered the record. It does not say the review was careful. The threat model in `SECURITY.md` already says so.
|
|
27
|
+
- **Whether to trust the action.** Trust evaluation, in the charter's sense, needs evidence. The evidence here is narrow: the signature matches a key the verifier already has, the certificate is inside its fresh window, and the recorded diff fingerprint matches the commit when the coding gate is the check. That is a local decision. It is not a cross-organization identity.
|
|
28
|
+
|
|
29
|
+
MergeSeal does not identify the agent, does not delegate authority, and does not express consent beyond that one co-signature bit. UCAN, Biscuit, and Macaroons remain the layer that says what is allowed. The project documents that split so the working group does not have to treat a receipt as a credential.
|
|
30
|
+
|
|
31
|
+
## in-toto, without giving up the trailer
|
|
32
|
+
|
|
33
|
+
The local artifact stays a git trailer. `Agent-Certificate-Portable` carries the compact token. Those bytes are frozen: the reference core-plus-seal encoding in this repository is unchanged by the predicate work, and the budget remains 192 bytes.
|
|
34
|
+
|
|
35
|
+
The archive form is an in-toto Statement v1. The predicate type is `https://mergeseal.dev/receipt/v1`, specified under ITE-9 in `docs/intoto-predicate-v1.md`. The issuance time is RFC 3339, the form the attestation framework asks for, and it means the seal's `issuedAtMs`. A DSSE envelope is opt-in library code. The export command still prints the bare statement after it has verified the seal. It does not call Fulcio or Rekor.
|
|
36
|
+
|
|
37
|
+
That split is the interop proposal. in-toto consumers can store the statement next to other attestations. Git, CI, and agent hosts keep the 192-byte trailer and verify it offline. Neither side has to absorb the other's wire format.
|
|
38
|
+
|
|
39
|
+
The predicate is not filed upstream. ITE-9's vetting process is a pull request to `in-toto/attestation`, opened by a maintainer when the project chooses to ask. This thesis does not open that pull request.
|
|
40
|
+
|
|
41
|
+
## What Sandbox would be for
|
|
42
|
+
|
|
43
|
+
Sandbox would give the work a neutral home while the predicate and the host integrations are still early. The roadmap after v0.1.0 is: this Sandbox thesis and the in-toto predicate, then broader open-source agent and CI integrations, then a v1.0 that freezes the trailer and the predicate URI. Cursor, Claude Code, Codex, and Windsurf already have local shims. Those shims are not a network service.
|
|
44
|
+
|
|
45
|
+
Graduation to Growth, under the AAIF's own rule, needs production use by two unaffiliated organisations, commits from two or more organisations over six months, and a written growth plan. MergeSeal does not claim any of that today. Sandbox is the phase that matches the evidence.
|
|
46
|
+
|
|
47
|
+
## What this asks of the working group
|
|
48
|
+
|
|
49
|
+
If the project is accepted to the Sandbox, the useful relationship with Identity & Trust is review of the boundary: receipt versus identity, the human co-sign bit versus a consent protocol, and the in-toto statement versus the offline trailer. The working group would not be asked to adopt MergeSeal as a standard. The charter already says the group does not ratify standards.
|
|
50
|
+
|
|
51
|
+
The maintainers will keep the seal offline, the trailer bytes stable, and the predicate's claims no wider than the checks the runner actually recorded.
|
package/docs/cli-contract.md
CHANGED
|
@@ -75,6 +75,8 @@ Text mode writes `mergeseal: <error>` and `next: <command>` to stderr. Stdout ke
|
|
|
75
75
|
| `portable` usage or failure | `npx mergeseal portable verify TOKEN --now MS --public-key HEX --json` |
|
|
76
76
|
| `native` or `registry` usage or failure | `npx mergeseal native verify TOKEN --now MS --public-key HEX --json` |
|
|
77
77
|
| `native quickstart` failure | `npx mergeseal native quickstart --json` |
|
|
78
|
+
| `keyless` or `seal` usage | `npx mergeseal keyless seal --payload-file FILE --json` |
|
|
79
|
+
| `keyless` or `seal` failure | `npx mergeseal keyless verify --bundle FILE --certificate-identity ID --fulcio-root FILE --now MS --json` |
|
|
78
80
|
|
|
79
81
|
Placeholders are `TOKEN`, `FILE`, `MS`, `HEX`, `HEAD`, `ID`, `KID`, `KEY`, `GLOB`, `N`, and `CMD`.
|
|
80
82
|
|
|
@@ -129,10 +131,33 @@ stdio JSON-RPC 2.0. One JSON object per line. Methods: `initialize`, `tools/list
|
|
|
129
131
|
|
|
130
132
|
## Commands that follow this contract
|
|
131
133
|
|
|
132
|
-
`keygen`, `init`, `issue`, `inspect`, `delegate`, `verify`, `revoke`, `policy`, `hook`, `gate`, `hold`, `registry`, `native`, `portable`, `export`, `mcp`, and `--help`. `bench` runs `mergeseal-bench` and returns that process status. `mcp` writes JSON-RPC lines, not the `--json` object.
|
|
134
|
+
`keygen`, `init`, `issue`, `inspect`, `delegate`, `verify`, `revoke`, `policy`, `hook`, `gate`, `hold`, `registry`, `native`, `portable`, `export`, `keyless`, `seal`, `mcp`, and `--help`. `bench` runs `mergeseal-bench` and returns that process status. `mcp` writes JSON-RPC lines, not the `--json` object.
|
|
133
135
|
|
|
134
136
|
`mergeseal-portable verify TOKEN --now MS --public-key HEX` exits 0 when the compact seal verifies, 1 when it rejects, and 2 on usage. It prints `ok` or `reject` and does not print the JSON object. Use `npx mergeseal portable verify` when you need `--json`. The public key is 32-byte hex or `did:key:z6Mk...`.
|
|
135
137
|
|
|
136
138
|
`npx mergeseal gate --biscuit-facts` adds `biscuitFacts` when the gate verified a certificate. With `--json` that string is a field on the one object. A failed check omits the field, and exit 1 still carries `ok`, `error`, `exit`, and `next`. See [ucan-biscuit.md](ucan-biscuit.md).
|
|
137
139
|
|
|
138
|
-
`npx mergeseal export --format in-toto` verifies the compact seal first. Exit 0 prints one in-toto Statement v1 and nothing else. Exit 1 is a verify failure. Exit 2 is usage. With `--json`, a failure is still the error object with `ok`, `error`, `exit`, and `next`.
|
|
140
|
+
`npx mergeseal export --format in-toto` verifies the compact seal first. Exit 0 prints one in-toto Statement v1 and nothing else. The predicate type is `https://mergeseal.dev/receipt/v1`. `predicate.timestamp` is the seal's issuance time in RFC 3339 form `YYYY-MM-DDTHH:mm:ss.sssZ`. Exit 1 is a verify failure. Exit 2 is usage. `--format dsse` is usage: this command does not wrap a DSSE envelope. `signDsseEnvelope` is the opt-in wrapper. With `--json`, a failure is still the error object with `ok`, `error`, `exit`, and `next`.
|
|
141
|
+
|
|
142
|
+
## keyless
|
|
143
|
+
|
|
144
|
+
GitHub Actions only. The workflow needs `permissions: id-token: write`. The runner sets `ACTIONS_ID_TOKEN_REQUEST_URL` and `ACTIONS_ID_TOKEN_REQUEST_TOKEN`. This command does not read `MERGESEAL_KEY`.
|
|
145
|
+
|
|
146
|
+
```sh
|
|
147
|
+
npx mergeseal keyless seal --payload-file FILE --out FILE --json
|
|
148
|
+
npx mergeseal seal --keyless --payload-file FILE --json
|
|
149
|
+
npx mergeseal seal --oidc --payload-file FILE --json
|
|
150
|
+
npx mergeseal keyless verify --bundle FILE --fulcio-root FILE --now MS \
|
|
151
|
+
--certificate-identity ID --json
|
|
152
|
+
npx mergeseal keyless verify --bundle FILE --fulcio-root FILE --now MS \
|
|
153
|
+
--certificate-identity-regexp RE \
|
|
154
|
+
--certificate-oidc-issuer https://token.actions.githubusercontent.com --json
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`keyless seal` requests an OIDC token for the audience `sigstore`, generates an ephemeral Ed25519 key, and posts a proof of possession to Sigstore Fulcio (`--fulcio-url` overrides the host; the default is `https://fulcio.sigstore.dev`). The certificate SAN is `https://github.com/` plus the token's `job_workflow_ref`. The issuer extension is the token `iss` claim. A token whose issuer is not `https://token.actions.githubusercontent.com` is refused before Fulcio is called. The private key is discarded. `--out` writes the bundle. `--json` prints one object with `ok`, `keyless`, `network: true`, `certificateIdentity`, `certificateOidcIssuer`, and `bundle`. `--ephemeral-seed` is 32 bytes of hex for a repeatable test key. Omit it on a runner.
|
|
158
|
+
|
|
159
|
+
`keyless verify` does not open a socket. It checks the bundle's certificate chain against `--fulcio-root`, the leaf validity window against `--now`, the SAN against exactly one of `--certificate-identity` or `--certificate-identity-regexp` (the expression must match the whole SAN), and the issuer extension against `--certificate-oidc-issuer`. The default issuer is `https://token.actions.githubusercontent.com`. It then checks the DSSE signature with the leaf key. Exit 0 is verified. Exit 1 is `expired`, `invalid_certificate`, `identity`, `issuer`, or `bad_signature`. Exit 2 is usage.
|
|
160
|
+
|
|
161
|
+
The static `MERGESEAL_KEY` commands, including `portable hook emit`, do not call this path. The `Agent-Certificate-Portable:` trailer stays the compact token, at most 192 bytes.
|
|
162
|
+
|
|
163
|
+
Copyright 2026 MergeSeal. MergeSeal <team@mergeseal.dev>
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Predicate type: MergeSeal receipt
|
|
2
|
+
|
|
3
|
+
Type URI: `https://mergeseal.dev/receipt/v1`
|
|
4
|
+
|
|
5
|
+
Version: v1
|
|
6
|
+
|
|
7
|
+
Predicate Name: `mergeseal_receipt`
|
|
8
|
+
|
|
9
|
+
This document follows [ITE-9](https://github.com/in-toto/ITE/blob/master/ITE/9/README.adoc). It is the MergeSeal specification for predicate type `https://mergeseal.dev/receipt/v1`. It is not an upstream filing. The short name `mergeseal_receipt` is an unauthenticated hint. The protobuf definition in this repository is [spec/intoto/mergeseal_receipt_v1.proto](../spec/intoto/mergeseal_receipt_v1.proto).
|
|
10
|
+
|
|
11
|
+
Copyright 2026 MergeSeal. MergeSeal <team@mergeseal.dev>
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
An agent change can carry a MergeSeal receipt: one Ed25519 seal over a canonical certificate, at most 192 bytes, checked on the machine that already has the commit. in-toto consumers need that same fact as a Statement. This predicate is that fact, and nothing else. It records which checks the seal already covered. It does not re-check the seal, and it does not fetch a transparency log.
|
|
16
|
+
|
|
17
|
+
## Use Cases
|
|
18
|
+
|
|
19
|
+
A reviewer has a commit with an `Agent-Certificate-Portable` trailer. A local verifier has already accepted the compact seal. The project wants to archive that result next to other in-toto attestations, or to hand it to a policy engine that already speaks Statement v1.
|
|
20
|
+
|
|
21
|
+
Existing predicates do not carry this record. A SLSA provenance predicate describes a build. A test-result predicate describes a test suite's output. A link predicate describes a step's materials and products. None of them say that a compact MergeSeal seal verified, which tier it carried, whether a secret scan was clean, or whether a human co-signed, without putting the source or the diff into the attestation.
|
|
22
|
+
|
|
23
|
+
The export command verifies the compact seal first. Only then does it print this statement. A statement that has not been through that check is not a MergeSeal receipt, even if the JSON parses.
|
|
24
|
+
|
|
25
|
+
## Prerequisites
|
|
26
|
+
|
|
27
|
+
- [in-toto Attestation Framework](https://github.com/in-toto/attestation/tree/main/spec/v1), Statement v1 (`https://in-toto.io/Statement/v1`).
|
|
28
|
+
- A MergeSeal compact certificate, `ac1.`, core plus one Ed25519 seal, at most 192 canonical bytes. The normative layout is [spec/portable.md](../spec/portable.md) and [spec/native.md](../spec/native.md).
|
|
29
|
+
- DSSE is not required. Producers that want an envelope use [DSSE 1.0.2](https://github.com/secure-systems-lab/dsse/blob/master/protocol.md) as described below. That wrapper is opt-in.
|
|
30
|
+
|
|
31
|
+
## Model
|
|
32
|
+
|
|
33
|
+
The functionary is the runner that holds the signing key. The agent does not. The step is "checks completed on this subject." The subject is one artifact, named by the producer, whose `digest.sha256` is the certificate subject.
|
|
34
|
+
|
|
35
|
+
The predicate is evidence about that step: tier, test count, secret-scan bit, human co-signature bit, issuer, key id, issuance time, the compact size, and the compact token. A consumer that wants to trust the statement still verifies the token with the public key. The statement does not itself prove the seal.
|
|
36
|
+
|
|
37
|
+
The compact trailer stays on the commit. This predicate does not change `Agent-Certificate` or `Agent-Certificate-Portable`, and it does not change the 192-byte budget.
|
|
38
|
+
|
|
39
|
+
## Schema
|
|
40
|
+
|
|
41
|
+
```jsonc
|
|
42
|
+
{
|
|
43
|
+
"_type": "https://in-toto.io/Statement/v1",
|
|
44
|
+
"subject": [
|
|
45
|
+
{
|
|
46
|
+
"name": "<artifact name>",
|
|
47
|
+
"digest": { "sha256": "<64 lowercase hex chars>" }
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"predicateType": "https://mergeseal.dev/receipt/v1",
|
|
51
|
+
"predicate": {
|
|
52
|
+
"tier": 1,
|
|
53
|
+
"testCount": 3,
|
|
54
|
+
"secretsClean": true,
|
|
55
|
+
"humanCosigned": false,
|
|
56
|
+
"issuerId": "org",
|
|
57
|
+
"keyId": "ed-1",
|
|
58
|
+
"timestamp": "2023-11-14T22:13:20.000Z",
|
|
59
|
+
"compactBytes": 128,
|
|
60
|
+
"token": "ac1...."
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Parsing Rules
|
|
66
|
+
|
|
67
|
+
This predicate opts in to the [attestation parsing rules](https://github.com/in-toto/attestation/blob/main/spec/v1/README.md#parsing-rules), including the monotonic rule. Consumers ignore unrecognized fields. Producers do not hide a required meaning in an unrecognized field.
|
|
68
|
+
|
|
69
|
+
Differences from the general rules, all of which are stricter:
|
|
70
|
+
|
|
71
|
+
- The statement has exactly one subject. `subject[0].digest.sha256` is required and is 64 lowercase hexadecimal characters. `subject[0].name` is a non-empty string.
|
|
72
|
+
- Every predicate field below is required. A missing field, or a field of the wrong JSON type, is rejected.
|
|
73
|
+
- `timestamp` is the issuance time of the compact seal (`issuedAtMs`), written as RFC 3339 with timezone `Z` and millisecond precision: `YYYY-MM-DDTHH:mm:ss.sssZ`. A decimal millisecond string is not a v1 predicate timestamp. A form without milliseconds, or with a numeric offset, is rejected. The instant is from `1970-01-01T00:00:00.000Z` through `9999-12-31T23:59:59.999Z`, and it must be a real civil date. `2023-02-31T00:00:00.000Z` is rejected.
|
|
74
|
+
- `tier` is an integer from 0 to 7.
|
|
75
|
+
- `testCount` is an integer from 0 to 2^53−1.
|
|
76
|
+
- `compactBytes` is an integer from 1 to 192.
|
|
77
|
+
- `secretsClean` and `humanCosigned` are JSON booleans.
|
|
78
|
+
- `issuerId` and `keyId` are non-empty strings.
|
|
79
|
+
- `token` is a non-empty string that starts with `ac1.`.
|
|
80
|
+
- Producers must not put source, prompts, diffs, or claim values in any field. Those bytes belong on the machine that ran the check, not in the attestation.
|
|
81
|
+
|
|
82
|
+
`timestamp` is specifically the compact seal's issuance time. It is not a build start, a scan time, or a policy expiry. Those other times stay inside the compact certificate and are not copied here.
|
|
83
|
+
|
|
84
|
+
### Fields
|
|
85
|
+
|
|
86
|
+
| Field | Type | Required | Meaning |
|
|
87
|
+
| --------------- | ---------------- | -------- | ------------------------------------------------------------------------------------------------------- |
|
|
88
|
+
| `tier` | integer 0–7 | yes | Runner tier recorded on the seal. 1 is a developer machine. 2 is an isolated CI runner. |
|
|
89
|
+
| `testCount` | integer 0–2^53−1 | yes | How many tests the runner recorded. |
|
|
90
|
+
| `secretsClean` | boolean | yes | True when the secret-pattern scan recorded a clean bit. |
|
|
91
|
+
| `humanCosigned` | boolean | yes | True when a human co-signature covered the record. |
|
|
92
|
+
| `issuerId` | string | yes | Issuer identifier the producer associates with the key. |
|
|
93
|
+
| `keyId` | string | yes | Key identifier. The export command uses the hex public key when no other id is set. |
|
|
94
|
+
| `timestamp` | RFC 3339 string | yes | Issuance time of the compact seal. See the parsing rules. |
|
|
95
|
+
| `compactBytes` | integer 1–192 | yes | Canonical byte length of the compact certificate. |
|
|
96
|
+
| `token` | string | yes | The compact `ac1.` token. A consumer re-verifies this token. The statement does not replace that check. |
|
|
97
|
+
|
|
98
|
+
The subject name is the artifact name the producer was given. For `mergeseal export --format in-toto`, that is `--name`. The subject digest is the certificate subject, hex-encoded SHA-256.
|
|
99
|
+
|
|
100
|
+
## Example
|
|
101
|
+
|
|
102
|
+
This example matches `toInTotoStatement` for a verified receipt whose issuance time is `1700000000000` milliseconds. The token is illustrative. A production statement carries a real `ac1.` token of at most 192 decoded bytes.
|
|
103
|
+
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"_type": "https://in-toto.io/Statement/v1",
|
|
107
|
+
"subject": [
|
|
108
|
+
{
|
|
109
|
+
"name": "pkg",
|
|
110
|
+
"digest": {
|
|
111
|
+
"sha256": "1111111111111111111111111111111111111111111111111111111111111111"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"predicateType": "https://mergeseal.dev/receipt/v1",
|
|
116
|
+
"predicate": {
|
|
117
|
+
"tier": 1,
|
|
118
|
+
"testCount": 3,
|
|
119
|
+
"secretsClean": true,
|
|
120
|
+
"humanCosigned": false,
|
|
121
|
+
"issuerId": "org",
|
|
122
|
+
"keyId": "ed-1",
|
|
123
|
+
"timestamp": "2023-11-14T22:13:20.000Z",
|
|
124
|
+
"compactBytes": 128,
|
|
125
|
+
"token": "ac1.abc"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## DSSE envelope
|
|
131
|
+
|
|
132
|
+
DSSE is opt-in. `mergeseal export --format in-toto` prints the statement and does not wrap it. `--format dsse` is usage.
|
|
133
|
+
|
|
134
|
+
`signDsseEnvelope` wraps the statement. `verifyDsseEnvelope` checks one signature and then parses the same payload bytes. The payload type is `application/vnd.in-toto+json`. The signature is over the [DSSE PAE](https://github.com/secure-systems-lab/dsse/blob/master/protocol.md):
|
|
135
|
+
|
|
136
|
+
```text
|
|
137
|
+
DSSEv1 <len(payloadType)> <payloadType> <len(payload)> <payload>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The `keyid` field is a hint. Verifiers must not treat it as proof of which key signed. The envelope uses standard Base64 on output and accepts standard or URL-safe Base64 on input. The library does not call Fulcio or Rekor.
|
|
141
|
+
|
|
142
|
+
The short name may appear in an unauthenticated media type such as `application/vnd.in-toto.mergeseal_receipt+dsse`. That hint is not the payload type.
|
|
143
|
+
|
|
144
|
+
## Verification
|
|
145
|
+
|
|
146
|
+
1. Parse the statement under the rules above.
|
|
147
|
+
2. Verify `predicate.token` as a MergeSeal compact certificate, with the public key the consumer trusts, at the time the consumer chooses. A parsed statement with a bad seal is not accepted.
|
|
148
|
+
3. If a DSSE envelope is present, verify the signature over the PAE before parsing the payload, and parse the verified bytes. Do not re-read the payload from the envelope after that.
|
|
149
|
+
4. Ignore unrecognized predicate fields. Reject a missing required field.
|
|
150
|
+
|
|
151
|
+
## Changelog and Migrations
|
|
152
|
+
|
|
153
|
+
v1 is the first published version of `https://mergeseal.dev/receipt/v1`.
|
|
154
|
+
|
|
155
|
+
An earlier draft of the exporter printed the issuance time as a decimal millisecond string. v1 prints RFC 3339, `YYYY-MM-DDTHH:mm:ss.sssZ`. Consumers of v1 reject the decimal form. The predicate type URI did not change, because that draft was not a published predicate. The compact trailer bytes did not change.
|
package/docs/ucan-biscuit.md
CHANGED
|
@@ -50,4 +50,6 @@ Macaroons are the same kind of comparison: they carry what is allowed. MergeSeal
|
|
|
50
50
|
|
|
51
51
|
## Ecosystem
|
|
52
52
|
|
|
53
|
-
MergeSeal is the small offline receipt: one compact seal, at most 192 bytes, checked on the machine that already has the commit. in-toto and Sigstore are the larger archive. `mergeseal export --format in-toto` verifies that seal first, then prints an [in-toto Statement v1](https://in-toto.io/Statement/v1) whose predicate type is `https://mergeseal.dev/receipt/v1`. The statement carries the tier, test count, secrets check, human co-sign, issuer and key id,
|
|
53
|
+
MergeSeal is the small offline receipt: one compact seal, at most 192 bytes, checked on the machine that already has the commit. in-toto and Sigstore are the larger archive. `mergeseal export --format in-toto` verifies that seal first, then prints an [in-toto Statement v1](https://in-toto.io/Statement/v1) whose predicate type is `https://mergeseal.dev/receipt/v1`. The statement carries the tier, test count, secrets check, human co-sign, issuer and key id, the seal's issuance time as RFC 3339, compact byte length, and the compact token. It does not call Fulcio or Rekor, and it does not wrap the statement in DSSE. `signDsseEnvelope` is an opt-in wrapper around that statement. The predicate spec is [intoto-predicate-v1.md](intoto-predicate-v1.md).
|
|
54
|
+
|
|
55
|
+
Copyright 2026 MergeSeal. MergeSeal <team@mergeseal.dev>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mergeseal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Flags agent PRs that weakened tests or skipped checks.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "MergeSeal Contributors",
|
|
@@ -69,6 +69,10 @@
|
|
|
69
69
|
"./portable": {
|
|
70
70
|
"types": "./dist/portable/index.d.ts",
|
|
71
71
|
"import": "./dist/portable/index.js"
|
|
72
|
+
},
|
|
73
|
+
"./keyless": {
|
|
74
|
+
"types": "./dist/keyless/index.d.ts",
|
|
75
|
+
"import": "./dist/keyless/index.js"
|
|
72
76
|
}
|
|
73
77
|
},
|
|
74
78
|
"scripts": {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// MergeSeal receipt predicate v1.
|
|
2
|
+
// Predicate type: https://mergeseal.dev/receipt/v1
|
|
3
|
+
// Short name: mergeseal_receipt
|
|
4
|
+
// Specification: docs/intoto-predicate-v1.md
|
|
5
|
+
//
|
|
6
|
+
// JSON names match the predicate. Protobuf field names are snake_case.
|
|
7
|
+
// `timestamp` is RFC 3339, millisecond precision, timezone Z.
|
|
8
|
+
// It is the compact seal's issuance time, not a build or scan time.
|
|
9
|
+
//
|
|
10
|
+
// Copyright 2026 MergeSeal
|
|
11
|
+
// MergeSeal <team@mergeseal.dev>
|
|
12
|
+
|
|
13
|
+
syntax = "proto3";
|
|
14
|
+
|
|
15
|
+
package mergeseal.intoto.receipt.v1;
|
|
16
|
+
|
|
17
|
+
// Predicate body for https://mergeseal.dev/receipt/v1.
|
|
18
|
+
// The Statement layer is not defined here. See the in-toto Statement v1.
|
|
19
|
+
message MergesealReceipt {
|
|
20
|
+
// Runner tier recorded on the seal. Integer 0 through 7.
|
|
21
|
+
uint32 tier = 1 [json_name = "tier"];
|
|
22
|
+
|
|
23
|
+
// Tests the runner recorded. Integer 0 through 2^53-1.
|
|
24
|
+
uint64 test_count = 2 [json_name = "testCount"];
|
|
25
|
+
|
|
26
|
+
// True when the secret-pattern scan recorded a clean bit.
|
|
27
|
+
bool secrets_clean = 3 [json_name = "secretsClean"];
|
|
28
|
+
|
|
29
|
+
// True when a human co-signature covered the record.
|
|
30
|
+
bool human_cosigned = 4 [json_name = "humanCosigned"];
|
|
31
|
+
|
|
32
|
+
// Issuer identifier associated with the key.
|
|
33
|
+
string issuer_id = 5 [json_name = "issuerId"];
|
|
34
|
+
|
|
35
|
+
// Key identifier. Unauthenticated hint when copied into a DSSE keyid.
|
|
36
|
+
string key_id = 6 [json_name = "keyId"];
|
|
37
|
+
|
|
38
|
+
// Issuance time of the compact seal.
|
|
39
|
+
// Canonical form: YYYY-MM-DDTHH:mm:ss.sssZ
|
|
40
|
+
string timestamp = 7 [json_name = "timestamp"];
|
|
41
|
+
|
|
42
|
+
// Canonical byte length of the compact certificate. Integer 1 through 192.
|
|
43
|
+
uint32 compact_bytes = 8 [json_name = "compactBytes"];
|
|
44
|
+
|
|
45
|
+
// Compact ac1. token. Consumers re-verify this token. The predicate does not.
|
|
46
|
+
string token = 9 [json_name = "token"];
|
|
47
|
+
}
|