T01 · Skill Instruction Hijacking
- Location
scripts/policy_plugin.py:96- Finding
Global Agent Instruction and Tool-Execution Hijacking
- Content
View full analysis
⚡ **New in v3.0.0 — Enforce Governance Layer** — A priority-based governance system that makes agent behavior more stable and safe. Enforce rules sit above memory and cannot be ignored by the agent. ``` `scripts/enforce_loader.py:90-107`: ```python def format_directives(rules: list[dict]) -> str: if not rules: return "" lines = [ "══════════════════════════════════════════════", "YOU MUST — ENFORCE RULES (Layer 1 — Prompt Governance)", "══════════════════════════════════════════════", ] for r in rules: p = r.get("priority", "high").upper() rule = r.get("rule", "") pol = r.get("policy", {}) tool = pol.get("tool", "*") action = pol.get("action", "allow") reason = pol.get("reason", "") lines.append(f" [{p}] {rule}") lines.append(f" tool={tool} action={action}") if reason: lines.append(f" → {reason}") ``` `scripts/policy_plugin.py:96-130`: ```python def load_from_skills(self, skills_dir: str | Path | None = None) -> int: """Scan all installed skills for enforce: frontmatter and register policies.""" if yaml is None: return 0 if skills_dir is None: hermes_home = os.environ.get("HERMES_HOME", os.path.expanduser("~/.hermes")) skills_dir = Path(hermes_home) / "skills" skil ...[truncated 3886 chars]- Remediation
View remediation
