matrixscroll 0.2.1__tar.gz → 0.2.4__tar.gz

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.
Files changed (89) hide show
  1. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/CHANGELOG.md +39 -0
  2. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/CONTRIBUTING.md +1 -1
  3. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/PKG-INFO +76 -54
  4. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/README.md +75 -53
  5. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/SECURITY.md +2 -1
  6. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/SPEC.md +41 -0
  7. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/docs/AGENTIC_AI_SECURITY.md +8 -10
  8. matrixscroll-0.2.4/docs/COMPARISON.md +84 -0
  9. matrixscroll-0.2.4/docs/WHITEPAPER.md +144 -0
  10. matrixscroll-0.2.4/docs/delegation-attestation-rfc.md +69 -0
  11. matrixscroll-0.2.4/docs/quickstart-claude-code.md +45 -0
  12. matrixscroll-0.2.4/docs/quickstart-copilot.md +52 -0
  13. matrixscroll-0.2.4/docs/quickstart-cursor.md +57 -0
  14. matrixscroll-0.2.4/docs/quickstart-git.md +126 -0
  15. matrixscroll-0.2.4/docs/rekor-guac-bridge-design.md +82 -0
  16. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/docs/superpowers/specs/2026-06-19-matrixscroll-git-design.md +1 -1
  17. matrixscroll-0.2.4/examples/ci/protected-branch.yml +74 -0
  18. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/examples/release-manifest.json +6 -6
  19. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/examples/release-manifest.signed.json +10 -10
  20. matrixscroll-0.2.4/examples/trusted-keys-policy.json +7 -0
  21. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/__init__.py +4 -4
  22. matrixscroll-0.2.4/matrixscroll/cli.py +389 -0
  23. matrixscroll-0.2.4/matrixscroll/gate.py +425 -0
  24. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/git.py +10 -3
  25. matrixscroll-0.2.4/matrixscroll/policy.py +102 -0
  26. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/pyproject.toml +1 -1
  27. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/schemas/commit-envelope.v1.json +25 -0
  28. matrixscroll-0.2.4/tests/test_cli.py +230 -0
  29. matrixscroll-0.2.4/tests/test_gate.py +203 -0
  30. matrixscroll-0.2.4/tests/test_policy.py +63 -0
  31. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/README.md +2 -2
  32. matrixscroll-0.2.4/vectors/valid_commit_envelope.json +38 -0
  33. matrixscroll-0.2.1/docs/quickstart-git.md +0 -61
  34. matrixscroll-0.2.1/examples/ci/protected-branch.yml +0 -38
  35. matrixscroll-0.2.1/matrixscroll/cli.py +0 -178
  36. matrixscroll-0.2.1/matrixscroll/policy.py +0 -55
  37. matrixscroll-0.2.1/tests/test_cli.py +0 -126
  38. matrixscroll-0.2.1/tests/test_policy.py +0 -26
  39. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/.gitignore +0 -0
  40. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/LICENSE +0 -0
  41. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/controls/agentic_ai_controls.json +0 -0
  42. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/docs/hardware-provider.md +0 -0
  43. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/docs/superpowers/plans/2026-06-19-ci-action-plan.md +0 -0
  44. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/docs/superpowers/plans/2026-06-19-sdk-refactor-plan.md +0 -0
  45. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/docs/yubikey-bridge.md +0 -0
  46. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/examples/agentic_ai_evidence_manifest.json +0 -0
  47. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/examples/agentic_ai_evidence_manifest.signed.json +0 -0
  48. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/examples/commit-envelope.json +0 -0
  49. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/examples/commit-envelope.signed.json +0 -0
  50. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/examples/demo/agent-commit-demo.sh +0 -0
  51. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/examples/demo/generate_signed_examples.py +0 -0
  52. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/_core.py +0 -0
  53. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/canonical.py +0 -0
  54. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/constants.py +0 -0
  55. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/errors.py +0 -0
  56. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/hooks/post-commit +0 -0
  57. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/hooks/pre-push +0 -0
  58. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/manifest.py +0 -0
  59. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/providers/__init__.py +0 -0
  60. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/providers/base.py +0 -0
  61. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/providers/emulated.py +0 -0
  62. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/providers/hardware.py +0 -0
  63. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/providers/registry.py +0 -0
  64. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/providers/yubikey.py +0 -0
  65. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/matrixscroll/py.typed +0 -0
  66. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/schemas/evidence-pack.v1.json +0 -0
  67. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/schemas/release-manifest.v1.json +0 -0
  68. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/tests/__init__.py +0 -0
  69. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/tests/test_agentic_guidance.py +0 -0
  70. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/tests/test_canonical.py +0 -0
  71. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/tests/test_core.py +0 -0
  72. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/tests/test_git_envelope.py +0 -0
  73. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/tests/test_release_metadata.py +0 -0
  74. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/tests/test_vectors.py +0 -0
  75. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/tests/test_yubikey_provider.py +0 -0
  76. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/_fixture_key.json +0 -0
  77. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/_generate.py +0 -0
  78. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/tampered_algorithm.json +0 -0
  79. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/tampered_device_id.json +0 -0
  80. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/tampered_field.json +0 -0
  81. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/tampered_nested.json +0 -0
  82. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/tampered_public_key.json +0 -0
  83. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/tampered_schema.json +0 -0
  84. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/tampered_signature.json +0 -0
  85. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/unsigned_empty_block.json +0 -0
  86. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/unsigned_no_block.json +0 -0
  87. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/valid_nested.json +0 -0
  88. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/valid_simple.json +0 -0
  89. {matrixscroll-0.2.1 → matrixscroll-0.2.4}/vectors/valid_unicode.json +0 -0
@@ -4,6 +4,43 @@ All notable changes to the Matrix Scroll Python SDK are documented here. The
4
4
  format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
5
5
  this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.2.4] - 2026-06-20
8
+
9
+ Who-Acted gate productization: attribution policy, delegation schema, CI hardening.
10
+
11
+ ### Added
12
+ - **Attribution policy** — `require_actor_types`, `deny_actor_types`,
13
+ `require_delegation_for_actor_types`, `verify_agent_scope` in `VerifyPolicy`.
14
+ - **`delegation` block** in commit envelope schema with owner/approver/manifest pin.
15
+ - **`delegation-attestation-rfc.md`**, IDE quickstarts (Cursor, Copilot, Claude Code),
16
+ branch-protection runbook, Rekor/GUAC bridge design doc.
17
+ - **GitHub Step Summary** in verify-action range mode; fail-closed notes fetch.
18
+ - **pre-push** SHA-bound verification; optional `publish_notes` in hook config.
19
+
20
+ ### Fixed
21
+ - Empty commit ranges in `verify_envelope_range` now pass with `note: no commits in range`.
22
+
23
+ ## [0.2.3] - 2026-06-20
24
+
25
+ Scroll Gate export MVP: PR commit-range verification with git notes and bundle transport.
26
+
27
+ ### Added
28
+ - **`matrixscroll/gate.py`** — SHA-bound envelope verification, commit-range discovery,
29
+ filesystem bundle export, git notes publish/fetch, and range verification summaries.
30
+ - **CLI commands** — `envelope-export`, `envelope-publish-notes`, `envelope-fetch-notes`,
31
+ and `envelope-verify-range` with policy flags and JSON summaries for CI.
32
+ - **GitHub Action range mode** — `head-ref` / `base-ref` inputs for PR provenance gates
33
+ via notes or bundle sources.
34
+
35
+ ## [0.2.2] - 2026-06-20
36
+
37
+ Policy flags for CI and release gates.
38
+
39
+ ### Added
40
+ - **CLI policy flags** — `matrixscroll verify` and `matrixscroll envelope-verify` accept
41
+ `--require-mode` and `--trusted-keys` (JSON policy file), wired to
42
+ `verify_manifest_with_policy()`.
43
+
7
44
  ## [0.2.1] - 2026-06-20
8
45
 
9
46
  Windows and cross-platform commit envelope fix.
@@ -76,6 +113,8 @@ Initial public release. Extracted from the SSX360 reference implementation.
76
113
  - Device id format: `MS-XXXX-XXXX` (SHA-256 of the raw public key, first 8 hex
77
114
  chars, uppercase).
78
115
 
116
+ [0.2.2]: https://github.com/SSX360/matrixscroll/releases/tag/v0.2.2
117
+ [0.2.1]: https://github.com/SSX360/matrixscroll/releases/tag/v0.2.1
79
118
  [0.2.0]: https://github.com/SSX360/matrixscroll/releases/tag/v0.2.0
80
119
  [0.1.1]: https://github.com/SSX360/matrixscroll/releases/tag/v0.1.1
81
120
  [0.1.0]: https://github.com/SSX360/matrixscroll/releases/tag/v0.1.0
@@ -45,7 +45,7 @@ vectors are welcome.
45
45
  - [ ] Tests pass locally (`pytest -q`).
46
46
  - [ ] New public API has a docstring and is re-exported from
47
47
  `matrixscroll/__init__.py` if it's part of the supported surface.
48
- - [ ] `CHANGELOG.md` updated under `[Unreleased]`.
48
+ - [ ] `CHANGELOG.md` updated with a dated version entry (see Keep a Changelog format).
49
49
  - [ ] `SPEC.md` updated if anything wire-format-related changed.
50
50
  - [ ] No private keys, no real device ids, and no fixtures generated by a
51
51
  production device in test data.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: matrixscroll
3
- Version: 0.2.1
3
+ Version: 0.2.4
4
4
  Summary: Open protocol for signing AI-assisted code provenance with Ed25519; shipping software root of trust with SSX360 hardware support in progress.
5
5
  Project-URL: Homepage, https://matrixscroll.com
6
6
  Project-URL: Documentation, https://matrixscroll.com/docs
@@ -37,15 +37,21 @@ Description-Content-Type: text/markdown
37
37
 
38
38
  # Matrix Scroll
39
39
 
40
- **Open protocol for signed AI-assisted code provenance.**
40
+ **Signed provenance for agent-assisted Git commits — verify offline, one command.**
41
41
 
42
- Every AI-generated change in your IDE can be cryptographically signed by an
43
- Ed25519 identity and verified offline with a public key and one command. The
44
- v0.2.x reference implementation ships a well-tested software root of trust
45
- with Git commit-envelope hooks; SSX360/NXP SE050 hardware signing is the
46
- compatible reference-device path in progress.
42
+ Matrix Scroll is a cryptographic evidence layer: when an AI agent (Cursor, Claude Code, Copilot, etc.) produces a commit, a signed **commit envelope** records actor, tool, and optional scope. Verify locally or in CI without trusting the IDE. The v0.2.x reference SDK ships an emulated Ed25519 root of trust with Git hooks; SSX360/NXP SE050 hardware signing is the compatible reference-device path in progress.
47
43
 
48
- - 📜 **Spec:** [`SPEC.md`](SPEC.md) — wire format, canonical encoding, schemas.
44
+ **Honest limits**
45
+
46
+ - **Shipping now:** L1 emulated Ed25519 software key; Git post-commit hooks; Scroll Gate PR verification (0.2.3+); delegation attestation schema (0.2.4+)
47
+ - **In progress:** SSX360 SE050 hardware provider; YubiKey PKCS#11 bridge
48
+ - **Not:** IAM, sandbox, prompt-injection filter, or agent runtime
49
+
50
+ - 📜 **Spec:** [`SPEC.md`](SPEC.md) — wire format, canonical encoding, document types.
51
+ - 📋 **Commit envelope schema:** [`schemas/commit-envelope.v1.json`](schemas/commit-envelope.v1.json)
52
+ - 📄 **Whitepaper:** [`docs/WHITEPAPER.md`](docs/WHITEPAPER.md) — why Git commits, implementation guide.
53
+ - ⚖️ **Comparison:** [`docs/COMPARISON.md`](docs/COMPARISON.md) — vs Sigstore, agentmark, Alien, ForgeProof.
54
+ - 💬 **Support:** [`SUPPORT.md`](SUPPORT.md) — issues, Discussions, security contact.
49
55
  - 🛡 **Agentic AI controls:** [`docs/AGENTIC_AI_SECURITY.md`](docs/AGENTIC_AI_SECURITY.md)
50
56
  maps Matrix Scroll to the joint *Careful Adoption of Agentic AI Services* guidance.
51
57
  - 🔐 **Algorithm:** Ed25519 (RFC 8032). Private keys are never exposed by the SDK API.
@@ -53,35 +59,10 @@ compatible reference-device path in progress.
53
59
  - 🌐 **Site:** <https://matrixscroll.com>
54
60
  - 🔧 **Reference device:** [SSX360](https://matrixscroll.com/device) (NXP SE050 hardware path in progress).
55
61
 
56
- ```bash
57
- pip install matrixscroll
58
- ```
59
-
60
- ## Quickstart
61
-
62
- ```python
63
- import matrixscroll
64
-
65
- # What identity is active on this machine?
66
- print(matrixscroll.status())
67
- # {'schema': 'matrixscroll.identity.v1', 'available': True,
68
- # 'mode': 'emulated', 'device_id': 'MS-A3F2-9C81', ...}
69
-
70
- # Sign anything (a release manifest, a commit envelope, a SBOM, an evidence pack)
71
- signed = matrixscroll.sign_manifest({"release": "v1.0.0", "artifacts": [...]})
72
-
73
- # Verify, anywhere, offline
74
- assert matrixscroll.verify_manifest(signed)
75
- ```
76
-
77
62
  ## Agent provenance for Git commits
78
63
 
79
- When an AI agent (Cursor, Claude Code, Copilot, etc.) produces a commit, Matrix
80
- Scroll attaches a signed **commit envelope** with actor, tool, and scope metadata.
81
- Verify in CI without trusting the IDE.
82
-
83
64
  ```bash
84
- pip install matrixscroll
65
+ pip install "matrixscroll>=0.2.1"
85
66
  matrixscroll hook-install
86
67
 
87
68
  export MATRIXSCROLL_ACTOR_TYPE=agent
@@ -94,13 +75,59 @@ matrixscroll envelope-verify "$(git rev-parse HEAD)"
94
75
  See [`docs/quickstart-git.md`](docs/quickstart-git.md) and run
95
76
  [`examples/demo/agent-commit-demo.sh`](examples/demo/agent-commit-demo.sh).
96
77
 
97
- ### CI verify
78
+ ### CI verify (single manifest)
98
79
 
99
80
  ```yaml
100
81
  - uses: SSX360/matrixscroll-verify-action@v1
101
82
  with:
102
83
  manifest: examples/agentic_ai_evidence_manifest.signed.json
103
- matrixscroll-version: "0.2.0"
84
+ matrixscroll-version: "0.2.4"
85
+ require-mode: emulated
86
+ ```
87
+
88
+ ### Scroll Gate (PR commit range)
89
+
90
+ Developers publish envelopes to git notes before PR review:
91
+
92
+ ```bash
93
+ matrixscroll envelope-publish-notes --base origin/main --head HEAD
94
+ git push origin refs/notes/matrixscroll
95
+ ```
96
+
97
+ ```yaml
98
+ - uses: actions/checkout@v4
99
+ with:
100
+ fetch-depth: 0
101
+ - uses: SSX360/matrixscroll-verify-action@v1
102
+ with:
103
+ head-ref: ${{ github.event.pull_request.head.sha }}
104
+ base-ref: ${{ github.event.pull_request.base.sha }}
105
+ source: notes
106
+ matrixscroll-version: "0.2.4"
107
+ summary-output: provenance-summary.json
108
+ ```
109
+
110
+ See [`docs/quickstart-git.md`](docs/quickstart-git.md) and [`examples/ci/protected-branch.yml`](examples/ci/protected-branch.yml).
111
+
112
+ Policy flags (`--require-mode`, `--trusted-keys`, actor/delegation policy) ship in **0.2.2+**.
113
+
114
+ ## Quickstart (Python API)
115
+
116
+ ```bash
117
+ pip install "matrixscroll>=0.2.1"
118
+ ```
119
+
120
+ ```python
121
+ import matrixscroll
122
+
123
+ print(matrixscroll.status())
124
+ # {'schema': 'matrixscroll.identity.v1', 'available': True,
125
+ # 'mode': 'emulated', 'device_id': 'MS-A3F2-9C81', ...}
126
+
127
+ # Sign a release manifest, commit envelope, evidence pack, or SBOM
128
+ signed = matrixscroll.sign_manifest({"release": "v1.0.0", "artifacts": [...]})
129
+
130
+ assert matrixscroll.verify_manifest(signed)
104
131
  ```
105
132
 
106
133
  ## CLI
@@ -130,49 +157,45 @@ parsing the output.
130
157
  ```
131
158
  your IDE / agent / CI
132
159
 
133
- manifest (release, commit, evidence pack, SBOM, anything)
160
+ commit envelope, release manifest, evidence pack, SBOM
134
161
 
135
- matrixscroll.sign_manifest(...)
162
+ matrixscroll.sign_manifest(...) / post-commit hook
136
163
 
137
164
  │ canonical JSON (sorted keys, ASCII-escaped, no NaN,
138
165
  │ signature block excluded from input)
139
166
 
140
167
  IdentityProvider ──► Ed25519 signature
141
- (Emulated today,
142
- SSX360 / SE050 tomorrow)
168
+ (L1 emulated today,
169
+ SSX360 / SE050 roadmap)
143
170
 
144
171
 
145
- signed manifest ──► matrixscroll.verify_manifest(...)
172
+ signed document ──► matrixscroll.verify_manifest(...)
146
173
  (anyone, anywhere, offline)
147
174
  ```
148
175
 
149
- The same Python API is designed to serve the local software emulator and the
150
- physical SSX360 device path. Switch with the `MATRIXSCROLL_MODE` environment
151
- variable; in v0.1.x, `hardware` mode reports unavailable until the SE050
152
- transport ships.
176
+ Switch providers with `MATRIXSCROLL_MODE`. Hardware mode reports unavailable
177
+ until the SE050 transport ships.
153
178
 
154
179
  ## Compliance levels
155
180
 
156
181
  | Level | Provider | Backed by | Status |
157
182
  | ----- | -------- | --------- | ------ |
158
183
  | **L1** Emulated | `EmulatedProvider` | Software key, file-backed (0600) | ✅ Shipping |
159
- | **L2** Hardware | `HardwareProvider` | NXP SE050 secure element (SSX360) | 🛠 Stage-0 prototype |
184
+ | **L2** Hardware | `HardwareProvider` | NXP SE050 secure element (SSX360) | 🛠 In progress |
160
185
  | **L3** Attested | future | L2 + remote attestation | 🗺 Roadmap |
161
186
 
162
- `status()` exposes the active level via the `mode` and `available` fields so
163
- read-only dashboards can render before the hardware path is wired.
187
+ `status()` exposes the active level via the `mode` and `available` fields.
164
188
 
165
189
  ## Storage and trust boundaries
166
190
 
167
191
  - Emulated key store: `~/.matrixscroll/device.json`
168
192
  (override with `MATRIXSCROLL_HOME`).
169
193
  - The directory is created `0700`; the seed file is opened `0600` with
170
- `O_CREAT|O_EXCL` so the private seed is never momentarily world-readable and
171
- a race cannot silently clobber an existing key store.
194
+ `O_CREAT|O_EXCL` so the private seed is never momentarily world-readable.
172
195
  - A corrupt or truncated store **fails loud** (`IdentityError`) rather than
173
- silently minting a fresh identity. Identity rotation is an explicit operation.
196
+ silently minting a fresh identity.
174
197
  - The planned hardware path holds nothing private on disk — the seed is sealed
175
- in the secure element. In v0.1.x, this path is a typed availability stub.
198
+ in the secure element.
176
199
 
177
200
  ## Reference implementation, not the only one
178
201
 
@@ -186,8 +209,7 @@ The repo includes a machine-readable control matrix at
186
209
  [`controls/agentic_ai_controls.json`](controls/agentic_ai_controls.json), an
187
210
  example bounded-agent evidence manifest at
188
211
  [`examples/agentic_ai_evidence_manifest.json`](examples/agentic_ai_evidence_manifest.json),
189
- and executable checks in `tests/test_agentic_guidance.py`. These prove each
190
- claim maps to repo evidence and that signed agent scope changes fail verify.
212
+ and executable checks in `tests/test_agentic_guidance.py`.
191
213
 
192
214
  ## License
193
215
 
@@ -1,14 +1,20 @@
1
1
  # Matrix Scroll
2
2
 
3
- **Open protocol for signed AI-assisted code provenance.**
3
+ **Signed provenance for agent-assisted Git commits — verify offline, one command.**
4
4
 
5
- Every AI-generated change in your IDE can be cryptographically signed by an
6
- Ed25519 identity and verified offline with a public key and one command. The
7
- v0.2.x reference implementation ships a well-tested software root of trust
8
- with Git commit-envelope hooks; SSX360/NXP SE050 hardware signing is the
9
- compatible reference-device path in progress.
5
+ Matrix Scroll is a cryptographic evidence layer: when an AI agent (Cursor, Claude Code, Copilot, etc.) produces a commit, a signed **commit envelope** records actor, tool, and optional scope. Verify locally or in CI without trusting the IDE. The v0.2.x reference SDK ships an emulated Ed25519 root of trust with Git hooks; SSX360/NXP SE050 hardware signing is the compatible reference-device path in progress.
10
6
 
11
- - 📜 **Spec:** [`SPEC.md`](SPEC.md) — wire format, canonical encoding, schemas.
7
+ **Honest limits**
8
+
9
+ - **Shipping now:** L1 emulated Ed25519 software key; Git post-commit hooks; Scroll Gate PR verification (0.2.3+); delegation attestation schema (0.2.4+)
10
+ - **In progress:** SSX360 SE050 hardware provider; YubiKey PKCS#11 bridge
11
+ - **Not:** IAM, sandbox, prompt-injection filter, or agent runtime
12
+
13
+ - 📜 **Spec:** [`SPEC.md`](SPEC.md) — wire format, canonical encoding, document types.
14
+ - 📋 **Commit envelope schema:** [`schemas/commit-envelope.v1.json`](schemas/commit-envelope.v1.json)
15
+ - 📄 **Whitepaper:** [`docs/WHITEPAPER.md`](docs/WHITEPAPER.md) — why Git commits, implementation guide.
16
+ - ⚖️ **Comparison:** [`docs/COMPARISON.md`](docs/COMPARISON.md) — vs Sigstore, agentmark, Alien, ForgeProof.
17
+ - 💬 **Support:** [`SUPPORT.md`](SUPPORT.md) — issues, Discussions, security contact.
12
18
  - 🛡 **Agentic AI controls:** [`docs/AGENTIC_AI_SECURITY.md`](docs/AGENTIC_AI_SECURITY.md)
13
19
  maps Matrix Scroll to the joint *Careful Adoption of Agentic AI Services* guidance.
14
20
  - 🔐 **Algorithm:** Ed25519 (RFC 8032). Private keys are never exposed by the SDK API.
@@ -16,35 +22,10 @@ compatible reference-device path in progress.
16
22
  - 🌐 **Site:** <https://matrixscroll.com>
17
23
  - 🔧 **Reference device:** [SSX360](https://matrixscroll.com/device) (NXP SE050 hardware path in progress).
18
24
 
19
- ```bash
20
- pip install matrixscroll
21
- ```
22
-
23
- ## Quickstart
24
-
25
- ```python
26
- import matrixscroll
27
-
28
- # What identity is active on this machine?
29
- print(matrixscroll.status())
30
- # {'schema': 'matrixscroll.identity.v1', 'available': True,
31
- # 'mode': 'emulated', 'device_id': 'MS-A3F2-9C81', ...}
32
-
33
- # Sign anything (a release manifest, a commit envelope, a SBOM, an evidence pack)
34
- signed = matrixscroll.sign_manifest({"release": "v1.0.0", "artifacts": [...]})
35
-
36
- # Verify, anywhere, offline
37
- assert matrixscroll.verify_manifest(signed)
38
- ```
39
-
40
25
  ## Agent provenance for Git commits
41
26
 
42
- When an AI agent (Cursor, Claude Code, Copilot, etc.) produces a commit, Matrix
43
- Scroll attaches a signed **commit envelope** with actor, tool, and scope metadata.
44
- Verify in CI without trusting the IDE.
45
-
46
27
  ```bash
47
- pip install matrixscroll
28
+ pip install "matrixscroll>=0.2.1"
48
29
  matrixscroll hook-install
49
30
 
50
31
  export MATRIXSCROLL_ACTOR_TYPE=agent
@@ -57,13 +38,59 @@ matrixscroll envelope-verify "$(git rev-parse HEAD)"
57
38
  See [`docs/quickstart-git.md`](docs/quickstart-git.md) and run
58
39
  [`examples/demo/agent-commit-demo.sh`](examples/demo/agent-commit-demo.sh).
59
40
 
60
- ### CI verify
41
+ ### CI verify (single manifest)
61
42
 
62
43
  ```yaml
63
44
  - uses: SSX360/matrixscroll-verify-action@v1
64
45
  with:
65
46
  manifest: examples/agentic_ai_evidence_manifest.signed.json
66
- matrixscroll-version: "0.2.0"
47
+ matrixscroll-version: "0.2.4"
48
+ require-mode: emulated
49
+ ```
50
+
51
+ ### Scroll Gate (PR commit range)
52
+
53
+ Developers publish envelopes to git notes before PR review:
54
+
55
+ ```bash
56
+ matrixscroll envelope-publish-notes --base origin/main --head HEAD
57
+ git push origin refs/notes/matrixscroll
58
+ ```
59
+
60
+ ```yaml
61
+ - uses: actions/checkout@v4
62
+ with:
63
+ fetch-depth: 0
64
+ - uses: SSX360/matrixscroll-verify-action@v1
65
+ with:
66
+ head-ref: ${{ github.event.pull_request.head.sha }}
67
+ base-ref: ${{ github.event.pull_request.base.sha }}
68
+ source: notes
69
+ matrixscroll-version: "0.2.4"
70
+ summary-output: provenance-summary.json
71
+ ```
72
+
73
+ See [`docs/quickstart-git.md`](docs/quickstart-git.md) and [`examples/ci/protected-branch.yml`](examples/ci/protected-branch.yml).
74
+
75
+ Policy flags (`--require-mode`, `--trusted-keys`, actor/delegation policy) ship in **0.2.2+**.
76
+
77
+ ## Quickstart (Python API)
78
+
79
+ ```bash
80
+ pip install "matrixscroll>=0.2.1"
81
+ ```
82
+
83
+ ```python
84
+ import matrixscroll
85
+
86
+ print(matrixscroll.status())
87
+ # {'schema': 'matrixscroll.identity.v1', 'available': True,
88
+ # 'mode': 'emulated', 'device_id': 'MS-A3F2-9C81', ...}
89
+
90
+ # Sign a release manifest, commit envelope, evidence pack, or SBOM
91
+ signed = matrixscroll.sign_manifest({"release": "v1.0.0", "artifacts": [...]})
92
+
93
+ assert matrixscroll.verify_manifest(signed)
67
94
  ```
68
95
 
69
96
  ## CLI
@@ -93,49 +120,45 @@ parsing the output.
93
120
  ```
94
121
  your IDE / agent / CI
95
122
 
96
- manifest (release, commit, evidence pack, SBOM, anything)
123
+ commit envelope, release manifest, evidence pack, SBOM
97
124
 
98
- matrixscroll.sign_manifest(...)
125
+ matrixscroll.sign_manifest(...) / post-commit hook
99
126
 
100
127
  │ canonical JSON (sorted keys, ASCII-escaped, no NaN,
101
128
  │ signature block excluded from input)
102
129
 
103
130
  IdentityProvider ──► Ed25519 signature
104
- (Emulated today,
105
- SSX360 / SE050 tomorrow)
131
+ (L1 emulated today,
132
+ SSX360 / SE050 roadmap)
106
133
 
107
134
 
108
- signed manifest ──► matrixscroll.verify_manifest(...)
135
+ signed document ──► matrixscroll.verify_manifest(...)
109
136
  (anyone, anywhere, offline)
110
137
  ```
111
138
 
112
- The same Python API is designed to serve the local software emulator and the
113
- physical SSX360 device path. Switch with the `MATRIXSCROLL_MODE` environment
114
- variable; in v0.1.x, `hardware` mode reports unavailable until the SE050
115
- transport ships.
139
+ Switch providers with `MATRIXSCROLL_MODE`. Hardware mode reports unavailable
140
+ until the SE050 transport ships.
116
141
 
117
142
  ## Compliance levels
118
143
 
119
144
  | Level | Provider | Backed by | Status |
120
145
  | ----- | -------- | --------- | ------ |
121
146
  | **L1** Emulated | `EmulatedProvider` | Software key, file-backed (0600) | ✅ Shipping |
122
- | **L2** Hardware | `HardwareProvider` | NXP SE050 secure element (SSX360) | 🛠 Stage-0 prototype |
147
+ | **L2** Hardware | `HardwareProvider` | NXP SE050 secure element (SSX360) | 🛠 In progress |
123
148
  | **L3** Attested | future | L2 + remote attestation | 🗺 Roadmap |
124
149
 
125
- `status()` exposes the active level via the `mode` and `available` fields so
126
- read-only dashboards can render before the hardware path is wired.
150
+ `status()` exposes the active level via the `mode` and `available` fields.
127
151
 
128
152
  ## Storage and trust boundaries
129
153
 
130
154
  - Emulated key store: `~/.matrixscroll/device.json`
131
155
  (override with `MATRIXSCROLL_HOME`).
132
156
  - The directory is created `0700`; the seed file is opened `0600` with
133
- `O_CREAT|O_EXCL` so the private seed is never momentarily world-readable and
134
- a race cannot silently clobber an existing key store.
157
+ `O_CREAT|O_EXCL` so the private seed is never momentarily world-readable.
135
158
  - A corrupt or truncated store **fails loud** (`IdentityError`) rather than
136
- silently minting a fresh identity. Identity rotation is an explicit operation.
159
+ silently minting a fresh identity.
137
160
  - The planned hardware path holds nothing private on disk — the seed is sealed
138
- in the secure element. In v0.1.x, this path is a typed availability stub.
161
+ in the secure element.
139
162
 
140
163
  ## Reference implementation, not the only one
141
164
 
@@ -149,8 +172,7 @@ The repo includes a machine-readable control matrix at
149
172
  [`controls/agentic_ai_controls.json`](controls/agentic_ai_controls.json), an
150
173
  example bounded-agent evidence manifest at
151
174
  [`examples/agentic_ai_evidence_manifest.json`](examples/agentic_ai_evidence_manifest.json),
152
- and executable checks in `tests/test_agentic_guidance.py`. These prove each
153
- claim maps to repo evidence and that signed agent scope changes fail verify.
175
+ and executable checks in `tests/test_agentic_guidance.py`.
154
176
 
155
177
  ## License
156
178
 
@@ -40,7 +40,8 @@ Out of scope:
40
40
 
41
41
  | Version | Status |
42
42
  | ------- | ------ |
43
- | 0.1.x | Active development; security fixes shipped on patch releases. |
43
+ | 0.2.x | Active development; security fixes on patch releases. |
44
+ | 0.1.x | Legacy; upgrade to 0.2.x for Git hooks and commit envelopes. |
44
45
 
45
46
  Pre-1.0 there is no extended support window. Pin to a known-good version
46
47
  in production until 1.0.
@@ -13,6 +13,9 @@ Two schema identifiers are stamped into every artifact:
13
13
  - `matrixscroll.identity.v1` — identity descriptors (`identity_info`,
14
14
  `status`, the on-disk key store).
15
15
  - `matrixscroll.signature.v1` — the signature block attached to manifests.
16
+ - `matrixscroll.commit_envelope.v1` — Git commit provenance document (see §10).
17
+ - `matrixscroll.release_manifest.v1` and evidence-pack schemas — release and
18
+ audit artifacts (see §10).
16
19
 
17
20
  A breaking change to canonical encoding, signature layout, device id
18
21
  derivation, or algorithm choice **must** bump the relevant version. Minor
@@ -155,3 +158,41 @@ A conforming implementation MUST:
155
158
  as **invalid**.
156
159
 
157
160
  It SHOULD also publish its own cross-language vectors for community testing.
161
+
162
+ ## 10. Document types
163
+
164
+ Beyond the generic signed-manifest pattern in §5–§6, v0.2.x defines typed
165
+ documents. Each document carries a top-level `schema` string and a `signature`
166
+ block conforming to §5.
167
+
168
+ ### 10.1 Commit envelope (`matrixscroll.commit_envelope.v1`)
169
+
170
+ Binds provenance metadata to a Git commit. Used by post-commit hooks and
171
+ `matrixscroll envelope-verify`.
172
+
173
+ Required top-level fields:
174
+
175
+ - `schema` — constant `"matrixscroll.commit_envelope.v1"`.
176
+ - `commit` — normalized commit object (tree, parents, author, committer,
177
+ message; `expected_id` is informational for pre-sign drafts).
178
+ - `provenance` — `actor_type` (`human` | `agent` | `ci`), `tool`, optional
179
+ `tool_version`, optional scope manifest reference.
180
+ - `repository` — optional remote URL, branch, and repo name.
181
+ - `signature` — per §5.
182
+
183
+ Storage path (reference implementation):
184
+
185
+ .git/matrixscroll/envelopes/<40-char-commit-sha>.json
186
+
187
+ JSON Schema: [`schemas/commit-envelope.v1.json`](schemas/commit-envelope.v1.json).
188
+ Conformance vector: [`vectors/valid_commit_envelope.json`](vectors/valid_commit_envelope.json).
189
+
190
+ ### 10.2 Release manifest (`matrixscroll.release_manifest.v1`)
191
+
192
+ Signed release metadata (version, tag, artifact list). JSON Schema:
193
+ [`schemas/release-manifest.v1.json`](schemas/release-manifest.v1.json).
194
+
195
+ ### 10.3 Evidence pack
196
+
197
+ Signed audit or agent-scope evidence. JSON Schema:
198
+ [`schemas/evidence-pack.v1.json`](schemas/evidence-pack.v1.json).
@@ -36,9 +36,9 @@ The machine-readable control matrix lives at
36
36
  | AAI-04 | Human accountability | Owner, approver, reviewer, break-glass contact, and kill-switch fields are signed. |
37
37
  | AAI-05 | Threat modeling | Threats are mapped to strict verification and tamper vectors. |
38
38
  | AAI-06 | Secure defaults / validation | Wrong schema, algorithm, device id, malformed key, NaN, and unsigned manifests fail closed. |
39
- | AAI-07 | Monitoring and auditability | Signed manifests are portable audit records verifiable offline. |
39
+ | AAI-07 | Monitoring and auditability | Signed manifests and **commit envelopes** (`.git/matrixscroll/envelopes/<sha>.json`) are portable audit records verifiable offline. |
40
40
  | AAI-08 | Incident response / kill switch | CI/CLI verification exits non-zero; manifests include escalation and shutdown metadata. |
41
- | AAI-09 | Supply-chain management | Minimal deps, Dependabot, CI build verification, and conformance vectors. |
41
+ | AAI-09 | Supply-chain management | Git post-commit hooks + CI verify-action; minimal deps; Dependabot; conformance vectors. |
42
42
  | AAI-10 | Strong authentication / non-repudiation | Ed25519 identity; the planned SSX360 hardware mode keeps private keys out of agent runtimes. |
43
43
  | AAI-11 | Governance and change control | CODEOWNERS + CI protect spec/core/vectors/security files. |
44
44
  | AAI-12 | Deception / prompt-injection resilience | Trust is verified after agent action; model text cannot forge signatures. |
@@ -52,7 +52,7 @@ Matrix Scroll adds a stronger evidence layer on top:
52
52
  Matrix Scroll servers, the original CI system, or the agent runtime.
53
53
  2. **Hardware-rooted provenance path** — the SSX360 L2 design moves the signing
54
54
  key into a secure element so the agent cannot exfiltrate it as a normal
55
- credential. In v0.1.x, this is a typed provider path awaiting SE050 transport.
55
+ credential. Hardware mode is a typed provider path awaiting SE050 transport.
56
56
  3. **Fail-closed policy gates** — the CLI returns exit `2` for tampered,
57
57
  unsigned, malformed, wrong-schema, wrong-algorithm, or wrong-device-id input.
58
58
  4. **Executable conformance** — `vectors/` lets third-party implementations
@@ -63,14 +63,12 @@ Matrix Scroll adds a stronger evidence layer on top:
63
63
  ## Recommended deployment pattern
64
64
 
65
65
  1. Define the agent task as a low-risk, bounded pilot.
66
- 2. Create an evidence manifest like
66
+ 2. Install Git hooks (`matrixscroll hook-install`) and set `MATRIXSCROLL_ACTOR_TYPE=agent`.
67
+ 3. Create an evidence manifest like
67
68
  [`examples/agentic_ai_evidence_manifest.json`](../examples/agentic_ai_evidence_manifest.json).
68
- 3. Have a human owner approve the resource/operation/timeframe scope.
69
- 4. Sign the manifest with `matrixscroll sign`.
70
- 5. Require `matrixscroll verify` in CI before the agent can act or before its
71
- output can be accepted.
72
- 6. Retain the signed manifest with logs, SBOM, model/provider metadata, and
73
- incident-response records.
69
+ 4. Have a human owner approve the resource/operation/timeframe scope.
70
+ 5. Sign the manifest with `matrixscroll sign`; require `matrixscroll envelope-verify` on each agent commit in CI.
71
+ 6. Retain signed envelopes and manifests with logs, SBOM, and incident-response records.
74
72
 
75
73
  ## Residual risks outside SDK scope
76
74
 
@@ -0,0 +1,84 @@
1
+ # How Matrix Scroll Compares
2
+
3
+ Matrix Scroll signs **Git commit envelopes** — cryptographic evidence of who (human, agent, CI) produced a change, attached inside the commit. This page is an honest map of adjacent tools. Most are **complementary**, not replacements.
4
+
5
+ **Positioning in one line:** Sigstore and SLSA answer “what was built in CI?” Matrix Scroll answers “who signed this commit before push?”
6
+
7
+ ## At a glance
8
+
9
+ | Tool | Layer | Signs commits? | Agent identity | Hardware root of trust | Open source |
10
+ |------|-------|----------------|----------------|------------------------|-------------|
11
+ | **Matrix Scroll** | Commit | Yes (envelope in commit) | Yes | Yes (SSX360 / SE050 path; emulated L1 today) | Protocol + SDK |
12
+ | [agentmark](https://github.com/karta-oss/karta) | Commit + CI gate | Yes (manifest in message) | Yes (pipeline key) | No | Apache 2.0 |
13
+ | [Alien Agent ID](https://github.com/alien-id) | Commit (git notes) | Yes | Yes (owner-bound via OIDC) | No | SDK on GitHub |
14
+ | [ForgeProof](https://github.com/forgeproof/forgeproof) | File-level | No | Partial (model/provider) | No | Apache 2.0 |
15
+ | [Sigstore / cosign](https://docs.sigstore.dev/) | Artifact / container | No | No | No (keyless OIDC) | Yes |
16
+ | [GitHub artifact attestations](https://docs.github.com/en/actions/concepts/security/artifact-attestations) | CI artifact | No | No | No | Partial |
17
+ | [SLSA](https://slsa.dev/) | Build provenance framework | No | No | N/A | Yes |
18
+ | [in-toto](https://in-toto.io/) | Pipeline layout | No | No | Functionary keys | Yes |
19
+ | [OpenSSF GUAC](https://github.com/guacsec/guac) | Aggregation graph | No | No | N/A | Yes |
20
+
21
+ Runtime audit tools (Provedex, ProvenanceOne, etc.) log **what agents do at runtime** — useful, but they do not bind authorship to Git history.
22
+
23
+ ## Closest commit-level competitors
24
+
25
+ ### agentmark
26
+
27
+ - **Similar:** Commit-time Ed25519 manifest, CI verification gate, EU AI Act Article 50 cited as a use case.
28
+ - **Different:** Software pipeline keys (exfiltration risk). Matrix Scroll targets **hardware-sealed** Ed25519 (SSX360) with offline verify; emulated L1 ships today.
29
+ - **Takeaway:** Strongest software-only peer. Matrix Scroll differentiates on tamper-resistant keys and commit-embedded envelopes.
30
+
31
+ ### Alien Agent ID
32
+
33
+ - **Similar:** Ed25519 commit signing, public verification story.
34
+ - **Different:** Owner binding via cloud OIDC/DPoP; proof bundles in git notes. Matrix Scroll emphasizes **offline verification** and dedicated hardware, not a hosted identity network.
35
+ - **Takeaway:** Alien leads on human→agent delegation chains; Matrix Scroll leads on hardware non-repudiation without cloud dependency.
36
+
37
+ ### ForgeProof
38
+
39
+ - **Similar:** Ed25519 + SHA-256 provenance for AI-assisted code.
40
+ - **Different:** **Per-file receipts** before build, not commit envelopes. Provenance is a separate artifact; Matrix Scroll embeds evidence in every clone of the repo.
41
+ - **Takeaway:** Complementary granularity (file vs commit); potential interop, not a fork in the road.
42
+
43
+ ## Established supply chain (CI / artifact)
44
+
45
+ Sigstore, GitHub attestations, SLSA, in-toto, and GUAC secure **build outputs and pipeline steps**. They do not record which AI tool authored a line at commit time.
46
+
47
+ Matrix Scroll envelopes can **feed** these systems (e.g., as in-toto link metadata or GUAC evidence) rather than compete with them.
48
+
49
+ ## What Matrix Scroll adds that others don’t combine
50
+
51
+ 1. **Commit-time** signing (not post-build artifact attestation)
52
+ 2. **Agent/human actor** in the envelope schema
53
+ 3. **Hardware root of trust** path (SSX360 / NXP SE050) plus emulated dev mode today
54
+ 4. **Offline verify** — `matrixscroll verify` or [matrixscroll.com/verify](https://matrixscroll.com/verify)
55
+
56
+ No single competitor listed above combines all four today.
57
+
58
+ ## Honest gaps (what we’re still building)
59
+
60
+ - **CI gate:** Scroll Gate ships in **0.2.3+** — PR commit-range verification via `envelope-verify-range`, git notes transport (`refs/notes/matrixscroll`), and filesystem bundles. [`matrixscroll-verify-action`](https://github.com/SSX360/matrixscroll-verify-action) supports `head-ref`/`base-ref` range mode with agent/human counts.
61
+ - **Owner/delegation attestation:** Optional `delegation` block in commit envelope schema (**0.2.4+**); see [`delegation-attestation-rfc.md`](delegation-attestation-rfc.md). Alien still leads on OIDC/DPoP owner binding.
62
+ - **Multi-agent commits:** Multiple actors in one envelope — on the roadmap.
63
+ - **Rekor / transparency log:** Not shipped yet; would align with Sigstore ecosystem expectations.
64
+ - **Hardware:** SSX360 reference device and Scroll Key retail are **in progress**; L1 emulated key is what you can use now.
65
+
66
+ ## When to use what
67
+
68
+ | You need… | Reach for… |
69
+ |-----------|------------|
70
+ | Container/image signatures, Rekor log | Sigstore / cosign |
71
+ | SLSA Level 3 build provenance on GitHub Actions | `slsa-github-generator` + artifact attestations |
72
+ | Supply chain graph / SBOM aggregation | GUAC |
73
+ | Prove an AI pipeline wrote code with no human edit path (software keys) | agentmark |
74
+ | Bind agent commits to a hosted human identity chain | Alien Agent ID |
75
+ | Per-file “which model wrote this file” receipts | ForgeProof |
76
+ | **Hardware-backed, commit-embedded agent provenance with offline verify** | **Matrix Scroll** |
77
+
78
+ ## Further reading
79
+
80
+ - Full research brief (internal): `research/competitive-landscape-2026-06.md` in the SSX360 launch kit
81
+ - [Whitepaper](WHITEPAPER.md) — threat model and envelope design
82
+ - [SPEC.md](../SPEC.md) — wire format and verification rules
83
+
84
+ *Last updated: June 2026. Comparisons reflect public docs and OSS repos; contact security@matrixscroll.com for corrections.*