@strixgov/mcp-proxy 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +2 -0
- package/examples/github-reference/README.md +34 -0
- package/examples/github-reference/acceptance.mjs +668 -0
- package/examples/github-reference/claims-matrix.md +34 -0
- package/examples/github-reference/demo-script.md +17 -0
- package/examples/github-reference/package-lock.json +1326 -0
- package/examples/github-reference/package.json +23 -0
- package/examples/github-reference/reuse-inventory.md +24 -0
- package/package.json +4 -4
- package/src/proxy.mjs +17 -0
- package/src/webhook-approver.mjs +3 -0
- package/test/package-contract.test.mjs +12 -0
- package/test/proxy-end-to-end.test.mjs +72 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# GitHub MCP demo — claims and scenario matrix
|
|
2
|
+
|
|
3
|
+
The matrix below is the boundary for any sales or pilot language. “PASS” means the named behavior is reproduced in the local synthetic harness; it does not mean GitHub was contacted. `BLOCKED` means the requested exact-merge behavior is not implemented in the published Strix path. Partial lower-level tests do not upgrade that status.
|
|
4
|
+
|
|
5
|
+
| ID | Scenario | Result | Evidence / boundary |
|
|
6
|
+
|---|---|---|---|
|
|
7
|
+
| GH-01 | Read repository information | **PASS — fixture only** | A GitHub-pack read traverses the published proxy and returns the local fixture's contents. The signed receipt and fixture call log are captured. No real repository is read. |
|
|
8
|
+
| GH-02 | Unauthorized PR merge | **PASS — intercepted** | `merge_pull_request` is explicitly denied; the fake upstream's merge invocation count remains zero. The DENY receipt is interception evidence, not evidence of a GitHub merge attempt. |
|
|
9
|
+
| GH-03 | Request approval for an exact PR merge | **PASS — held, then denied** | The signed-approval file contains the named capability and exact supplied owner/repo/PR/method arguments. While pending, the merge handler has zero invocations. The synthetic reviewer denies it; no merge occurs. |
|
|
10
|
+
| GH-04 | Execute exactly the approved merge once | **BLOCKED** | No merge execution is attempted. The published MCP proxy is Mode 1/2; Mode 3 execution-token enforcement is not wired. The existing full-head-SHA merge PEP is source-reference-only with injected dependencies and unsigned result, has no production caller, and the official GitHub MCP merge surface lacks the required atomic `sha` precondition. |
|
|
11
|
+
| GH-05 | Change repository, PR, target branch, or action arguments after approval | **PARTIAL / BLOCKED for merge** | Distinct owner/repo/PR/method requests require distinct approval request IDs; no merge invocation is made. The official merge tool does not accept a target-branch/head-SHA precondition, and no integrated single-use execution grant exists to test all mutations. |
|
|
12
|
+
| GH-06 | Reuse a consumed approval | **PARTIAL — approval-file layer** | A successful signed approval for a synthetic `create_branch` fixture call is consumed; a repeat call with identical arguments creates a new request and remains held until separately denied. This does not establish replay defense for an execution grant or a merge. |
|
|
13
|
+
| GH-07 | Race two calls against one approval | **PARTIAL — approval-file layer** | Two concurrent fixture writes get distinct request IDs. Approving one and denying the other yields at most one fixture handler invocation. This is not a test of the missing atomic execution-token redemption path for GitHub merge. |
|
|
14
|
+
| GH-08 | Unclassified destructive GitHub tool | **PASS — intercepted** | The fake upstream advertises `delete_repository`, absent from the GitHub capability pack; default-deny refuses it with zero upstream calls. This is a fixture classification test, not a live catalog parity audit. |
|
|
15
|
+
| GH-09 | Policy, gateway, or approval-store unavailable | **PARTIAL — fail closed at tested boundaries** | Invalid policy configuration is rejected before dispatch; an unusable approval request directory fails closed with zero downstream calls. The gateway is in-process, not a separately deployed service, so a remote gateway outage cannot be simulated in this architecture. |
|
|
16
|
+
| GH-10 | Tamper with signed evidence | **PASS — published verifier 1.24.1** | The independent published verifier accepts the untampered receipt chain and rejects a one-byte/field-tampered copy. Current repo verifier 1.24.2 is unpublished and not used. |
|
|
17
|
+
| GH-11 | Restart and verify persisted receipts | **PASS — local persistence** | The proxy restarts against the same temporary storage and key; prior receipts remain in the chain and the published verifier checks it. This is a local file-store test. |
|
|
18
|
+
| GH-12 | Direct-route bypass / coverage boundary | **LIMITATION DEMONSTRATED** | A test client calling the in-memory upstream directly bypasses proxy policy and creates no Strix receipt. No GitHub credential is available in the test estate. Guard coverage of configured client entries is not proof that all credentials or direct routes are blocked. |
|
|
19
|
+
|
|
20
|
+
## Safe wording
|
|
21
|
+
|
|
22
|
+
Supported wording: “In an isolated local MCP fixture, the published proxy allowed a classified read, denied an unauthorized merge before the fake upstream, held an approval request over its exact supplied arguments, produced signed receipts, and detected tampering with its published verifier.”
|
|
23
|
+
|
|
24
|
+
Unsupported wording: “Strix securely merged a GitHub PR,” “the merge was bound to the live head SHA,” “GitHub executed the operation,” “all GitHub routes are intercepted,” or “the demo proves production single-use authorization.” No live GitHub call occurred, and the exact merge execution flow remains blocked.
|
|
25
|
+
|
|
26
|
+
## Release blockers
|
|
27
|
+
|
|
28
|
+
1. Wire the production single-use, payload-bound authorization lifecycle into the MCP path without creating a second authority, signer, policy engine, or gateway.
|
|
29
|
+
2. Bind a trusted actor and tenant plus capability, repository, PR, target branch/head SHA, policy revision, and expiry to the authorization; redeem it atomically before the side effect.
|
|
30
|
+
3. Use a GitHub merge primitive that carries the approved full head SHA as a provider-side precondition; the current official MCP `merge_pull_request` shape does not.
|
|
31
|
+
4. Publish and audit the intended verifier 1.24.2 artifact. Current npm latest is 1.24.1; 1.24.2 returns E404.
|
|
32
|
+
5. Repair the published MCP adapter test artifact: 0.1.4's package `test` script references `scripts/preflight.mjs`, which its tarball omits, and ships no tests.
|
|
33
|
+
6. Establish source-build provenance for the published Strix tarballs before making a source-to-artifact assurance claim. npm registry signatures verified; no provenance attestation was found for the five audited Strix packages.
|
|
34
|
+
7. Run any provider-side moved-head exercise only with an explicitly authorized disposable GitHub target and a real audit trail. This task performed no live provider exercise.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Two-minute demo script — limited synthetic fixture
|
|
2
|
+
|
|
3
|
+
**State the boundary first:** “This runs against an in-memory GitHub-shaped MCP fixture with no GitHub credential, network access, or repository mutation. It shows the published proxy's current policy/approval behavior; it does not execute or simulate a successful PR merge.”
|
|
4
|
+
|
|
5
|
+
**0:00–0:20 — Show the published stack.** In a clean external consumer, run `npm ci --ignore-scripts` and `npm test`. Point to the pinned lockfile and `environment-manifest.json`, which record exact published versions and runtime.
|
|
6
|
+
|
|
7
|
+
**0:20–0:45 — Show interception.** The fixture read is explicitly allowed. The merge request is explicitly denied; the fake upstream invocation log shows zero merge calls. Then a second merge request is held with its exact owner, repository, PR number, merge method, and request hash recorded; a synthetic reviewer denies it, still with zero downstream merge calls. Call the signed receipt what it is: evidence of the intercepted decision, not proof of a GitHub operation.
|
|
8
|
+
|
|
9
|
+
**0:45–1:15 — Show a harmless approved fixture action.** A separate synthetic `create_branch` request is approved by the encrypted local Guard key and reaches only the in-memory handler. The fixture logs a synthetic write. The published verifier checks the signed execution outcome against the corresponding authorization receipt; that proves the local fixture path, not a GitHub branch.
|
|
10
|
+
|
|
11
|
+
**1:15–1:35 — Show replay and race controls.** Repeating the same fixture call yields a new approval request and is denied. Two concurrent identical fixture calls produce distinct requests; one synthetic approval and one denial result in exactly one fixture invocation. Label these as approval-file-layer tests, not proof of atomic single-use merge authorization.
|
|
12
|
+
|
|
13
|
+
**1:35–1:50 — Show independent verification.** `verifier-chain.stdout.txt` reports the persisted receipt chain valid. The altered receipt copy is rejected, and `execution-outcome-verification.json` records signature, hash, and receipt-link verification for the synthetic fixture outcomes.
|
|
14
|
+
|
|
15
|
+
**1:50–2:00 — State the blocking dependency.** “We are not claiming exact GitHub merge execution yet. The published proxy does not enforce Mode-3 single-use authorization, and the official merge-tool input lacks an atomic full-head-SHA precondition. The buyer-safe claim and the exact next steps are in `claims-matrix.md`.”
|
|
16
|
+
|
|
17
|
+
This is a reproducible, evidence-backed partial demonstration. It is not the complete commercial merge story requested in the engineering directive, and it does not make the work pilot-ready or production-ready.
|