Back to skill

Security audit

hooks-eval

Security checks for vulnerabilities and agentic risk

Overview

This is a markdown-only hook evaluation reference whose scanner alerts appear to be contextual examples, not unsafe behavior.

Install this as a hook-audit reference if you want documentation and rubrics for reviewing hooks. Be aware that broad triggers may make it appear in general security or performance conversations, so invoke it deliberately for hook-related audits if your environment supports manual skill selection.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (5)

Instruction Override

High
Category
Prompt Injection
Confidence
90% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · modules/evaluation-criteria.md (reported line 252)May include surrounding context.

yaml
hooks_eval:
  # Override security thresholds
  security_thresholds:
    critical_score: 80
    high_score: 70

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · modules/sdk-hook-types.md (reported line 160)May include surrounding context.

md
"""Block dangerous bash commands."""
    if input_data['tool_name'] == 'Bash':
        command = input_data['tool_input'].get('command', '')
        if 'rm -rf /' in command:
            return {
                'hookSpecificOutput': {
                    'hookEventName': 'PreToolUse',

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · modules/sdk-hook-types.md (reported line 160)May include surrounding context.

md
"""Block dangerous bash commands."""
    if input_data['tool_name'] == 'Bash':
        command = input_data['tool_input'].get('command', '')
        if 'rm -rf /' in command:
            return {
                'hookSpecificOutput': {
                    'hookEventName': 'PreToolUse',

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list includes broad, high-frequency terms like "security", "performance", and "evaluation", which can cause the skill to activate in many unrelated contexts. In an audit-oriented skill, overbroad activation increases the chance that its guidance is injected into conversations where it was not explicitly requested, expanding the attack surface for prompt/skill interference and unintended behavior.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · modules/sdk-hook-types.md (reported line 93)May include surrounding context.

md
| 2.1.69 | `TeammateIdle`/`TaskCompleted` support `{"continue": false}` for graceful shutdown |
| 2.1.69 | Plugin WorktreeCreate/WorktreeRemove hooks fire correctly (were silently ignored) |
| 2.1.71 | New tools: `CronCreate`, `CronList`, `CronDelete` appear in PreToolUse/PostToolUse |
| 2.1.72 | `ExitWorktree` tool added; `lsof`/`pgrep`/`tput`/`ss`/`fd`/`fdfind` auto-approved |
| 2.1.72 | Skill hook double-fire fixed; `transcript_path` correct for resumed sessions |
| 2.1.72 | Failed Read/WebFetch/Glob no longer cancel sibling tool calls (only Bash cascades) |
| 2.1.73 | SessionStart no longer double-fires on `--resume`/`--continue` |

Static analysis

No suspicious patterns detected.