Repository navigation
Conversation
|
@msaleme is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks for your contribution @msaleme! See here for instructions: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification The team will not review this PR before ALL commits have been verified and it will be closed after 1 week of inactivity. Unverified commits:
|
…02-foundation#2178) 52 dependency-free x402 core conformance vectors (a normative requirement + the request that exercises it) with a JSON schema and a stdlib runner that replays them against a live implementation. Delivers the open-source conformance harness proposed in x402-foundation#2178. Vectors are generated from the Apache-2.0 agent-security-harness so they stay faithful to a maintained suite (provenance in each vector's source field). Building them against a reference x402 hardening implementation surfaced three fail-open defects (credential-release flag-trust, scope fail-open, SSRF 172.16/12 range gap) — all disclosed and guarded. Signed-off-by: Michael K. Saleme <mikesaleme@gmail.com>
…rness's own reference verifier (not an external implementation) Signed-off-by: Michael K. Saleme <mikesaleme@gmail.com>
68e959d to
5f7ead7
Compare
|
Verified |
|
Checking in on this one. Current state from my side:
No reviews yet, so I wanted to confirm the PR is not waiting on something from me. Happy to rebase, split it into smaller pieces, or narrow the scope if that would make it easier to review. |
|
@CarsonRoscoe @phdargen apologies for the direct tag. I'm trying to get this routed rather than I found a possible routing gap: Could one of you point me to the appropriate reviewer or owning team for this path? If a CODEOWNERS One other question: does the failing Vercel check block merge? It reports If PR size is the obstacle, I can split the runner, schema, README, and a representative vector set |
shibutatsu
left a comment
There was a problem hiding this comment.
Thanks for putting this together. I checked the current PR head and ran the offline validator successfully. The corpus is useful staging material, but I see two issues that need to be separated before it can arbitrate x402 core conformance.
First, the live runner does not execute most of the vector semantics. It only consumes path, headers, and body; fields such as variants, n_requests, concurrent_requests, or attacker inputs are ignored. For example, X4-002, X4-011, and X4-043 all reduce to one ordinary GET request, and response bodies are not recorded even for disclosure checks. The report therefore cannot support the stated requirement for those vectors. I would either encode concrete executable request cases plus observation/assertion rules, or mark these entries as metadata-only and exclude them from --url replay until that exists.
Second, the normative source needs to be explicit per vector. Requirements such as OATR presence, a fixed manifest TTL, session-token controls, or application rate limits do not appear to be x402 core requirements. Marking them MUST under an x402-core directory can make an otherwise conforming implementation look non-conformant. A pinned x402 spec version and exact section or requirement reference should be required for core vectors; harness-specific hardening checks can live in a separately named optional security profile.
Once those boundaries are explicit, the dependency-free format and reproducible data layout could be a solid base for shared vectors.
|
You are right on both points. I checked the full corpus rather than only the examples. At the current head,
You are also right on normativity. The current schema has no required pinned x402 specification version or exact section reference. The I will narrow the PR accordingly:
This reduces the scope of the PR, but makes its conformance claims defensible. Thank you for the careful review. |
Summary
An open, dependency-free x402 conformance-vector set — delivering the open-source conformance harness proposed in #2178.
A protocol with governance but no conformance vectors is a promise, not a guarantee: two implementations can each claim x402 compliance and still diverge on the same request. This set lets an implementer prove conformance.
What's here (
conformance/)vectors/x402-core/) — each a normative x402 requirement plus the request that exercises it (payment-challenge structure, recipient/amount integrity, session security, spending limits, facilitator trust, info disclosure, cross-chain confusion, replay/double-spend, authorization bypass, settlement finality, protocol abuse).run_conformance.py— stdlib-only runner (no dependencies):--validate(offline schema check) and--url(replay each vector against your endpoint and report the response against each requirement).schema.json— the vector schema.Design
Vectors are data, not a reference implementation — you test your x402 code against them. They're generated from the Apache-2.0
agent-security-harnessso they stay faithful to a maintained suite (provenance in each vector'ssource).Roadmap (in the README): optional machine-checkable
assertblocks for auto-judging deterministic vectors, and an extension conformance set alongside the relevant extension spec.Why it matters
While building the harness these vectors come from, adversarial review of its own reference verifier caught three fail-open defects in that harness code (a credential-release check trusting a self-asserted flag, a scope check that failed open on an omitted field, and an SSRF blocklist that missed most of the RFC1918
172.16/12range) — each fixed and guarded by a negative test before release. Fail-open is easy to ship even in code written to catch it; that is exactly why machine-checkable conformance vectors are worth having.Apache-2.0, matching this repo. Happy to align vectors to your preferred layout/schema.