From 8e7b9f5c85eaca62c11042386a7ce8c68f112cbf Mon Sep 17 00:00:00 2001 From: holistis <272782562+holistis@users.noreply.github.com> Date: Sat, 24 Oct 2026 15:02:33 +0200 Subject: [PATCH] self-check-server: depend on the published agent-receipt-verify 0.2.9 instead of a git commit The newest npm refuses git dependencies by default (EALLOWGIT), which made the x402-lint publish workflow fail at npm ci. 0.2.9 is the first published version that passes the injected fetch on to the did:web lookup (agent-receipt-verify#46, #47). The lockfile now resolves from the registry with an integrity hash instead of a ssh address, and its x402-lint entry is brought to 0.1.1. --- package-lock.json | 10 +++++----- packages/self-check-server/README.md | 2 +- packages/self-check-server/package.json | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 10a9691..330ed40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2211,9 +2211,9 @@ "license": "MIT" }, "node_modules/agent-receipt-verify": { - "version": "0.2.8", - "resolved": "git+ssh://git@github.com/holistis/agent-receipt-verify.git#3423a7871a983598a3a51481fadfe96c81048864", - "integrity": "sha512-zYkgjPurEcr7d4Ag+mewfL4s9Tme0jR8bdMRxxkG06P9EMu7VjhaY3N1pMU/x7YuvhVCb5r/HdvglMkOP2kYpA==", + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/agent-receipt-verify/-/agent-receipt-verify-0.2.9.tgz", + "integrity": "sha512-rYBL+kUy+OtHhusgNBfC1/U6IzBNhGUroN7VilA/Un/z3R7HsqZZ7sU+igyxhJcbQyF7GpDI0ZaGWPyFg9hjNA==", "license": "Apache-2.0", "bin": { "agent-receipt-verify": "bin/cli.mjs" @@ -5394,7 +5394,7 @@ "@x402/evm": "^2.28.0", "@x402/express": "^2.28.0", "@x402/extensions": "^2.28.0", - "agent-receipt-verify": "github:holistis/agent-receipt-verify#3423a7871a983598a3a51481fadfe96c81048864", + "agent-receipt-verify": "0.2.9", "capacity-attest": "^0.9.0", "cors": "^2.8.5", "endpoint-attest": "^0.1.0", @@ -5482,7 +5482,7 @@ }, "packages/x402-lint": { "name": "@alghanima/x402-lint", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT", "dependencies": { "@modelcontextprotocol/sdk": "^1.30.0", diff --git a/packages/self-check-server/README.md b/packages/self-check-server/README.md index ba59697..1cc5464 100644 --- a/packages/self-check-server/README.md +++ b/packages/self-check-server/README.md @@ -22,7 +22,7 @@ Both routes share `trust-attest-server`'s module-level attester identity by defa This reverses a rule written in `src/x402-badge.ts`, which never measures live so that nobody can use this server to probe other hosts from our address. The badge keeps that rule. The live route replaces "never" with limits, all in `src/x402-check.ts`: https and port 443 only, a public domain name (no IP literals), GET and POST only with a fixed `{}` body, at most two redirects that may only stay on the pasted host or its www sibling, a 64 KB response cap (8 KB for a DID document), at most six outbound requests and a 45 second deadline per measurement with the sockets aborted when it passes, at most eight checks busy at once, a two minute result cache, at most 12 live measurements per host and 200 in total per hour, and 8 requests per 10 minutes per IP on top. Any host other than the pasted one may be asked for exactly one thing, the fixed file `/.well-known/did.json` without a query, because the party being measured chooses which did:web document its offer names. Nothing is stored; the cache lives in memory, and the server logs no URL. -The library is pinned to a commit of agent-receipt-verify that passes the injected fetch on to its did:web key lookup. Before that fix the lookup, whose host the measured party chooses, used the global fetch and skipped every guard above (agent-receipt-verify#46); `x402-check.test.ts` fails if that ever comes back. +The library is agent-receipt-verify at exactly 0.2.9, the first published version that passes the injected fetch on to its did:web key lookup. Do not go below it. Before that fix the lookup, whose host the measured party chooses, used the global fetch and skipped every guard above (agent-receipt-verify#46); `x402-check.test.ts` fails if that ever comes back. Known limits, written down because an adversarial review (ours, not independent) found them and they are not closed by code: whoever controls many IP addresses can use up the hourly global budget, after which every visitor gets a 429 until it resets, and twelve checks of one host with different query strings lock that host's owner out for an hour. A host name that sends our DNS lookup to a name server that never answers keeps a thread of the shared pool busy; the eight-at-once cap keeps that bounded, and setting `UV_THREADPOOL_SIZE=16` in the service environment gives it room. Behind a proxy, set `HOST=127.0.0.1` so nobody can reach the port directly and send their own X-Forwarded-For (the production server also has a firewall that only opens 22, 80 and 443). diff --git a/packages/self-check-server/package.json b/packages/self-check-server/package.json index d52059c..61e6d3e 100644 --- a/packages/self-check-server/package.json +++ b/packages/self-check-server/package.json @@ -33,7 +33,7 @@ "@x402/evm": "^2.28.0", "@x402/express": "^2.28.0", "@x402/extensions": "^2.28.0", - "agent-receipt-verify": "github:holistis/agent-receipt-verify#3423a7871a983598a3a51481fadfe96c81048864", + "agent-receipt-verify": "0.2.9", "capacity-attest": "^0.9.0", "cors": "^2.8.5", "endpoint-attest": "^0.1.0",