Skip to content

fix(curator): protect hub skills by frontmatter name - #20194

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-eb087d76
May 5, 2026
Merged

fix(curator): protect hub skills by frontmatter name#20194
teknium1 merged 2 commits into
mainfrom
hermes/hermes-eb087d76

Conversation

@teknium1

@teknium1 teknium1 commented May 5, 2026

Copy link
Copy Markdown
Contributor

Salvage of #19460 by @LeonSGP43 onto current main, plus a test follow-up.

Summary

_read_hub_installed_names() returned only hub slug keys (e.g. "getnote"). When a hub-installed skill's SKILL.md name: is non-ASCII (e.g. "Get笔记"), the slug-only set didn't protect it, so hermes curator archive "Get笔记" and other curator operations would treat the hub skill as agent-created and archive it.

Changes

Validation

  • scripts/run_tests.sh tests/tools/test_skill_usage.py → 40 passed
  • E2E with real imports + isolated HERMES_HOME:
    • is_agent_created("Get笔记") → False (was True)
    • is_agent_created("getnote") → False (unchanged)
    • archive_skill("Get笔记") → rejected with "bundled or hub-installed; never archive" (was archived)
    • list_agent_created_skill_names() → excludes hub, includes agent-authored
    • Path traversal guard: install_path: "../../../etc" silently skipped, no crash

Closes #19641, #19293.

Credits: @LeonSGP43 for the fix.

LeonSGP43 and others added 2 commits May 5, 2026 04:53
The cherry-picked test predates #19618/#19621 which rewrote
list_agent_created_skill_names() to require an explicit
created_by: 'agent' provenance marker. Without mark_agent_created(),
my-skill is excluded from the list and the positive assertion fails.
@teknium1
teknium1 merged commit 4d0f59f into main May 5, 2026
7 checks passed
@teknium1
teknium1 deleted the hermes/hermes-eb087d76 branch May 5, 2026 11:55
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists tool/skills Skills system (list, view, manage) labels May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Medium — degraded but workaround exists tool/skills Skills system (list, view, manage) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

is_agent_created() still compares SKILL.md name against ASCII hub-slug lock keys

3 participants