fix(skills): allow absolute skill paths that resolve within trusted directories (#59824) - #60195
Closed
webtecnica wants to merge 1 commit into
Closed
webtecnica wants to merge 1 commit into
webtecnica wants to merge 1 commit into
Conversation
…irectories _skill_lookup_path_error() rejected ALL absolute paths, but cron jobs legitimately store absolute paths for skills outside ~/.hermes/skills/ (e.g. symlinked skill repos). Now allows absolute paths that resolve within HERMES_HOME/skills/ or profiles/*/skills/. Closes NousResearch#59824
Contributor
Author
|
@teknium1 P1 fix — cron jobs with absolute skill paths were silently failing (no Discord delivery). Now allows absolute paths that resolve within Hermes trusted directories. 14 lines, 89 existing tests pass. 🙏 |
Contributor
Author
|
@teknium1 Consolidated ping on this one — all 50 PRs from webtecnica are rebased on latest main, zero conflicts. This P2 fix (12 lines, vision fallback for text-only models) is among them. 🙏 |
Collaborator
|
Thanks for the focused report and security-preserving intent. This is an automated hermes-sweeper review; the cron-path behavior is already implemented on current
Closing as implemented on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
P1 — Silent failure in production. Cron jobs with absolute skill paths (e.g. symlinked trading-skills repos at
/home/hermes/agent-trading-skills/...) were silently rejected by_skill_lookup_path_error(), which blocked ALL absolute paths.The cron appeared healthy (
Last run: ok) but delivered degraded/empty responses because every tick's skill loads failed. The user saw "audit channel went silent."Fix
Changed
_skill_lookup_path_error()from a hard rejection of ALL absolute paths to a trusted-root validation:HERMES_HOME/skills/orHERMES_HOME/profiles/*/are allowed/etc/passwd,/tmp/...) are still rejected..traversal and Windows drive paths still blockedFiles Changed
tools/skills_tool.pyVerification
Closes #59824