matrixscroll 0.2.2__tar.gz → 0.2.5__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 (102) hide show
  1. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/CHANGELOG.md +44 -0
  2. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/CONTRIBUTING.md +21 -2
  3. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/PKG-INFO +74 -49
  4. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/README.md +71 -48
  5. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/SECURITY.md +2 -1
  6. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/SPEC.md +41 -0
  7. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/docs/AGENTIC_AI_SECURITY.md +1 -1
  8. matrixscroll-0.2.5/docs/CI_HARD_GATE.md +49 -0
  9. matrixscroll-0.2.5/docs/COMPARISON.md +84 -0
  10. matrixscroll-0.2.5/docs/delegation-attestation-rfc.md +69 -0
  11. matrixscroll-0.2.5/docs/hardware-provider.md +38 -0
  12. matrixscroll-0.2.5/docs/quickstart-claude-code.md +45 -0
  13. matrixscroll-0.2.5/docs/quickstart-copilot.md +52 -0
  14. matrixscroll-0.2.5/docs/quickstart-cursor.md +57 -0
  15. matrixscroll-0.2.5/docs/quickstart-git.md +126 -0
  16. matrixscroll-0.2.5/docs/rekor-guac-bridge-design.md +82 -0
  17. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/docs/superpowers/specs/2026-06-19-matrixscroll-git-design.md +1 -1
  18. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/docs/yubikey-bridge.md +14 -0
  19. matrixscroll-0.2.5/docs/yubikey-smoke.md +35 -0
  20. matrixscroll-0.2.5/examples/ci/protected-branch.yml +74 -0
  21. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/examples/release-manifest.json +6 -6
  22. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/examples/release-manifest.signed.json +10 -10
  23. matrixscroll-0.2.5/examples/trusted-keys-policy.json +7 -0
  24. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/matrixscroll/__init__.py +4 -4
  25. matrixscroll-0.2.5/matrixscroll/cli.py +443 -0
  26. matrixscroll-0.2.5/matrixscroll/gate.py +425 -0
  27. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/matrixscroll/git.py +68 -20
  28. matrixscroll-0.2.5/matrixscroll/guac_export.py +78 -0
  29. matrixscroll-0.2.5/matrixscroll/manifest.py +101 -0
  30. matrixscroll-0.2.5/matrixscroll/policy.py +102 -0
  31. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/matrixscroll/providers/base.py +6 -0
  32. matrixscroll-0.2.5/matrixscroll/providers/hardware.py +69 -0
  33. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/matrixscroll/providers/registry.py +4 -0
  34. matrixscroll-0.2.5/matrixscroll/providers/se050_transport.py +67 -0
  35. matrixscroll-0.2.5/matrixscroll/providers/tpm.py +144 -0
  36. matrixscroll-0.2.5/matrixscroll/providers/yubikey.py +199 -0
  37. matrixscroll-0.2.5/matrixscroll/rekor_publish.py +131 -0
  38. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/pyproject.toml +3 -2
  39. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/schemas/commit-envelope.v1.json +25 -0
  40. matrixscroll-0.2.5/tests/fixtures/github-gpgsig-commit.txt +26 -0
  41. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/tests/test_cli.py +70 -0
  42. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/tests/test_core.py +1 -1
  43. matrixscroll-0.2.5/tests/test_gate.py +203 -0
  44. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/tests/test_git_envelope.py +41 -0
  45. matrixscroll-0.2.5/tests/test_guac_rekor.py +75 -0
  46. matrixscroll-0.2.5/tests/test_policy.py +63 -0
  47. matrixscroll-0.2.5/tests/test_se050_transport.py +49 -0
  48. matrixscroll-0.2.5/tests/test_tpm_provider.py +30 -0
  49. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/tests/test_yubikey_provider.py +24 -1
  50. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/README.md +2 -2
  51. matrixscroll-0.2.5/vectors/valid_commit_envelope.json +38 -0
  52. matrixscroll-0.2.2/docs/hardware-provider.md +0 -20
  53. matrixscroll-0.2.2/docs/quickstart-git.md +0 -72
  54. matrixscroll-0.2.2/examples/ci/protected-branch.yml +0 -38
  55. matrixscroll-0.2.2/matrixscroll/cli.py +0 -234
  56. matrixscroll-0.2.2/matrixscroll/manifest.py +0 -59
  57. matrixscroll-0.2.2/matrixscroll/policy.py +0 -55
  58. matrixscroll-0.2.2/matrixscroll/providers/hardware.py +0 -22
  59. matrixscroll-0.2.2/matrixscroll/providers/yubikey.py +0 -104
  60. matrixscroll-0.2.2/tests/test_policy.py +0 -26
  61. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/.gitignore +0 -0
  62. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/LICENSE +0 -0
  63. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/controls/agentic_ai_controls.json +0 -0
  64. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/docs/WHITEPAPER.md +0 -0
  65. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/docs/superpowers/plans/2026-06-19-ci-action-plan.md +0 -0
  66. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/docs/superpowers/plans/2026-06-19-sdk-refactor-plan.md +0 -0
  67. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/examples/agentic_ai_evidence_manifest.json +0 -0
  68. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/examples/agentic_ai_evidence_manifest.signed.json +0 -0
  69. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/examples/commit-envelope.json +0 -0
  70. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/examples/commit-envelope.signed.json +0 -0
  71. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/examples/demo/agent-commit-demo.sh +0 -0
  72. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/examples/demo/generate_signed_examples.py +0 -0
  73. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/matrixscroll/_core.py +0 -0
  74. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/matrixscroll/canonical.py +0 -0
  75. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/matrixscroll/constants.py +0 -0
  76. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/matrixscroll/errors.py +0 -0
  77. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/matrixscroll/hooks/post-commit +0 -0
  78. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/matrixscroll/hooks/pre-push +0 -0
  79. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/matrixscroll/providers/__init__.py +0 -0
  80. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/matrixscroll/providers/emulated.py +0 -0
  81. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/matrixscroll/py.typed +0 -0
  82. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/schemas/evidence-pack.v1.json +0 -0
  83. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/schemas/release-manifest.v1.json +0 -0
  84. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/tests/__init__.py +0 -0
  85. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/tests/test_agentic_guidance.py +0 -0
  86. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/tests/test_canonical.py +0 -0
  87. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/tests/test_release_metadata.py +0 -0
  88. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/tests/test_vectors.py +0 -0
  89. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/_fixture_key.json +0 -0
  90. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/_generate.py +0 -0
  91. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/tampered_algorithm.json +0 -0
  92. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/tampered_device_id.json +0 -0
  93. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/tampered_field.json +0 -0
  94. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/tampered_nested.json +0 -0
  95. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/tampered_public_key.json +0 -0
  96. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/tampered_schema.json +0 -0
  97. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/tampered_signature.json +0 -0
  98. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/unsigned_empty_block.json +0 -0
  99. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/unsigned_no_block.json +0 -0
  100. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/valid_nested.json +0 -0
  101. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/valid_simple.json +0 -0
  102. {matrixscroll-0.2.2 → matrixscroll-0.2.5}/vectors/valid_unicode.json +0 -0
@@ -4,6 +4,48 @@ 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.5] - 2026-06-24
8
+
9
+ Post-HN patch: GitHub gpgsig commit binding, SE050 mock transport, YubiKey pubkey export, Rekor/GUAC CLI MVP.
10
+
11
+ ### Added
12
+ - **GitHub `gpgsig` commit binding** — verify envelopes against raw commit object SHA when OpenPGP signatures are present.
13
+ - **SE050 mock transport** — `MATRIXSCROLL_SE050_MOCK=1` enables `HardwareProvider` for development (`providers/se050_transport.py`).
14
+ - **YubiKey public key export** — PKCS#11 EC public key read path (mock + real token).
15
+ - **GUAC export CLI** — `matrixscroll envelope-export-guac --bundle DIR --output guac.jsonl`.
16
+ - **Rekor publish stub** — `matrixscroll envelope-publish-rekor --bundle DIR` (dry-run artifacts; optional `--rekor-cli`).
17
+
18
+ ### Fixed
19
+ - **`parse_commit()` / envelope verify** on GitHub-signed commits with multi-line `gpgsig` headers (Windows CRLF safe).
20
+
21
+ ## [0.2.4] - 2026-06-20
22
+
23
+ Who-Acted gate productization: attribution policy, delegation schema, CI hardening.
24
+
25
+ ### Added
26
+ - **Attribution policy** — `require_actor_types`, `deny_actor_types`,
27
+ `require_delegation_for_actor_types`, `verify_agent_scope` in `VerifyPolicy`.
28
+ - **`delegation` block** in commit envelope schema with owner/approver/manifest pin.
29
+ - **`delegation-attestation-rfc.md`**, IDE quickstarts (Cursor, Copilot, Claude Code),
30
+ branch-protection runbook, Rekor/GUAC bridge design doc.
31
+ - **GitHub Step Summary** in verify-action range mode; fail-closed notes fetch.
32
+ - **pre-push** SHA-bound verification; optional `publish_notes` in hook config.
33
+
34
+ ### Fixed
35
+ - Empty commit ranges in `verify_envelope_range` now pass with `note: no commits in range`.
36
+
37
+ ## [0.2.3] - 2026-06-20
38
+
39
+ Scroll Gate export MVP: PR commit-range verification with git notes and bundle transport.
40
+
41
+ ### Added
42
+ - **`matrixscroll/gate.py`** — SHA-bound envelope verification, commit-range discovery,
43
+ filesystem bundle export, git notes publish/fetch, and range verification summaries.
44
+ - **CLI commands** — `envelope-export`, `envelope-publish-notes`, `envelope-fetch-notes`,
45
+ and `envelope-verify-range` with policy flags and JSON summaries for CI.
46
+ - **GitHub Action range mode** — `head-ref` / `base-ref` inputs for PR provenance gates
47
+ via notes or bundle sources.
48
+
7
49
  ## [0.2.2] - 2026-06-20
8
50
 
9
51
  Policy flags for CI and release gates.
@@ -85,6 +127,8 @@ Initial public release. Extracted from the SSX360 reference implementation.
85
127
  - Device id format: `MS-XXXX-XXXX` (SHA-256 of the raw public key, first 8 hex
86
128
  chars, uppercase).
87
129
 
130
+ [0.2.2]: https://github.com/SSX360/matrixscroll/releases/tag/v0.2.2
131
+ [0.2.1]: https://github.com/SSX360/matrixscroll/releases/tag/v0.2.1
88
132
  [0.2.0]: https://github.com/SSX360/matrixscroll/releases/tag/v0.2.0
89
133
  [0.1.1]: https://github.com/SSX360/matrixscroll/releases/tag/v0.1.1
90
134
  [0.1.0]: https://github.com/SSX360/matrixscroll/releases/tag/v0.1.0
@@ -29,6 +29,25 @@ pip install -e ".[dev]"
29
29
  pytest -q
30
30
  ```
31
31
 
32
+ ## Commit envelope provenance (Scroll Gate)
33
+
34
+ For PRs that include agent-assisted commits, publish signed commit envelopes to git notes:
35
+
36
+ ```bash
37
+ matrixscroll hook-install
38
+ export MATRIXSCROLL_ACTOR_TYPE=agent # or human / ci as appropriate
39
+ export MATRIXSCROLL_TOOL=cursor # or your IDE / agent tool name
40
+ git commit -m "feat: your change"
41
+ matrixscroll envelope-publish-notes --base origin/main --head HEAD
42
+ git push origin refs/notes/matrixscroll
43
+ ```
44
+
45
+ CI verifies the PR range with `matrixscroll envelope-verify-range --source notes`.
46
+ Until repository variable `ENFORCE_PROVENANCE=true` is set, missing notes produce a **warning**
47
+ in the GitHub Step Summary rather than a hard failure.
48
+
49
+ Optional policy file for release branches: [`.github/trusted-keys.json`](.github/trusted-keys.json).
50
+
32
51
  ## Running the conformance vectors
33
52
 
34
53
  ```bash
@@ -42,10 +61,10 @@ vectors are welcome.
42
61
 
43
62
  ## Pull request checklist
44
63
 
45
- - [ ] Tests pass locally (`pytest -q`).
64
+ - [ ] For agent-assisted commits: publish envelope git notes (`envelope-publish-notes` + push `refs/notes/matrixscroll`).
46
65
  - [ ] New public API has a docstring and is re-exported from
47
66
  `matrixscroll/__init__.py` if it's part of the supported surface.
48
- - [ ] `CHANGELOG.md` updated under `[Unreleased]`.
67
+ - [ ] `CHANGELOG.md` updated with a dated version entry (see Keep a Changelog format).
49
68
  - [ ] `SPEC.md` updated if anything wire-format-related changed.
50
69
  - [ ] No private keys, no real device ids, and no fixtures generated by a
51
70
  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.5
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
@@ -32,7 +32,9 @@ Provides-Extra: dev
32
32
  Requires-Dist: build>=1.0; extra == 'dev'
33
33
  Requires-Dist: pytest>=7.4; extra == 'dev'
34
34
  Provides-Extra: git
35
+ Provides-Extra: tpm
35
36
  Provides-Extra: yubikey
37
+ Requires-Dist: python-pkcs11>=0.7; extra == 'yubikey'
36
38
  Description-Content-Type: text/markdown
37
39
 
38
40
  # Matrix Scroll
@@ -41,10 +43,17 @@ Description-Content-Type: text/markdown
41
43
 
42
44
  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
45
 
44
- Matrix Scroll is **not** an IAM system, agent sandbox, or prompt-injection filter — it complements those controls with tamper-evident signatures.
46
+ **Honest limits**
45
47
 
46
- - 📜 **Spec:** [`SPEC.md`](SPEC.md) wire format, canonical encoding, schemas.
48
+ - **Shipping now:** L1 emulated Ed25519 software key; Git post-commit hooks; Scroll Gate PR verification (0.2.3+); delegation attestation schema (0.2.4+)
49
+ - **In progress:** SSX360 SE050 hardware provider; YubiKey PKCS#11 bridge
50
+ - **Not:** IAM, sandbox, prompt-injection filter, or agent runtime
51
+
52
+ - 📜 **Spec:** [`SPEC.md`](SPEC.md) — wire format, canonical encoding, document types.
53
+ - 📋 **Commit envelope schema:** [`schemas/commit-envelope.v1.json`](schemas/commit-envelope.v1.json)
47
54
  - 📄 **Whitepaper:** [`docs/WHITEPAPER.md`](docs/WHITEPAPER.md) — why Git commits, implementation guide.
55
+ - ⚖️ **Comparison:** [`docs/COMPARISON.md`](docs/COMPARISON.md) — vs Sigstore, agentmark, Alien, ForgeProof.
56
+ - 💬 **Support:** [`SUPPORT.md`](SUPPORT.md) — issues, Discussions, security contact.
48
57
  - 🛡 **Agentic AI controls:** [`docs/AGENTIC_AI_SECURITY.md`](docs/AGENTIC_AI_SECURITY.md)
49
58
  maps Matrix Scroll to the joint *Careful Adoption of Agentic AI Services* guidance.
50
59
  - 🔐 **Algorithm:** Ed25519 (RFC 8032). Private keys are never exposed by the SDK API.
@@ -52,35 +61,10 @@ Matrix Scroll is **not** an IAM system, agent sandbox, or prompt-injection filte
52
61
  - 🌐 **Site:** <https://matrixscroll.com>
53
62
  - 🔧 **Reference device:** [SSX360](https://matrixscroll.com/device) (NXP SE050 hardware path in progress).
54
63
 
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
64
  ## Agent provenance for Git commits
77
65
 
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
66
  ```bash
83
- pip install matrixscroll
67
+ pip install "matrixscroll>=0.2.1"
84
68
  matrixscroll hook-install
85
69
 
86
70
  export MATRIXSCROLL_ACTOR_TYPE=agent
@@ -93,13 +77,59 @@ matrixscroll envelope-verify "$(git rev-parse HEAD)"
93
77
  See [`docs/quickstart-git.md`](docs/quickstart-git.md) and run
94
78
  [`examples/demo/agent-commit-demo.sh`](examples/demo/agent-commit-demo.sh).
95
79
 
96
- ### CI verify
80
+ ### CI verify (single manifest)
97
81
 
98
82
  ```yaml
99
83
  - uses: SSX360/matrixscroll-verify-action@v1
100
84
  with:
101
85
  manifest: examples/agentic_ai_evidence_manifest.signed.json
102
- matrixscroll-version: "0.2.2"
86
+ matrixscroll-version: "0.2.4"
87
+ require-mode: emulated
88
+ ```
89
+
90
+ ### Scroll Gate (PR commit range)
91
+
92
+ Developers publish envelopes to git notes before PR review:
93
+
94
+ ```bash
95
+ matrixscroll envelope-publish-notes --base origin/main --head HEAD
96
+ git push origin refs/notes/matrixscroll
97
+ ```
98
+
99
+ ```yaml
100
+ - uses: actions/checkout@v4
101
+ with:
102
+ fetch-depth: 0
103
+ - uses: SSX360/matrixscroll-verify-action@v1
104
+ with:
105
+ head-ref: ${{ github.event.pull_request.head.sha }}
106
+ base-ref: ${{ github.event.pull_request.base.sha }}
107
+ source: notes
108
+ matrixscroll-version: "0.2.4"
109
+ summary-output: provenance-summary.json
110
+ ```
111
+
112
+ See [`docs/quickstart-git.md`](docs/quickstart-git.md) and [`examples/ci/protected-branch.yml`](examples/ci/protected-branch.yml).
113
+
114
+ Policy flags (`--require-mode`, `--trusted-keys`, actor/delegation policy) ship in **0.2.2+**.
115
+
116
+ ## Quickstart (Python API)
117
+
118
+ ```bash
119
+ pip install "matrixscroll>=0.2.1"
120
+ ```
121
+
122
+ ```python
123
+ import matrixscroll
124
+
125
+ print(matrixscroll.status())
126
+ # {'schema': 'matrixscroll.identity.v1', 'available': True,
127
+ # 'mode': 'emulated', 'device_id': 'MS-A3F2-9C81', ...}
128
+
129
+ # Sign a release manifest, commit envelope, evidence pack, or SBOM
130
+ signed = matrixscroll.sign_manifest({"release": "v1.0.0", "artifacts": [...]})
131
+
132
+ assert matrixscroll.verify_manifest(signed)
103
133
  ```
104
134
 
105
135
  ## CLI
@@ -129,49 +159,45 @@ parsing the output.
129
159
  ```
130
160
  your IDE / agent / CI
131
161
 
132
- manifest (release, commit, evidence pack, SBOM, anything)
162
+ commit envelope, release manifest, evidence pack, SBOM
133
163
 
134
- matrixscroll.sign_manifest(...)
164
+ matrixscroll.sign_manifest(...) / post-commit hook
135
165
 
136
166
  │ canonical JSON (sorted keys, ASCII-escaped, no NaN,
137
167
  │ signature block excluded from input)
138
168
 
139
169
  IdentityProvider ──► Ed25519 signature
140
- (Emulated today,
141
- SSX360 / SE050 tomorrow)
170
+ (L1 emulated today,
171
+ SSX360 / SE050 roadmap)
142
172
 
143
173
 
144
- signed manifest ──► matrixscroll.verify_manifest(...)
174
+ signed document ──► matrixscroll.verify_manifest(...)
145
175
  (anyone, anywhere, offline)
146
176
  ```
147
177
 
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.
178
+ Switch providers with `MATRIXSCROLL_MODE`. Hardware mode reports unavailable
179
+ until the SE050 transport ships.
152
180
 
153
181
  ## Compliance levels
154
182
 
155
183
  | Level | Provider | Backed by | Status |
156
184
  | ----- | -------- | --------- | ------ |
157
185
  | **L1** Emulated | `EmulatedProvider` | Software key, file-backed (0600) | ✅ Shipping |
158
- | **L2** Hardware | `HardwareProvider` | NXP SE050 secure element (SSX360) | 🛠 Stage-0 prototype |
186
+ | **L2** Hardware | `HardwareProvider` | NXP SE050 secure element (SSX360) | 🛠 In progress |
159
187
  | **L3** Attested | future | L2 + remote attestation | 🗺 Roadmap |
160
188
 
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.
189
+ `status()` exposes the active level via the `mode` and `available` fields.
163
190
 
164
191
  ## Storage and trust boundaries
165
192
 
166
193
  - Emulated key store: `~/.matrixscroll/device.json`
167
194
  (override with `MATRIXSCROLL_HOME`).
168
195
  - 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.
196
+ `O_CREAT|O_EXCL` so the private seed is never momentarily world-readable.
171
197
  - A corrupt or truncated store **fails loud** (`IdentityError`) rather than
172
- silently minting a fresh identity. Identity rotation is an explicit operation.
198
+ silently minting a fresh identity.
173
199
  - 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.
200
+ in the secure element.
175
201
 
176
202
  ## Reference implementation, not the only one
177
203
 
@@ -185,8 +211,7 @@ The repo includes a machine-readable control matrix at
185
211
  [`controls/agentic_ai_controls.json`](controls/agentic_ai_controls.json), an
186
212
  example bounded-agent evidence manifest at
187
213
  [`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.
214
+ and executable checks in `tests/test_agentic_guidance.py`.
190
215
 
191
216
  ## License
192
217
 
@@ -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,49 @@
1
+ # CI hard gate — Scroll Gate Phase C
2
+
3
+ Enable required provenance on `SSX360/matrixscroll` after contributors can publish git notes.
4
+
5
+ ## 1. Repository variable
6
+
7
+ ```bash
8
+ gh variable set ENFORCE_PROVENANCE --body true --repo SSX360/matrixscroll
9
+ ```
10
+
11
+ When set, [`verify-manifest.yml`](.github/workflows/verify-manifest.yml) **fails** PRs missing `refs/notes/matrixscroll` envelopes.
12
+
13
+ ## 2. Branch protection
14
+
15
+ In GitHub → Settings → Branches → `main`:
16
+
17
+ - Require status check: **Verify Matrix Scroll manifest**
18
+ - Require branches up to date before merging
19
+
20
+ ```bash
21
+ gh api repos/SSX360/matrixscroll/branches/main/protection \
22
+ --method PUT \
23
+ -f required_status_checks[strict]=true \
24
+ -f required_status_checks[checks][][context]='Verify Matrix Scroll manifest' \
25
+ -f enforce_admins=false \
26
+ -f required_pull_request_reviews[required_approving_review_count]=0
27
+ ```
28
+
29
+ Adjust review count to match your team policy.
30
+
31
+ ## 3. Contributor flow
32
+
33
+ Every PR must:
34
+
35
+ ```bash
36
+ matrixscroll envelope-publish-notes --base origin/main --head HEAD
37
+ git push origin refs/notes/matrixscroll
38
+ matrixscroll envelope-verify-range --base origin/main --head HEAD --source notes
39
+ ```
40
+
41
+ See [CONTRIBUTING.md](CONTRIBUTING.md).
42
+
43
+ ## Rollback
44
+
45
+ ```bash
46
+ gh variable set ENFORCE_PROVENANCE --body false --repo SSX360/matrixscroll
47
+ ```
48
+
49
+ Soft gate resumes (warning only in Step Summary).