Skip to content

fix(cron): skip security scan for user-created skill content#23470

Closed
algojogacor wants to merge 1 commit into
NousResearch:mainfrom
algojogacor:fix/cron-skill-false-positive
Closed

fix(cron): skip security scan for user-created skill content#23470
algojogacor wants to merge 1 commit into
NousResearch:mainfrom
algojogacor:fix/cron-skill-false-positive

Conversation

@algojogacor

Copy link
Copy Markdown

Summary

Cron jobs that load user-created skills fail with false-positive security blocks. Skills from ~/.hermes/skills/ commonly contain educational code examples (e.g., github-auth documenting curl with $GITHUB_TOKEN) that trigger the exfil_curl and read_secrets threat patterns.

Root Cause

_build_job_prompt assembles the user prompt + loaded skill content into one string, then calls _scan_assembled_cron_prompt (introduced by #3968) which scans the entire result. User-created skills with code snippets match threat regex patterns that were designed for malicious user input — not for trusted skill documentation.

Fix

Before scanning, check if all loaded skills reside under ~/.hermes/skills/ (the user's own skills directory). If yes, only scan the user-supplied prompt for threats — skill content is trusted. If any skill is from an external/plugin source, scan the full assembled prompt (preserving the #3968 protection).

Testing

  • Cron job with user-created skill containing curl examples: should pass ✅
  • Cron job with malicious external skill: still blocked ✅
  • Cron job without skills: unchanged behavior ✅

Related

Skills from ~/.hermes/skills/ are user-created and trusted.
They commonly contain educational code examples (e.g., github-auth
with curl $GITHUB_TOKEN) that trigger exfil_curl/read_secrets
false positives when loaded by cron jobs.

Fix: only scan the user-supplied prompt for threats when all
loaded skills are from the user's own skills directory.
External/plugin skill content continues to be scanned.

Closes the false-positive gap introduced by the #3968 fix
(_scan_assembled_cron_prompt) without reopening the original
injection vector.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cron Cron scheduler and job management type/security Security vulnerability or hardening and removed type/security Security vulnerability or hardening labels May 11, 2026
@algojogacor algojogacor closed this by deleting the head repository May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants