hermes - ✅(Solved) Fix feat(security): Default skills.guard_agent_created to true [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#16461Fetched 2026-04-28 06:53:10
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×1referenced ×1

The skills.guard_agent_created config option controls whether the Skills Guard scanner (tools/skills_guard.py) scans agent-created skills for security concerns (prompt injection patterns, data exfiltration, destructive commands, etc.).

Currently this defaults to false (hermes_cli/config.py:837), meaning skills autonomously created by the agent's learning loop are saved to ~/.hermes/skills/ without any security scan.

Root Cause

The skills.guard_agent_created config option controls whether the Skills Guard scanner (tools/skills_guard.py) scans agent-created skills for security concerns (prompt injection patterns, data exfiltration, destructive commands, etc.).

Currently this defaults to false (hermes_cli/config.py:837), meaning skills autonomously created by the agent's learning loop are saved to ~/.hermes/skills/ without any security scan.

Fix Action

Fixed

PR fix notes

PR #16593: feat(security): default skills.guard_agent_created to true

Description (problem / solution / changelog)

Closes #16461


Problem

The skills.guard_agent_created config option defaults to false, meaning skills autonomously created by the agent's learning loop are saved to ~/.hermes/skills/ without any security scan. This is a defense-in-depth gap — agent-generated content should be treated as untrusted by default, since the agent may have been influenced by prompt injection during the session that created the skill.

Changes

  • File: hermes_cli/config.py (line 851)
  • Changed "guard_agent_created": False to "guard_agent_created": True
  • No other files modified — this is a single-line default value change

Impact

  • Agent-created skills now pass through skills_guard.py security scanner by default (checks for prompt injection, data exfiltration, destructive commands, obfuscation)
  • Existing users who set guard_agent_created: false in config.yaml see no change — their override is respected
  • New installs get the safer default immediately
  • No breaking changes — existing skills are not re-scanned

Changed files

  • hermes_cli/config.py (modified, +1/-1)

Code Example

# hermes_cli/config.py:837
"guard_agent_created": False,

---

"guard_agent_created": True,
RAW_BUFFERClick to expand / collapse

Summary

The skills.guard_agent_created config option controls whether the Skills Guard scanner (tools/skills_guard.py) scans agent-created skills for security concerns (prompt injection patterns, data exfiltration, destructive commands, etc.).

Currently this defaults to false (hermes_cli/config.py:837), meaning skills autonomously created by the agent's learning loop are saved to ~/.hermes/skills/ without any security scan.

Current Behavior

# hermes_cli/config.py:837
"guard_agent_created": False,

When the agent creates a new skill after completing a complex task:

  1. Skill content is written to ~/.hermes/skills/<name>/SKILL.md
  2. No skills_guard.scan_skill() is invoked
  3. The skill is immediately loadable via /<skill-name> slash command

Proposed Change

Change the default to true:

"guard_agent_created": True,

When enabled, agent-created skills pass through skills_guard.py before being saved. The guard checks for patterns like:

  • Prompt injection (role hijack, system prompt override)
  • Data exfiltration (curl with env vars, base64 encoding pipelines)
  • Destructive commands (rm, mkfs, shutdown patterns)
  • Obfuscation (base64+exec, hex encoding)

Skills that trigger high-severity findings would require user review before being loadable.

Rationale

  • Defense in depth: The learning loop is a powerful feature, but agent-generated content should be treated as untrusted — the agent may have been influenced by prompt injection during the session that created the skill.
  • Low impact: The scanner is already implemented and tested. This change only flips the default from opt-in to opt-out.
  • User override: Users who find the scanner too conservative can set skills.guard_agent_created: false in config.yaml.

References

  • tools/skills_guard.py:48-50 — agent-created source configuration
  • hermes_cli/config.py:837 — default value
  • Commit ce089169 — original implementation (explicitly chose default off for backward compat)

Impact

  • No breaking changes — existing skills are not re-scanned
  • Users who already set guard_agent_created: true see no change
  • New installs get the safer default

extent analysis

TL;DR

To enhance security, change the default value of guard_agent_created to true in hermes_cli/config.py to enable security scans for agent-created skills.

Guidance

  • Review the current configuration in hermes_cli/config.py:837 and consider updating the guard_agent_created option to true for enhanced security.
  • Understand that enabling this option will invoke skills_guard.scan_skill() on agent-created skills, checking for security concerns like prompt injection and data exfiltration.
  • If the scanner is too conservative, users can override the setting by configuring skills.guard_agent_created: false in their config.yaml.
  • Refer to tools/skills_guard.py:48-50 for the agent-created source configuration and hermes_cli/config.py:837 for the default value.

Example

# hermes_cli/config.py:837
"guard_agent_created": True,

Notes

This change does not introduce breaking changes and only affects new installs or users who haven't explicitly set guard_agent_created. Existing skills are not re-scanned.

Recommendation

Apply the workaround by changing the default guard_agent_created value to true to enhance security for agent-created skills. This is a low-impact change that utilizes an already implemented and tested scanner.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING