Repository navigation
contrib: x402 top-level JSON shape vectors and agent mint/revoke hardening (#668, #762, #763, #765) - #784
Merged
davedumto merged 1 commit intoOct 23, 2026
Conversation
…ening (Vellar-Wallet#668, Vellar-Wallet#762, Vellar-Wallet#763, Vellar-Wallet#765) - Vellar-Wallet#668: Add untrusted vectors covering valid JSON of wrong top-level type (bare array, string, number, boolean, null) and structural guard before model-facing output - Vellar-Wallet#762: Reject duplicate policy contract IDs in agent grants while allowing cross-grant reuse - Vellar-Wallet#763: Reject past expiresAt (Date and unix seconds) client-side before passkey prompt or RPC call - Vellar-Wallet#765: Ensure agents-facade revoke is idempotent against already-revoked keys without unhandled errors Closes Vellar-Wallet#668 Closes Vellar-Wallet#762 Closes Vellar-Wallet#763 Closes Vellar-Wallet#765
|
@k-deejah is attempting to deploy a commit to the david's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
All changes are scoped to
contrib/issues-668-762-763-765/per CONTRIBUTING.md. This PR provides reference implementations, adversarial conformance vectors, unit tests, documentation, and a maintainer integration patch for issues #668, #762, #763, and #765.1. #668 - x402 untrusted vectors for valid JSON of wrong top-level type
x402-top-level-vectors.tscovering valid JSON of wrong top-level types (bare JSON array, bare string, bare number, bare boolean, null).assertPaymentRequiredShapeinx402-top-level-guard.tsas a distinct structural fence that runs immediately after JSON parsing and before field-level validation.TypeError) and blocks malformed payloads before any field can reach model-facing output (renderUntrusted/sanitizeMetadata).x402-top-level-guard.test.ts.2. #762 - Mint rejecting grant with duplicate policy contract IDs
assertNoDuplicatePoliciesthat within a single grant, no policy contract ID appears twice.InvalidAgentInputError("grant for [token] has duplicate policy: [policy]")consistently with the existing empty-array rejection.3. #763 - Mint rejecting
expiresAtin the pastexpiresAt(Date or unix seconds) client-side invalidateExpiresAt.InvalidAgentInputError("expiresAt must be in the future")before any passkey prompt or RPC call.4. #765 - Revoke idempotency against an already-revoked key
revokecalled twice in succession on the samepublicKeyagainst a mockedAgentKeyRuntimeeither succeeds as an idempotent no-op or reports a clear, namedAgentKeyNotFoundError, never throwing an unhandled or misleading error.revokeWithRetry).Core Integration
A unified patch
contrib/issues-668-762-763-765/core-integration.patchis included and verified to apply cleanly againstdevfor maintainers to lift intosrc/.Closes #668
Closes #762
Closes #763
Closes #765