#23768: Skills: pin and verify workspace skill content hashes
agents
size: M
trusted-contributor
Cluster:
Skill Security Enhancements
## Summary
- add deterministic skill-folder fingerprinting for workspace skills and persist a baseline lock at `.clawhub/openclaw-integrity.json`
- quarantine workspace skills when content hash drifts from the pinned fingerprint
- support explicit re-enable by setting `skills.entries.<skill>.config.integrityFingerprint` to the current fingerprint
## Testing
- pnpm lint
- pnpm vitest run --config vitest.unit.config.ts src/agents/skills.buildworkspaceskillsnapshot.test.ts src/agents/skills.test.ts
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Adds deterministic skill-folder fingerprinting for workspace skills with SHA-256 content hashing. Skills are pinned to `.clawhub/openclaw-integrity.json` on first load, and quarantined if their content changes unless explicitly re-approved via config.
**Key changes:**
- New `integrity.ts` module with `computeSkillFingerprint()` and `resolveWorkspaceSkillIntegrity()` functions
- Workspace skills are automatically fingerprinted and tracked in a lock file
- Skills with content drift are excluded from loading unless `skills.entries.<skill>.config.integrityFingerprint` matches the current fingerprint
- Comprehensive test coverage for the quarantine and re-enable workflow
- Clean integration with existing skill loading pipeline
<h3>Confidence Score: 5/5</h3>
- Safe to merge with no blockers
- Clean implementation with proper error handling, comprehensive test coverage, and well-scoped changes that integrate cleanly into existing infrastructure
- No files require special attention
<sub>Last reviewed commit: ccf219c</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#23795: Skills: enforce managed skills.lock integrity with allowUnlocked es...
by bmendonca3 · 2026-02-22
85.6%
#23372: Skills: quarantine ClawHub installs until explicitly enabled
by bmendonca3 · 2026-02-22
81.4%
#23754: Skills: enforce capability manifest requirements
by bmendonca3 · 2026-02-22
76.6%
#23785: Skills: add signature verification and quarantine invalid signatures
by bmendonca3 · 2026-02-22
75.3%
#22306: Warn on malformed skill parsing failures in load path
by AIflow-Labs · 2026-02-21
74.8%
#10016: fix: prevent FD exhaustion from skill watcher scanning artifact trees
by oldeucryptoboi · 2026-02-06
73.3%
#14023: fix: filter skills watcher to relevant file types to prevent FD exh...
by funmerlin · 2026-02-11
73.2%
#10579: feat(skills): auto-discover project-scoped skills from .claude/skil...
by mycarrysun-lowerbot · 2026-02-06
72.5%
#16654: fix: refresh skills snapshot when managed skills change
by PhineasFleabottom · 2026-02-15
72.1%
#19664: fix(skills): log skill YAML parsing diagnostics with skill name
by orchidsun · 2026-02-18
72.1%