fix(skills-guard): let agent-created skills bypass dangerous-verdict confirmation#14538
Merged
Conversation
…firmation The security scanner is meant to protect against hostile external skills pulled from GitHub via hermes skills install — trusted/community policies block or ask on dangerous verdicts accordingly. But agent-created skills (from skill_manage) run in the same process as the agent that wrote them. The agent can already execute the same code paths via terminal() with no gate, so the ask-on-dangerous policy adds friction without meaningful security. Concrete trigger: an agent writing a PR-review skill that describes cache-busting or persistence semantics in prose gets blocked because those words appear in the patterns list. The skill isn't actually doing anything dangerous — it's just documenting what reviewers should watch for in other PRs. Change: agent-created dangerous verdict maps to 'allow' instead of 'ask'. External hub installs (trusted/community) keep their stricter policies intact. Tests updated: renamed test_dangerous_agent_created_asks → test_dangerous_agent_created_allowed; renamed force-override test and updated assertion since force is now a no-op for agent-created (the allow branch returns first).
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
Agent-authored skills (via skill_manage) no longer trigger the dangerous-verdict confirmation gate. The gate was meant for external skills pulled from GitHub via
hermes skills install, where trust-level + verdict policies genuinely protect users. Agent-created skills run in the same process as the agent that wrote them — the agent could already execute the same code viaterminal(), so the gate adds friction without meaningful security.Root cause
INSTALL_POLICYintools/skills_guard.pymappedagent-created+dangerous→ask, whichtools/skill_manager_tool.py::_security_scan_skilltreated as a block (returning an error string to the agent).Concrete trigger
While writing a PR-review skill that described cache-busting and persistence semantics in prose, the scanner matched those words against its pattern list and blocked
skill_manage(action='create'). The skill wasn't doing anything dangerous — it just documented what reviewers should watch for in OTHER code.Changes
tools/skills_guard.py:agent-createddangerous verdict now maps toallow(with explanatory comment)tests/tools/test_skills_guard.py: renamedtest_dangerous_agent_created_asks→test_dangerous_agent_created_allowed; updatedtest_force_overrides_dangerous_for_agent_created→test_force_noop_for_agent_created_dangerous(force is now moot for agent-created since allow wins)What still gets blocked
communitysource +caution/dangerousverdicts → blocktrustedsource +dangerousverdict → blockValidation
tests/tools/test_skills_guard.py— 55/55 passingskill_manage(action='create')now succeeds on a skill withpersistence/cache-busting/ risky keywords in prose