matrixscroll 0.2.2__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 (87) hide show
  1. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/CHANGELOG.md +30 -0
  2. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/CONTRIBUTING.md +1 -1
  3. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/PKG-INFO +72 -49
  4. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/README.md +71 -48
  5. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/SECURITY.md +2 -1
  6. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/SPEC.md +41 -0
  7. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/docs/AGENTIC_AI_SECURITY.md +1 -1
  8. matrixscroll-0.2.4/docs/COMPARISON.md +84 -0
  9. matrixscroll-0.2.4/docs/delegation-attestation-rfc.md +69 -0
  10. matrixscroll-0.2.4/docs/quickstart-claude-code.md +45 -0
  11. matrixscroll-0.2.4/docs/quickstart-copilot.md +52 -0
  12. matrixscroll-0.2.4/docs/quickstart-cursor.md +57 -0
  13. matrixscroll-0.2.4/docs/quickstart-git.md +126 -0
  14. matrixscroll-0.2.4/docs/rekor-guac-bridge-design.md +82 -0
  15. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/docs/superpowers/specs/2026-06-19-matrixscroll-git-design.md +1 -1
  16. matrixscroll-0.2.4/examples/ci/protected-branch.yml +74 -0
  17. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/examples/release-manifest.json +6 -6
  18. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/examples/release-manifest.signed.json +10 -10
  19. matrixscroll-0.2.4/examples/trusted-keys-policy.json +7 -0
  20. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/__init__.py +4 -4
  21. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/cli.py +161 -6
  22. matrixscroll-0.2.4/matrixscroll/gate.py +425 -0
  23. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/git.py +10 -3
  24. matrixscroll-0.2.4/matrixscroll/policy.py +102 -0
  25. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/pyproject.toml +1 -1
  26. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/schemas/commit-envelope.v1.json +25 -0
  27. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/tests/test_cli.py +70 -0
  28. matrixscroll-0.2.4/tests/test_gate.py +203 -0
  29. matrixscroll-0.2.4/tests/test_policy.py +63 -0
  30. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/README.md +2 -2
  31. matrixscroll-0.2.4/vectors/valid_commit_envelope.json +38 -0
  32. matrixscroll-0.2.2/docs/quickstart-git.md +0 -72
  33. matrixscroll-0.2.2/examples/ci/protected-branch.yml +0 -38
  34. matrixscroll-0.2.2/matrixscroll/policy.py +0 -55
  35. matrixscroll-0.2.2/tests/test_policy.py +0 -26
  36. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/.gitignore +0 -0
  37. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/LICENSE +0 -0
  38. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/controls/agentic_ai_controls.json +0 -0
  39. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/docs/WHITEPAPER.md +0 -0
  40. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/docs/hardware-provider.md +0 -0
  41. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/docs/superpowers/plans/2026-06-19-ci-action-plan.md +0 -0
  42. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/docs/superpowers/plans/2026-06-19-sdk-refactor-plan.md +0 -0
  43. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/docs/yubikey-bridge.md +0 -0
  44. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/examples/agentic_ai_evidence_manifest.json +0 -0
  45. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/examples/agentic_ai_evidence_manifest.signed.json +0 -0
  46. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/examples/commit-envelope.json +0 -0
  47. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/examples/commit-envelope.signed.json +0 -0
  48. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/examples/demo/agent-commit-demo.sh +0 -0
  49. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/examples/demo/generate_signed_examples.py +0 -0
  50. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/_core.py +0 -0
  51. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/canonical.py +0 -0
  52. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/constants.py +0 -0
  53. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/errors.py +0 -0
  54. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/hooks/post-commit +0 -0
  55. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/hooks/pre-push +0 -0
  56. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/manifest.py +0 -0
  57. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/providers/__init__.py +0 -0
  58. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/providers/base.py +0 -0
  59. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/providers/emulated.py +0 -0
  60. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/providers/hardware.py +0 -0
  61. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/providers/registry.py +0 -0
  62. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/providers/yubikey.py +0 -0
  63. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/matrixscroll/py.typed +0 -0
  64. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/schemas/evidence-pack.v1.json +0 -0
  65. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/schemas/release-manifest.v1.json +0 -0
  66. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/tests/__init__.py +0 -0
  67. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/tests/test_agentic_guidance.py +0 -0
  68. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/tests/test_canonical.py +0 -0
  69. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/tests/test_core.py +0 -0
  70. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/tests/test_git_envelope.py +0 -0
  71. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/tests/test_release_metadata.py +0 -0
  72. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/tests/test_vectors.py +0 -0
  73. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/tests/test_yubikey_provider.py +0 -0
  74. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/_fixture_key.json +0 -0
  75. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/_generate.py +0 -0
  76. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/tampered_algorithm.json +0 -0
  77. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/tampered_device_id.json +0 -0
  78. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/tampered_field.json +0 -0
  79. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/tampered_nested.json +0 -0
  80. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/tampered_public_key.json +0 -0
  81. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/tampered_schema.json +0 -0
  82. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/tampered_signature.json +0 -0
  83. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/unsigned_empty_block.json +0 -0
  84. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/unsigned_no_block.json +0 -0
  85. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/valid_nested.json +0 -0
  86. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/valid_simple.json +0 -0
  87. {matrixscroll-0.2.2 → matrixscroll-0.2.4}/vectors/valid_unicode.json +0 -0
@@ -4,6 +4,34 @@ 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
+
7
35
  ## [0.2.2] - 2026-06-20
8
36
 
9
37
  Policy flags for CI and release gates.
@@ -85,6 +113,8 @@ Initial public release. Extracted from the SSX360 reference implementation.
85
113
  - Device id format: `MS-XXXX-XXXX` (SHA-256 of the raw public key, first 8 hex
86
114
  chars, uppercase).
87
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
88
118
  [0.2.0]: https://github.com/SSX360/matrixscroll/releases/tag/v0.2.0
89
119
  [0.1.1]: https://github.com/SSX360/matrixscroll/releases/tag/v0.1.1
90
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.2
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
@@ -41,10 +41,17 @@ Description-Content-Type: text/markdown
41
41
 
42
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.
43
43
 
44
- Matrix Scroll is **not** an IAM system, agent sandbox, or prompt-injection filter — it complements those controls with tamper-evident signatures.
44
+ **Honest limits**
45
45
 
46
- - 📜 **Spec:** [`SPEC.md`](SPEC.md) wire format, canonical encoding, schemas.
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)
47
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.
48
55
  - 🛡 **Agentic AI controls:** [`docs/AGENTIC_AI_SECURITY.md`](docs/AGENTIC_AI_SECURITY.md)
49
56
  maps Matrix Scroll to the joint *Careful Adoption of Agentic AI Services* guidance.
50
57
  - 🔐 **Algorithm:** Ed25519 (RFC 8032). Private keys are never exposed by the SDK API.
@@ -52,35 +59,10 @@ Matrix Scroll is **not** an IAM system, agent sandbox, or prompt-injection filte
52
59
  - 🌐 **Site:** <https://matrixscroll.com>
53
60
  - 🔧 **Reference device:** [SSX360](https://matrixscroll.com/device) (NXP SE050 hardware path in progress).
54
61
 
55
- ```bash
56
- pip install matrixscroll
57
- ```
58
-
59
- ## Quickstart
60
-
61
- ```python
62
- import matrixscroll
63
-
64
- # What identity is active on this machine?
65
- print(matrixscroll.status())
66
- # {'schema': 'matrixscroll.identity.v1', 'available': True,
67
- # 'mode': 'emulated', 'device_id': 'MS-A3F2-9C81', ...}
68
-
69
- # Sign anything (a release manifest, a commit envelope, a SBOM, an evidence pack)
70
- signed = matrixscroll.sign_manifest({"release": "v1.0.0", "artifacts": [...]})
71
-
72
- # Verify, anywhere, offline
73
- assert matrixscroll.verify_manifest(signed)
74
- ```
75
-
76
62
  ## Agent provenance for Git commits
77
63
 
78
- When an AI agent (Cursor, Claude Code, Copilot, etc.) produces a commit, Matrix
79
- Scroll attaches a signed **commit envelope** with actor, tool, and scope metadata.
80
- Verify in CI without trusting the IDE.
81
-
82
64
  ```bash
83
- pip install matrixscroll
65
+ pip install "matrixscroll>=0.2.1"
84
66
  matrixscroll hook-install
85
67
 
86
68
  export MATRIXSCROLL_ACTOR_TYPE=agent
@@ -93,13 +75,59 @@ matrixscroll envelope-verify "$(git rev-parse HEAD)"
93
75
  See [`docs/quickstart-git.md`](docs/quickstart-git.md) and run
94
76
  [`examples/demo/agent-commit-demo.sh`](examples/demo/agent-commit-demo.sh).
95
77
 
96
- ### CI verify
78
+ ### CI verify (single manifest)
97
79
 
98
80
  ```yaml
99
81
  - uses: SSX360/matrixscroll-verify-action@v1
100
82
  with:
101
83
  manifest: examples/agentic_ai_evidence_manifest.signed.json
102
- matrixscroll-version: "0.2.2"
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)
103
131
  ```
104
132
 
105
133
  ## CLI
@@ -129,49 +157,45 @@ parsing the output.
129
157
  ```
130
158
  your IDE / agent / CI
131
159
 
132
- manifest (release, commit, evidence pack, SBOM, anything)
160
+ commit envelope, release manifest, evidence pack, SBOM
133
161
 
134
- matrixscroll.sign_manifest(...)
162
+ matrixscroll.sign_manifest(...) / post-commit hook
135
163
 
136
164
  │ canonical JSON (sorted keys, ASCII-escaped, no NaN,
137
165
  │ signature block excluded from input)
138
166
 
139
167
  IdentityProvider ──► Ed25519 signature
140
- (Emulated today,
141
- SSX360 / SE050 tomorrow)
168
+ (L1 emulated today,
169
+ SSX360 / SE050 roadmap)
142
170
 
143
171
 
144
- signed manifest ──► matrixscroll.verify_manifest(...)
172
+ signed document ──► matrixscroll.verify_manifest(...)
145
173
  (anyone, anywhere, offline)
146
174
  ```
147
175
 
148
- The same Python API is designed to serve the local software emulator and the
149
- physical SSX360 device path. Switch with the `MATRIXSCROLL_MODE` environment
150
- variable; in v0.1.x, `hardware` mode reports unavailable until the SE050
151
- transport ships.
176
+ Switch providers with `MATRIXSCROLL_MODE`. Hardware mode reports unavailable
177
+ until the SE050 transport ships.
152
178
 
153
179
  ## Compliance levels
154
180
 
155
181
  | Level | Provider | Backed by | Status |
156
182
  | ----- | -------- | --------- | ------ |
157
183
  | **L1** Emulated | `EmulatedProvider` | Software key, file-backed (0600) | ✅ Shipping |
158
- | **L2** Hardware | `HardwareProvider` | NXP SE050 secure element (SSX360) | 🛠 Stage-0 prototype |
184
+ | **L2** Hardware | `HardwareProvider` | NXP SE050 secure element (SSX360) | 🛠 In progress |
159
185
  | **L3** Attested | future | L2 + remote attestation | 🗺 Roadmap |
160
186
 
161
- `status()` exposes the active level via the `mode` and `available` fields so
162
- read-only dashboards can render before the hardware path is wired.
187
+ `status()` exposes the active level via the `mode` and `available` fields.
163
188
 
164
189
  ## Storage and trust boundaries
165
190
 
166
191
  - Emulated key store: `~/.matrixscroll/device.json`
167
192
  (override with `MATRIXSCROLL_HOME`).
168
193
  - The directory is created `0700`; the seed file is opened `0600` with
169
- `O_CREAT|O_EXCL` so the private seed is never momentarily world-readable and
170
- a race cannot silently clobber an existing key store.
194
+ `O_CREAT|O_EXCL` so the private seed is never momentarily world-readable.
171
195
  - A corrupt or truncated store **fails loud** (`IdentityError`) rather than
172
- silently minting a fresh identity. Identity rotation is an explicit operation.
196
+ silently minting a fresh identity.
173
197
  - The planned hardware path holds nothing private on disk — the seed is sealed
174
- in the secure element. In v0.1.x, this path is a typed availability stub.
198
+ in the secure element.
175
199
 
176
200
  ## Reference implementation, not the only one
177
201
 
@@ -185,8 +209,7 @@ The repo includes a machine-readable control matrix at
185
209
  [`controls/agentic_ai_controls.json`](controls/agentic_ai_controls.json), an
186
210
  example bounded-agent evidence manifest at
187
211
  [`examples/agentic_ai_evidence_manifest.json`](examples/agentic_ai_evidence_manifest.json),
188
- and executable checks in `tests/test_agentic_guidance.py`. These prove each
189
- claim maps to repo evidence and that signed agent scope changes fail verify.
212
+ and executable checks in `tests/test_agentic_guidance.py`.
190
213
 
191
214
  ## License
192
215
 
@@ -4,10 +4,17 @@
4
4
 
5
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.
6
6
 
7
- Matrix Scroll is **not** an IAM system, agent sandbox, or prompt-injection filter — it complements those controls with tamper-evident signatures.
7
+ **Honest limits**
8
8
 
9
- - 📜 **Spec:** [`SPEC.md`](SPEC.md) wire format, canonical encoding, schemas.
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)
10
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.
11
18
  - 🛡 **Agentic AI controls:** [`docs/AGENTIC_AI_SECURITY.md`](docs/AGENTIC_AI_SECURITY.md)
12
19
  maps Matrix Scroll to the joint *Careful Adoption of Agentic AI Services* guidance.
13
20
  - 🔐 **Algorithm:** Ed25519 (RFC 8032). Private keys are never exposed by the SDK API.
@@ -15,35 +22,10 @@ Matrix Scroll is **not** an IAM system, agent sandbox, or prompt-injection filte
15
22
  - 🌐 **Site:** <https://matrixscroll.com>
16
23
  - 🔧 **Reference device:** [SSX360](https://matrixscroll.com/device) (NXP SE050 hardware path in progress).
17
24
 
18
- ```bash
19
- pip install matrixscroll
20
- ```
21
-
22
- ## Quickstart
23
-
24
- ```python
25
- import matrixscroll
26
-
27
- # What identity is active on this machine?
28
- print(matrixscroll.status())
29
- # {'schema': 'matrixscroll.identity.v1', 'available': True,
30
- # 'mode': 'emulated', 'device_id': 'MS-A3F2-9C81', ...}
31
-
32
- # Sign anything (a release manifest, a commit envelope, a SBOM, an evidence pack)
33
- signed = matrixscroll.sign_manifest({"release": "v1.0.0", "artifacts": [...]})
34
-
35
- # Verify, anywhere, offline
36
- assert matrixscroll.verify_manifest(signed)
37
- ```
38
-
39
25
  ## Agent provenance for Git commits
40
26
 
41
- When an AI agent (Cursor, Claude Code, Copilot, etc.) produces a commit, Matrix
42
- Scroll attaches a signed **commit envelope** with actor, tool, and scope metadata.
43
- Verify in CI without trusting the IDE.
44
-
45
27
  ```bash
46
- pip install matrixscroll
28
+ pip install "matrixscroll>=0.2.1"
47
29
  matrixscroll hook-install
48
30
 
49
31
  export MATRIXSCROLL_ACTOR_TYPE=agent
@@ -56,13 +38,59 @@ matrixscroll envelope-verify "$(git rev-parse HEAD)"
56
38
  See [`docs/quickstart-git.md`](docs/quickstart-git.md) and run
57
39
  [`examples/demo/agent-commit-demo.sh`](examples/demo/agent-commit-demo.sh).
58
40
 
59
- ### CI verify
41
+ ### CI verify (single manifest)
60
42
 
61
43
  ```yaml
62
44
  - uses: SSX360/matrixscroll-verify-action@v1
63
45
  with:
64
46
  manifest: examples/agentic_ai_evidence_manifest.signed.json
65
- matrixscroll-version: "0.2.2"
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)
66
94
  ```
67
95
 
68
96
  ## CLI
@@ -92,49 +120,45 @@ parsing the output.
92
120
  ```
93
121
  your IDE / agent / CI
94
122
 
95
- manifest (release, commit, evidence pack, SBOM, anything)
123
+ commit envelope, release manifest, evidence pack, SBOM
96
124
 
97
- matrixscroll.sign_manifest(...)
125
+ matrixscroll.sign_manifest(...) / post-commit hook
98
126
 
99
127
  │ canonical JSON (sorted keys, ASCII-escaped, no NaN,
100
128
  │ signature block excluded from input)
101
129
 
102
130
  IdentityProvider ──► Ed25519 signature
103
- (Emulated today,
104
- SSX360 / SE050 tomorrow)
131
+ (L1 emulated today,
132
+ SSX360 / SE050 roadmap)
105
133
 
106
134
 
107
- signed manifest ──► matrixscroll.verify_manifest(...)
135
+ signed document ──► matrixscroll.verify_manifest(...)
108
136
  (anyone, anywhere, offline)
109
137
  ```
110
138
 
111
- The same Python API is designed to serve the local software emulator and the
112
- physical SSX360 device path. Switch with the `MATRIXSCROLL_MODE` environment
113
- variable; in v0.1.x, `hardware` mode reports unavailable until the SE050
114
- transport ships.
139
+ Switch providers with `MATRIXSCROLL_MODE`. Hardware mode reports unavailable
140
+ until the SE050 transport ships.
115
141
 
116
142
  ## Compliance levels
117
143
 
118
144
  | Level | Provider | Backed by | Status |
119
145
  | ----- | -------- | --------- | ------ |
120
146
  | **L1** Emulated | `EmulatedProvider` | Software key, file-backed (0600) | ✅ Shipping |
121
- | **L2** Hardware | `HardwareProvider` | NXP SE050 secure element (SSX360) | 🛠 Stage-0 prototype |
147
+ | **L2** Hardware | `HardwareProvider` | NXP SE050 secure element (SSX360) | 🛠 In progress |
122
148
  | **L3** Attested | future | L2 + remote attestation | 🗺 Roadmap |
123
149
 
124
- `status()` exposes the active level via the `mode` and `available` fields so
125
- read-only dashboards can render before the hardware path is wired.
150
+ `status()` exposes the active level via the `mode` and `available` fields.
126
151
 
127
152
  ## Storage and trust boundaries
128
153
 
129
154
  - Emulated key store: `~/.matrixscroll/device.json`
130
155
  (override with `MATRIXSCROLL_HOME`).
131
156
  - The directory is created `0700`; the seed file is opened `0600` with
132
- `O_CREAT|O_EXCL` so the private seed is never momentarily world-readable and
133
- a race cannot silently clobber an existing key store.
157
+ `O_CREAT|O_EXCL` so the private seed is never momentarily world-readable.
134
158
  - A corrupt or truncated store **fails loud** (`IdentityError`) rather than
135
- silently minting a fresh identity. Identity rotation is an explicit operation.
159
+ silently minting a fresh identity.
136
160
  - The planned hardware path holds nothing private on disk — the seed is sealed
137
- in the secure element. In v0.1.x, this path is a typed availability stub.
161
+ in the secure element.
138
162
 
139
163
  ## Reference implementation, not the only one
140
164
 
@@ -148,8 +172,7 @@ The repo includes a machine-readable control matrix at
148
172
  [`controls/agentic_ai_controls.json`](controls/agentic_ai_controls.json), an
149
173
  example bounded-agent evidence manifest at
150
174
  [`examples/agentic_ai_evidence_manifest.json`](examples/agentic_ai_evidence_manifest.json),
151
- and executable checks in `tests/test_agentic_guidance.py`. These prove each
152
- claim maps to repo evidence and that signed agent scope changes fail verify.
175
+ and executable checks in `tests/test_agentic_guidance.py`.
153
176
 
154
177
  ## License
155
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).
@@ -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
@@ -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.*
@@ -0,0 +1,69 @@
1
+ # Delegation attestation RFC (commit envelope v1.1)
2
+
3
+ > Status: implemented in schema 0.2.4; wire format backward compatible via optional `delegation` block.
4
+
5
+ ## Problem
6
+
7
+ Alien Agent ID leads on **human→agent delegation chains**. Matrix Scroll envelopes
8
+ record `actor_type` but cannot answer *"who authorized this agent?"* without a
9
+ structured, verifiable delegation attestation.
10
+
11
+ ## Solution
12
+
13
+ Add optional top-level `delegation` block to `matrixscroll.commit_envelope.v1`:
14
+
15
+ ```json
16
+ "delegation": {
17
+ "owner_id": "security@matrixscroll.com",
18
+ "approver_id": "repo-owner",
19
+ "delegation_manifest_uri": "examples/agentic_ai_evidence_manifest.signed.json",
20
+ "delegation_manifest_sha256": "abc123..."
21
+ }
22
+ ```
23
+
24
+ | Field | Required | Purpose |
25
+ |-------|----------|---------|
26
+ | `owner_id` | yes | Named system/resource owner (AAI-04) |
27
+ | `approver_id` | no | Human who approved scope for this session |
28
+ | `delegation_manifest_uri` | no | Path/URI to signed `agentic_ai_evidence` manifest |
29
+ | `delegation_manifest_sha256` | no | Content pin for linked manifest |
30
+
31
+ Schema: [`schemas/commit-envelope.v1.json`](../schemas/commit-envelope.v1.json)
32
+
33
+ ## Verification rules
34
+
35
+ When `delegation` is present:
36
+
37
+ 1. `owner_id` MUST be non-empty
38
+ 2. If `delegation_manifest_uri` is set, file MUST exist and `verify_manifest()` MUST pass
39
+ 3. If `delegation_manifest_sha256` is set, MUST match SHA-256 of manifest bytes
40
+
41
+ Policy gate (`VerifyPolicy`):
42
+
43
+ ```json
44
+ {
45
+ "require_delegation_for_actor_types": ["agent"]
46
+ }
47
+ ```
48
+
49
+ Agent commits without `delegation.owner_id` fail closed.
50
+
51
+ ## Relationship to `provenance.agent_scope`
52
+
53
+ - `agent_scope` — quick reference URI (existing, optional)
54
+ - `delegation` — structured accountability with owner + optional manifest pin
55
+
56
+ When `verify_agent_scope: true` in policy, gate verifies `agent_scope` manifest signature.
57
+ Delegation manifest is verified independently when `delegation_manifest_uri` is set.
58
+
59
+ ## Control mapping
60
+
61
+ - **AAI-04** human accountability — `owner_id`, `approver_id`
62
+ - **AAI-02** least privilege — linked evidence manifest `task.allowed_operations`
63
+ - **AAI-07** monitoring — gate summaries count agent vs human commits
64
+
65
+ ## Future work
66
+
67
+ - OIDC/DPoP binding (Alien parity) without cloud dependency
68
+ - Multi-agent delegation chains in one envelope
69
+ - Hardware-backed owner signatures (L2/L3)