Back to skills
SKILL.md
A2a Contract Reviewer
ASecurityReview A2A protocol endpoint changes for contract compliance — HTTP signature verification, DID document validity, AgentFacts schema conformance
- 3 stars
- 0 votes
- 0 copies
- 0 views
- Added December 6, 2026
Works with
Security analysis
100/100npx -y skills add hyhmrright/Confer --skill a2a-contract-reviewer --agent claude-codeAre you the author of A2a Contract Reviewer?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hyhmrright-a2a-contract-reviewer)---
name: a2a-contract-reviewer
description: Review A2A protocol endpoint changes for contract compliance — HTTP signature verification, DID document validity, AgentFacts schema conformance
---
审查 A2A 端点变更是否符合项目合约(`packages/gateway/src/routes/a2a.ts`、`packages/identity/`、`packages/gateway/src/middleware/auth.ts`):
**1. HTTP 签名验证**
- 确认 `auth.ts` 中的签名验证中间件未被绕过或条件跳过
- A2A 路由必须经过签名验证,不得有 `skipAuth`、`bypass` 等逃逸路径
- 检查新增端点是否挂载了 `verifySignature` 中间件
**2. DID 合规**
- DID 文档必须使用 `did` 库构造,禁止手工拼接 JSON
- DID 必须符合 W3C DID v1.0 格式(`did:web:` 前缀、合法的 `verificationMethod`)
- `/.well-known/did.json` 响应内容变更需要重点检查
**3. AgentFacts 合规**
- AgentFacts 字段必须通过 NANDA schema 校验
- 检查是否有未经 Zod 校验的 AgentFacts 数据直接写入数据库或对外暴露
**4. 安全边界**
- 不得记录完整 A2A 请求体(PII 风险)——日志只能记录元数据
- 不得在响应中泄露内部错误栈或 LLM API key
- 不得使用 inline SQL(必须通过 Drizzle query builder)
**输出格式**:
- ✅ COMPLIANT — 所有合约均满足
- ⚠️ REVIEW NEEDED — 列出具体文件:行号和风险描述
- ❌ CONTRACT VIOLATION — 存在明确违规,附修复建议
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.