ap2-payment-mandate — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited ap2-payment-mandate (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
中文摘要:生成并校验 AP2 三类 mandate(Intent/Cart/Payment,包成 Ed25519 签名的可验证数字 凭证 VDC),并把支付通过payment.instruments/payment_handlers挂到 UCP checkout session。 需要给商家"用户已授权 agent 发起这笔扣款"的密码学证明(尤其在 complete 步骤)时用。
ready_for_complete and you're about to POST …/complete.signer_did)| Mandate | Real key fields | Created |
|---|---|---|
| IntentMandate | agent_did, max_amount, purpose, expires_at, allowed_merchants, allowed_categories (+ "prompt playback" NLP summary, TTL) | Before a cart exists; enables human-not-present delegated buys within limits |
| CartMandate | parent_id, merchant_did, line_items, total_amount, payment_method | When the cart/total is final; user-present authorization (device-signed) |
| PaymentMandate | hashed Cart/Intent ref, method, amount, presence signal (human-present / not-present), agent_id | At complete, just before charging; shared with network/issuer to build trust |
All three are wrapped in a Verifiable Digital Credential (VDC): an Ed25519 signature over a canonical JSON serialization; verify by resolving signer_did → public key.
"payment": {
"instruments": [
{
"id": "pi_1",
"handler_id": "google_pay", // matches a key in ucp.payment_handlers (from profile)
"type": "card",
"selected": true,
"display": { "brand": "visa", "last4": "4242" },
"credential": { "type": "network_token", "token": "***" },
"billing_address": { "address_country": "DE", "postal_code": "10115" }
}
]
}The merchant declares accepted handlers in ucp.payment_handlers (UCP profile); the AP2 PaymentMandate travels alongside to prove consent. UCP calls this Payment Token Exchange.
max_amount, allowed_merchants,allowed_categories, expires_at up front so the agent may buy within bounds.
line_items + total_amount+ merchant_did, parent_id → user signs (device/passkey). Don't fabricate consent.
method + amount (== session total) +presence signal + agent_id; sign as a VDC.
payment.instruments (handler_id mustmatch a declared payment_handler).
payment + signals + Idempotency-Key.The merchant/PSP verifies the VDC signature and that amount == session total.
signer_did, verify Ed25519 over canonical bytes, check amountmatch, merchant match, non-expiry, single-use.
Never reuse a mandate at a new price. 改价必须重签。
expires_at / TTL) → regenerate.expires_at + Ed25519 signature + UCP Idempotency-Key defeat it.Sessioncs_01H…isready_for_complete,total28322 EUR, Google Pay.
line_items + total_amount:28322 + merchant_did, user signs on device.method:card + amount:28322 + presence:human-present+ agent_id, wrapped as Ed25519 VDC.
payment.instruments[0] handler_id:"google_pay", credential.token:***.POST …/complete → PSP verifies VDC + amount==28322 → charge authorized → order returned.ucp-checkout-session~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.