feat: add skill signature verification#643
feat: add skill signature verification#643elliotllliu wants to merge 1 commit intovercel-labs:mainfrom
Conversation
Implement the signature verification RFC (vercel-labs#617): - New `src/signature.ts` module with: - ed25519-sha256 signature parsing from SKILL.md frontmatter - Content hash computation (SHA-256 of content below frontmatter) - Public key fetching from `.well-known/skills-pubkey` endpoints - Local key caching with configurable TTL (1 hour default) - Key rotation support via `kid` field - Full verification pipeline with detailed result types - New `skills verify` CLI command: - Verify all installed skills: `npx skills verify` - Verify specific skills: `npx skills verify <name>` - Shows verified/unsigned/failed counts - 13 new tests covering parsing, hashing, and formatting Implements vercel-labs#617
|
Thanks for implementing #617 so quickly, @elliotllliu ! 🎉 Great to see the design translated into working code. Skimmed through the PR and the implementation looks solid: ✅ Federated trust model with A few thoughts for future iterations (not blocking this PR):
Happy to help review or iterate. Let's see what the maintainers think! |
|
Thanks for the thorough review @fanqi1909! Glad the implementation aligns with your RFC vision. The federated model is designed to be extensible — once this lands, adding new registry endpoints should be straightforward. Looking forward to seeing this move forward! |
Summary
Implements #617
Adds optional signature verification for installed skills, protecting users from tampered or malicious SKILL.md content.
New Command
Architecture
Signature Block (in SKILL.md frontmatter)
Verification Pipeline
content_hashhttps://{signer}/.well-known/skills-pubkeyKey Management
.well-known/skills-pubkeyendpoint (federated trust model)~/.agents/.key-cache/)kidfield matchingDesign Decisions
skills.sh,skills.mycompany.io, etc.)Changes
src/signature.ts— Core verification module (parsing, hashing, key management, verification)src/cli.ts—skills verifycommand with filtering and result displaytests/signature.test.ts— 13 tests covering parsing, hashing, and formattingTesting
pnpm build✅pnpm test✅ (388/388 tests pass, +13 new)