#23785: Skills: add signature verification and quarantine invalid signatures
agents
size: M
trusted-contributor
Cluster:
Skill Security Enhancements
## Summary
- add phase-1 local skill signature verification (`skill.sig`) for Ed25519 signatures over a canonical file manifest
- mark unsigned skills as unsigned (degraded) and quarantine invalid-signature skills
- prevent quarantined skills from being included in the eligible skills snapshot/prompt
- add tests for unsigned, valid signature, tamper detection, and quarantine behavior
## Why
This adds immediate supply-chain hardening: signed skills verify locally, tampered skills are automatically disabled, and unsigned skills remain distinguishable for policy tightening in follow-up PRs.
## Tests
- `pnpm vitest run src/agents/skills/signature.test.ts src/agents/skills.buildworkspaceskillsnapshot.test.ts src/agents/skills.test.ts`
- `pnpm lint`
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Added Ed25519 signature verification for skills to improve supply-chain security. Skills without `skill.sig` are marked as unsigned, skills with invalid signatures are quarantined and excluded from the prompt, and signed skills verify their manifest locally.
**Key changes:**
- Implemented signature verification with Ed25519 in `signature.ts`
- Quarantine skills with invalid signatures (excluded from `shouldIncludeSkill`)
- Added `signature` field to `SkillEntry` type to track verification status
- Created comprehensive tests covering unsigned, valid, and tampered scenarios
**Implementation notes:**
- Manifest generation uses SHA-256 hashes of all files except `skill.sig` itself
- File paths in manifest are normalized to forward slashes for cross-platform consistency
- Verification uses Node.js `crypto` module with proper error handling
- Publisher and keyId metadata are optional fields preserved from signature envelope
<h3>Confidence Score: 4/5</h3>
- This PR is safe to merge with minor observations
- The implementation is well-designed with proper cryptographic verification, comprehensive tests, and clear quarantine logic. The code follows repository conventions and includes appropriate error handling. Score reflects solid implementation with a few areas worth noting for completeness.
- No files require special attention
<sub>Last reviewed commit: 4a1f195</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#23802: Skills: add trusted publisher allowlist policy
by bmendonca3 · 2026-02-22
83.2%
#23795: Skills: enforce managed skills.lock integrity with allowUnlocked es...
by bmendonca3 · 2026-02-22
76.3%
#8075: fix(skills): add --ignore-scripts to all package managers
by yubrew · 2026-02-03
75.7%
#23768: Skills: pin and verify workspace skill content hashes
by bmendonca3 · 2026-02-22
75.3%
#22306: Warn on malformed skill parsing failures in load path
by AIflow-Labs · 2026-02-21
75.2%
#23754: Skills: enforce capability manifest requirements
by bmendonca3 · 2026-02-22
75.0%
#23372: Skills: quarantine ClawHub installs until explicitly enabled
by bmendonca3 · 2026-02-22
74.3%
#17502: feat: normalize skill scanner reason codes and trust messaging
by ArthurzKV · 2026-02-15
74.0%
#8150: fix(skills): block dangerous environment variables from skill config
by yubrew · 2026-02-03
72.8%
#10705: security: extend skill scanner to detect threats in markdown skill ...
by Alex-Alaniz · 2026-02-06
72.4%