aiskillstore/marketplace / skills/0xdarkmatter/claude-code-hooks
claude-code-hooks
FlaggedClaude Code hook system for pre/post tool execution. Triggers on: hooks, PreToolUse, PostToolUse, hook script, tool validation, audit logging.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.9 KB |
| references/configuration.md | markdown | 4.4 KB |
| references/hook-events.md | markdown | 4.4 KB |
| references/security-patterns.md | markdown | 5.1 KB |
| skill-report.json | config | 105.8 KB |
skill-report.json
View on GitHub{
"schema_version": "2.0",
"meta": {
"generated_at": "2026-07-09T01:06:11.770Z",
"slug": "0xdarkmatter-claude-code-hooks",
"source_url": "https://github.com/0xDarkMatter/claude-mods/tree/main/skills/claude-code-hooks",
"source_ref": "main",
"model": "claude",
"analysis_version": "3.0.0",
"source_type": "community",
"content_hash": "597edd14dcbf4712bcca90e77f44034974009a4f7958df43abfffb21e922f832",
"tree_hash": "5d0be114fa516e3ecde417603ec2a9801f4efe4493932782922b51f7bd36506d",
"provenance": {
"model_requested": "claude-sonnet-4.6",
"model_effective": "claude:claude-sonnet-4.6",
"fallback_chain": [
{
"agent": "claude",
"model": "claude-sonnet-4.6",
"outcome": "success"
}
],
"analysis_version": "3.0.0"
}
},
"skill": {
"name": "claude-code-hooks",
"description": "Learn how to configure Claude Code hooks for validation, audit logging, approvals, and session automation.",
"summary": "Configure Claude Code hooks to run scripts before and after tool events.",
"icon": "📦",
"version": "1.0.0",
"author": "0xDarkMatter",
"license": "MIT",
"tags": [
"claude-code",
"hooks",
"automation",
"audit-logging",
"tool-validation"
],
"supported_tools": [
"claude",
"codex",
"claude-code"
],
"risk_factors": [
"external_commands",
"filesystem",
"env_access",
"network"
],
"category": "devops"
},
"security_audit": {
"risk_level": "medium",
"is_blocked": false,
"safe_to_publish": true,
"analysis_status": "ok",
"summary": "Most static findings are false positives from Markdown examples that document Claude Code hook configuration, shell snippets, and safety deny-lists. The main confirmed issue is that two audit logging examples persist full or raw tool input, which can expose secrets or sensitive project data in logs.",
"remediation": [
{
"issue": "Audit examples log full hook input or raw tool_input fields.",
"suggestion": "Replace these examples with allow-listed fields and redact secrets, file contents, prompt text, and command arguments before writing logs.",
"severity": "medium"
},
{
"issue": "Secret-loading examples may normalize broad environment access in hooks.",
"suggestion": "Add a warning to load only required variables and never echo, log, or forward environment values from hook scripts.",
"severity": "low"
},
{
"issue": "Examples rely on user-authored shell scripts for enforcement.",
"suggestion": "Emphasize quoting, JSON validation, timeouts, and project-scoped paths in every copyable hook template.",
"severity": "low"
}
],
"risk_factor_evidence": [
{
"factor": "external_commands",
"evidence": [
{
"file": "references/configuration.md",
"line_start": 145,
"line_end": 145
},
{
"file": "references/configuration.md",
"line_start": 146,
"line_end": 146
},
{
"file": "references/configuration.md",
"line_start": 144,
"line_end": 144
},
{
"file": "references/configuration.md",
"line_start": 164,
"line_end": 164
},
{
"file": "references/hook-events.md",
"line_start": 36,
"line_end": 36
},
{
"file": "references/hook-events.md",
"line_start": 37,
"line_end": 37
},
{
"file": "references/hook-events.md",
"line_start": 75,
"line_end": 75
},
{
"file": "references/hook-events.md",
"line_start": 77,
"line_end": 77
},
{
"file": "references/hook-events.md",
"line_start": 78,
"line_end": 78
},
{
"file": "references/hook-events.md",
"line_start": 80,
"line_end": 80
},
{
"file": "references/hook-events.md",
"line_start": 214,
"line_end": 214
},
{
"file": "references/hook-events.md",
"line_start": 35,
"line_end": 35
},
{
"file": "references/hook-events.md",
"line_start": 74,
"line_end": 74
},
{
"file": "references/hook-events.md",
"line_start": 211,
"line_end": 211
},
{
"file": "references/security-patterns.md",
"line_start": 13,
"line_end": 13
},
{
"file": "references/security-patterns.md",
"line_start": 21,
"line_end": 21
},
{
"file": "references/security-patterns.md",
"line_start": 45,
"line_end": 45
},
{
"file": "references/security-patterns.md",
"line_start": 46,
"line_end": 46
},
{
"file": "references/security-patterns.md",
"line_start": 55,
"line_end": 55
},
{
"file": "references/security-patterns.md",
"line_start": 66,
"line_end": 66
},
{
"file": "references/security-patterns.md",
"line_start": 67,
"line_end": 67
},
{
"file": "references/security-patterns.md",
"line_start": 93,
"line_end": 93
},
{
"file": "references/security-patterns.md",
"line_start": 99,
"line_end": 99
},
{
"file": "references/security-patterns.md",
"line_start": 100,
"line_end": 100
},
{
"file": "references/security-patterns.md",
"line_start": 127,
"line_end": 127
},
{
"file": "references/security-patterns.md",
"line_start": 128,
"line_end": 128
},
{
"file": "references/security-patterns.md",
"line_start": 136,
"line_end": 136
},
{
"file": "references/security-patterns.md",
"line_start": 186,
"line_end": 186
},
{
"file": "references/security-patterns.md",
"line_start": 209,
"line_end": 209
},
{
"file": "references/security-patterns.md",
"line_start": 213,
"line_end": 213
},
{
"file": "references/security-patterns.md",
"line_start": 214,
"line_end": 214
},
{
"file": "references/security-patterns.md",
"line_start": 215,
"line_end": 215
},
{
"file": "references/security-patterns.md",
"line_start": 220,
"line_end": 220
},
{
"file": "references/security-patterns.md",
"line_start": 257,
"line_end": 257
},
{
"file": "references/security-patterns.md",
"line_start": 10,
"line_end": 10
},
{
"file": "references/security-patterns.md",
"line_start": 44,
"line_end": 44
},
{
"file": "references/security-patterns.md",
"line_start": 65,
"line_end": 65
},
{
"file": "references/security-patterns.md",
"line_start": 92,
"line_end": 92
},
{
"file": "references/security-patterns.md",
"line_start": 106,
"line_end": 106
},
{
"file": "references/security-patterns.md",
"line_start": 122,
"line_end": 122
},
{
"file": "references/security-patterns.md",
"line_start": 159,
"line_end": 159
},
{
"file": "references/security-patterns.md",
"line_start": 173,
"line_end": 173
},
{
"file": "references/security-patterns.md",
"line_start": 208,
"line_end": 208
},
{
"file": "references/security-patterns.md",
"line_start": 240,
"line_end": 240
},
{
"file": "SKILL.md",
"line_start": 18,
"line_end": 18
},
{
"file": "SKILL.md",
"line_start": 19,
"line_end": 19
},
{
"file": "SKILL.md",
"line_start": 20,
"line_end": 20
},
{
"file": "SKILL.md",
"line_start": 21,
"line_end": 21
},
{
"file": "SKILL.md",
"line_start": 22,
"line_end": 22
},
{
"file": "SKILL.md",
"line_start": 23,
"line_end": 23
}
]
},
{
"factor": "filesystem",
"evidence": [
{
"file": "references/configuration.md",
"line_start": 9,
"line_end": 9
},
{
"file": "references/configuration.md",
"line_start": 246,
"line_end": 246
},
{
"file": "references/configuration.md",
"line_start": 9,
"line_end": 9
},
{
"file": "references/configuration.md",
"line_start": 132,
"line_end": 132
},
{
"file": "references/configuration.md",
"line_start": 203,
"line_end": 203
},
{
"file": "references/configuration.md",
"line_start": 219,
"line_end": 219
},
{
"file": "references/configuration.md",
"line_start": 235,
"line_end": 235
},
{
"file": "references/configuration.md",
"line_start": 246,
"line_end": 246
},
{
"file": "references/hook-events.md",
"line_start": 76,
"line_end": 76
},
{
"file": "references/hook-events.md",
"line_start": 213,
"line_end": 213
},
{
"file": "references/hook-events.md",
"line_start": 213,
"line_end": 213
},
{
"file": "references/security-patterns.md",
"line_start": 199,
"line_end": 199
},
{
"file": "references/security-patterns.md",
"line_start": 100,
"line_end": 100
},
{
"file": "references/security-patterns.md",
"line_start": 108,
"line_end": 108
},
{
"file": "references/security-patterns.md",
"line_start": 109,
"line_end": 109
},
{
"file": "references/security-patterns.md",
"line_start": 199,
"line_end": 199
},
{
"file": "references/security-patterns.md",
"line_start": 210,
"line_end": 210
},
{
"file": "references/security-patterns.md",
"line_start": 16,
"line_end": 16
},
{
"file": "references/security-patterns.md",
"line_start": 55,
"line_end": 55
},
{
"file": "references/security-patterns.md",
"line_start": 116,
"line_end": 116
},
{
"file": "references/security-patterns.md",
"line_start": 180,
"line_end": 180
},
{
"file": "references/security-patterns.md",
"line_start": 254,
"line_end": 254
},
{
"file": "references/security-patterns.md",
"line_start": 258,
"line_end": 258
},
{
"file": "references/security-patterns.md",
"line_start": 73,
"line_end": 73
},
{
"file": "references/security-patterns.md",
"line_start": 96,
"line_end": 96
},
{
"file": "references/security-patterns.md",
"line_start": 123,
"line_end": 123
},
{
"file": "SKILL.md",
"line_start": 31,
"line_end": 31
},
{
"file": "SKILL.md",
"line_start": 31,
"line_end": 31
}
]
},
{
"factor": "env_access",
"evidence": [
{
"file": "references/security-patterns.md",
"line_start": 113,
"line_end": 113
},
{
"file": "references/security-patterns.md",
"line_start": 116,
"line_end": 116
}
]
},
{
"factor": "network",
"evidence": [
{
"file": "SKILL.md",
"line_start": 103,
"line_end": 103
},
{
"file": "SKILL.md",
"line_start": 104,
"line_end": 104
}
]
}
],
"static_findings": [
{
"id": "external_commands:references/configuration.md:145:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/configuration.md",
"line_start": 145,
"line_end": 145,
"snippet": "INPUT=$(cat)"
},
{
"id": "external_commands:references/configuration.md:146:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/configuration.md",
"line_start": 146,
"line_end": 146,
"snippet": "TOOL=$(echo \"$INPUT\" | jq -r '.tool_name')"
},
{
"id": "external_commands:references/configuration.md:144:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/configuration.md",
"line_start": 144,
"line_end": 144,
"snippet": "#!/bin/bash"
},
{
"id": "external_commands:references/configuration.md:164:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/configuration.md",
"line_start": 164,
"line_end": 164,
"snippet": "#!/bin/bash"
},
{
"id": "filesystem:references/configuration.md:9:hidden-file-in-home-directory",
"category": "filesystem",
"severity": "high",
"pattern": "Hidden file in home directory",
"file": "references/configuration.md",
"line_start": 9,
"line_end": 9,
"snippet": "| `~/.claude/settings.json` | Global (all projects) | Lower |"
},
{
"id": "filesystem:references/configuration.md:246:hidden-file-in-home-directory",
"category": "filesystem",
"severity": "high",
"pattern": "Hidden file in home directory",
"file": "references/configuration.md",
"line_start": 246,
"line_end": 246,
"snippet": "jq '.' ~/.claude/settings.json"
},
{
"id": "filesystem:references/configuration.md:9:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/configuration.md",
"line_start": 9,
"line_end": 9,
"snippet": "| `~/.claude/settings.json` | Global (all projects) | Lower |"
},
{
"id": "filesystem:references/configuration.md:132:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/configuration.md",
"line_start": 132,
"line_end": 132,
"snippet": "\"command\": \"$CLAUDE_PROJECT_DIR/.claude/hooks/validate.sh\""
},
{
"id": "filesystem:references/configuration.md:203:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/configuration.md",
"line_start": 203,
"line_end": 203,
"snippet": "\"command\": \"$CLAUDE_PROJECT_DIR/.claude/hooks/audit-log.sh\""
},
{
"id": "filesystem:references/configuration.md:219:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/configuration.md",
"line_start": 219,
"line_end": 219,
"snippet": "\"command\": \"$CLAUDE_PROJECT_DIR/.claude/hooks/block-dangerous.sh\","
},
{
"id": "filesystem:references/configuration.md:235:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/configuration.md",
"line_start": 235,
"line_end": 235,
"snippet": "\"command\": \"$CLAUDE_PROJECT_DIR/.claude/hooks/init-session.sh\""
},
{
"id": "filesystem:references/configuration.md:246:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/configuration.md",
"line_start": 246,
"line_end": 246,
"snippet": "jq '.' ~/.claude/settings.json"
},
{
"id": "external_commands:references/hook-events.md:36:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/hook-events.md",
"line_start": 36,
"line_end": 36,
"snippet": "INPUT=$(cat)"
},
{
"id": "external_commands:references/hook-events.md:37:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/hook-events.md",
"line_start": 37,
"line_end": 37,
"snippet": "FILE=$(echo \"$INPUT\" | jq -r '.tool_input.file_path // empty')"
},
{
"id": "external_commands:references/hook-events.md:75:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/hook-events.md",
"line_start": 75,
"line_end": 75,
"snippet": "INPUT=$(cat)"
},
{
"id": "external_commands:references/hook-events.md:77:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/hook-events.md",
"line_start": 77,
"line_end": 77,
"snippet": "TOOL=$(echo \"$INPUT\" | jq -r '.tool_name')"
},
{
"id": "external_commands:references/hook-events.md:78:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/hook-events.md",
"line_start": 78,
"line_end": 78,
"snippet": "TIME=$(date -u +\"%Y-%m-%dT%H:%M:%SZ\")"
},
{
"id": "external_commands:references/hook-events.md:80:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/hook-events.md",
"line_start": 80,
"line_end": 80,
"snippet": "echo \"$TIME | $TOOL | $(echo \"$INPUT\" | jq -c '.')\" >> \"$LOG_FILE\""
},
{
"id": "external_commands:references/hook-events.md:214:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/hook-events.md",
"line_start": 214,
"line_end": 214,
"snippet": "echo \"Session initialized for $(basename \"$CLAUDE_PROJECT_DIR\")\""
},
{
"id": "external_commands:references/hook-events.md:35:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/hook-events.md",
"line_start": 35,
"line_end": 35,
"snippet": "#!/bin/bash"
},
{
"id": "external_commands:references/hook-events.md:74:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/hook-events.md",
"line_start": 74,
"line_end": 74,
"snippet": "#!/bin/bash"
},
{
"id": "external_commands:references/hook-events.md:211:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/hook-events.md",
"line_start": 211,
"line_end": 211,
"snippet": "#!/bin/bash"
},
{
"id": "filesystem:references/hook-events.md:76:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/hook-events.md",
"line_start": 76,
"line_end": 76,
"snippet": "LOG_FILE=\"$CLAUDE_PROJECT_DIR/.claude/audit.log\""
},
{
"id": "filesystem:references/hook-events.md:213:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/hook-events.md",
"line_start": 213,
"line_end": 213,
"snippet": "source \"$CLAUDE_PROJECT_DIR/.env.local\" 2>/dev/null || true"
},
{
"id": "filesystem:references/hook-events.md:213:standard-device-file-access",
"category": "filesystem",
"severity": "low",
"pattern": "Standard device file access",
"file": "references/hook-events.md",
"line_start": 213,
"line_end": 213,
"snippet": "source \"$CLAUDE_PROJECT_DIR/.env.local\" 2>/dev/null || true"
},
{
"id": "sensitive:references/hook-events.md:213:environment-file-access",
"category": "sensitive",
"severity": "high",
"pattern": "Environment file access",
"file": "references/hook-events.md",
"line_start": 213,
"line_end": 213,
"snippet": "source \"$CLAUDE_PROJECT_DIR/.env.local\" 2>/dev/null || true"
},
{
"id": "sensitive:references/hook-events.md:213:environment-variant-files",
"category": "sensitive",
"severity": "high",
"pattern": "Environment variant files",
"file": "references/hook-events.md",
"line_start": 213,
"line_end": 213,
"snippet": "source \"$CLAUDE_PROJECT_DIR/.env.local\" 2>/dev/null || true"
},
{
"id": "external_commands:references/security-patterns.md:13:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 13,
"line_end": 13,
"snippet": "INPUT=$(cat)"
},
{
"id": "external_commands:references/security-patterns.md:21:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 21,
"line_end": 21,
"snippet": "TOOL=$(echo \"$INPUT\" | jq -r '.tool_name // empty')"
},
{
"id": "external_commands:references/security-patterns.md:45:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 45,
"line_end": 45,
"snippet": "INPUT=$(cat)"
},
{
"id": "external_commands:references/security-patterns.md:46:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 46,
"line_end": 46,
"snippet": "FILE=$(echo \"$INPUT\" | jq -r '.tool_input.file_path // empty')"
},
{
"id": "external_commands:references/security-patterns.md:55:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 55,
"line_end": 55,
"snippet": "REAL_PATH=$(realpath -m \"$FILE\" 2>/dev/null || echo \"$FILE\")"
},
{
"id": "external_commands:references/security-patterns.md:66:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 66,
"line_end": 66,
"snippet": "INPUT=$(cat)"
},
{
"id": "external_commands:references/security-patterns.md:67:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 67,
"line_end": 67,
"snippet": "CMD=$(echo \"$INPUT\" | jq -r '.tool_input.command // empty')"
},
{
"id": "external_commands:references/security-patterns.md:93:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 93,
"line_end": 93,
"snippet": "INPUT=$(cat)"
},
{
"id": "external_commands:references/security-patterns.md:99:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 99,
"line_end": 99,
"snippet": "TOOL=$(echo \"$INPUT\" | jq -r '.tool_name')"
},
{
"id": "external_commands:references/security-patterns.md:100:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 100,
"line_end": 100,
"snippet": "echo \"$(date) | $TOOL\" >> \"$CLAUDE_PROJECT_DIR/.claude/audit.log\""
},
{
"id": "external_commands:references/security-patterns.md:127:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 127,
"line_end": 127,
"snippet": "NOW=$(date +%s)"
},
{
"id": "external_commands:references/security-patterns.md:128:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 128,
"line_end": 128,
"snippet": "CUTOFF=$((NOW - WINDOW))"
},
{
"id": "external_commands:references/security-patterns.md:136:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 136,
"line_end": 136,
"snippet": "RECENT=$(awk -v cutoff=\"$CUTOFF\" '$1 > cutoff' \"$RATE_FILE\" | wc -l)"
},
{
"id": "external_commands:references/security-patterns.md:186:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 186,
"line_end": 186,
"snippet": "INPUT=$(cat) || {"
},
{
"id": "external_commands:references/security-patterns.md:209:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 209,
"line_end": 209,
"snippet": "INPUT=$(cat)"
},
{
"id": "external_commands:references/security-patterns.md:213:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 213,
"line_end": 213,
"snippet": "TIMESTAMP=$(date -u +\"%Y-%m-%dT%H:%M:%SZ\")"
},
{
"id": "external_commands:references/security-patterns.md:214:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 214,
"line_end": 214,
"snippet": "SESSION=$(echo \"$INPUT\" | jq -r '.session_id // \"unknown\"')"
},
{
"id": "external_commands:references/security-patterns.md:215:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 215,
"line_end": 215,
"snippet": "TOOL=$(echo \"$INPUT\" | jq -r '.tool_name // \"unknown\"')"
},
{
"id": "external_commands:references/security-patterns.md:220:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 220,
"line_end": 220,
"snippet": "echo \"{\\\"timestamp\\\":\\\"$TIMESTAMP\\\",\\\"tool\\\":\\\"$TOOL\\\",\\\"input\\\":$(echo \"$INPUT\" | jq -c '.tool_inpu"
},
{
"id": "external_commands:references/security-patterns.md:257:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "references/security-patterns.md",
"line_start": 257,
"line_end": 257,
"snippet": "INPUT=$(cat)"
},
{
"id": "external_commands:references/security-patterns.md:10:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/security-patterns.md",
"line_start": 10,
"line_end": 10,
"snippet": "#!/bin/bash"
},
{
"id": "external_commands:references/security-patterns.md:44:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/security-patterns.md",
"line_start": 44,
"line_end": 44,
"snippet": "#!/bin/bash"
},
{
"id": "external_commands:references/security-patterns.md:65:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/security-patterns.md",
"line_start": 65,
"line_end": 65,
"snippet": "#!/bin/bash"
},
{
"id": "external_commands:references/security-patterns.md:92:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/security-patterns.md",
"line_start": 92,
"line_end": 92,
"snippet": "#!/bin/bash"
},
{
"id": "external_commands:references/security-patterns.md:106:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/security-patterns.md",
"line_start": 106,
"line_end": 106,
"snippet": "#!/bin/bash"
},
{
"id": "external_commands:references/security-patterns.md:122:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/security-patterns.md",
"line_start": 122,
"line_end": 122,
"snippet": "#!/bin/bash"
},
{
"id": "external_commands:references/security-patterns.md:159:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/security-patterns.md",
"line_start": 159,
"line_end": 159,
"snippet": "#!/bin/bash"
},
{
"id": "external_commands:references/security-patterns.md:173:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/security-patterns.md",
"line_start": 173,
"line_end": 173,
"snippet": "#!/bin/bash"
},
{
"id": "external_commands:references/security-patterns.md:208:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/security-patterns.md",
"line_start": 208,
"line_end": 208,
"snippet": "#!/bin/bash"
},
{
"id": "external_commands:references/security-patterns.md:240:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "references/security-patterns.md",
"line_start": 240,
"line_end": 240,
"snippet": "#!/bin/bash"
},
{
"id": "filesystem:references/security-patterns.md:199:hidden-file-in-home-directory",
"category": "filesystem",
"severity": "high",
"pattern": "Hidden file in home directory",
"file": "references/security-patterns.md",
"line_start": 199,
"line_end": 199,
"snippet": "chmod 600 ~/.claude/settings.json"
},
{
"id": "filesystem:references/security-patterns.md:100:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/security-patterns.md",
"line_start": 100,
"line_end": 100,
"snippet": "echo \"$(date) | $TOOL\" >> \"$CLAUDE_PROJECT_DIR/.claude/audit.log\""
},
{
"id": "filesystem:references/security-patterns.md:108:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/security-patterns.md",
"line_start": 108,
"line_end": 108,
"snippet": "if [[ -f \"$HOME/.secrets/claude-hooks\" ]]; then"
},
{
"id": "filesystem:references/security-patterns.md:109:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/security-patterns.md",
"line_start": 109,
"line_end": 109,
"snippet": "source \"$HOME/.secrets/claude-hooks\""
},
{
"id": "filesystem:references/security-patterns.md:199:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/security-patterns.md",
"line_start": 199,
"line_end": 199,
"snippet": "chmod 600 ~/.claude/settings.json"
},
{
"id": "filesystem:references/security-patterns.md:210:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "references/security-patterns.md",
"line_start": 210,
"line_end": 210,
"snippet": "LOG_DIR=\"$CLAUDE_PROJECT_DIR/.claude/audit\""
},
{
"id": "filesystem:references/security-patterns.md:16:standard-device-file-access",
"category": "filesystem",
"severity": "low",
"pattern": "Standard device file access",
"file": "references/security-patterns.md",
"line_start": 16,
"line_end": 16,
"snippet": "if ! echo \"$INPUT\" | jq -e '.' > /dev/null 2>&1; then"
},
{
"id": "filesystem:references/security-patterns.md:55:standard-device-file-access",
"category": "filesystem",
"severity": "low",
"pattern": "Standard device file access",
"file": "references/security-patterns.md",
"line_start": 55,
"line_end": 55,
"snippet": "REAL_PATH=$(realpath -m \"$FILE\" 2>/dev/null || echo \"$FILE\")"
},
{
"id": "filesystem:references/security-patterns.md:116:standard-device-file-access",
"category": "filesystem",
"severity": "low",
"pattern": "Standard device file access",
"file": "references/security-patterns.md",
"line_start": 116,
"line_end": 116,
"snippet": "curl -s -H \"Authorization: Bearer $API_KEY\" \"$ENDPOINT\" > /dev/null"
},
{
"id": "filesystem:references/security-patterns.md:180:standard-device-file-access",
"category": "filesystem",
"severity": "low",
"pattern": "Standard device file access",
"file": "references/security-patterns.md",
"line_start": 180,
"line_end": 180,
"snippet": "command -v jq >/dev/null 2>&1 || {"
},
{
"id": "filesystem:references/security-patterns.md:254:standard-device-file-access",
"category": "filesystem",
"severity": "low",
"pattern": "Standard device file access",
"file": "references/security-patterns.md",
"line_start": 254,
"line_end": 254,
"snippet": "command -v jq >/dev/null 2>&1 || { echo \"jq required\" >&2; exit 1; }"
},
{
"id": "filesystem:references/security-patterns.md:258:standard-device-file-access",
"category": "filesystem",
"severity": "low",
"pattern": "Standard device file access",
"file": "references/security-patterns.md",
"line_start": 258,
"line_end": 258,
"snippet": "if ! echo \"$INPUT\" | jq -e '.' > /dev/null 2>&1; then"
},
{
"id": "filesystem:references/security-patterns.md:73:non-standard-device-file-access",
"category": "filesystem",
"severity": "high",
"pattern": "Non-standard device file access",
"file": "references/security-patterns.md",
"line_start": 73,
"line_end": 73,
"snippet": "\"> /dev/sda\""
},
{
"id": "filesystem:references/security-patterns.md:96:temp-directory-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Temp directory access",
"file": "references/security-patterns.md",
"line_start": 96,
"line_end": 96,
"snippet": "# echo \"$INPUT\" >> /tmp/debug.log"
},
{
"id": "filesystem:references/security-patterns.md:123:temp-directory-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Temp directory access",
"file": "references/security-patterns.md",
"line_start": 123,
"line_end": 123,
"snippet": "RATE_FILE=\"/tmp/claude-hook-rate\""
},
{
"id": "env_access:references/security-patterns.md:113:generic-api-secret-keys",
"category": "env_access",
"severity": "high",
"pattern": "Generic API/secret keys",
"file": "references/security-patterns.md",
"line_start": 113,
"line_end": 113,
"snippet": "# echo \"Using API key: $API_KEY\" # BAD"
},
{
"id": "env_access:references/security-patterns.md:116:generic-api-secret-keys",
"category": "env_access",
"severity": "high",
"pattern": "Generic API/secret keys",
"file": "references/security-patterns.md",
"line_start": 116,
"line_end": 116,
"snippet": "curl -s -H \"Authorization: Bearer $API_KEY\" \"$ENDPOINT\" > /dev/null"
},
{
"id": "blocker:references/security-patterns.md:74:disk-destruction-command",
"category": "blocker",
"severity": "critical",
"pattern": "Disk destruction command",
"file": "references/security-patterns.md",
"line_start": 74,
"line_end": 74,
"snippet": "\"mkfs.\""
},
{
"id": "blocker:references/security-patterns.md:17:system-reconnaissance",
"category": "blocker",
"severity": "low",
"pattern": "System reconnaissance",
"file": "references/security-patterns.md",
"line_start": 17,
"line_end": 17,
"snippet": "echo \"Invalid JSON input\" >&2"
},
{
"id": "blocker:references/security-patterns.md:214:system-reconnaissance",
"category": "blocker",
"severity": "low",
"pattern": "System reconnaissance",
"file": "references/security-patterns.md",
"line_start": 214,
"line_end": 214,
"snippet": "SESSION=$(echo \"$INPUT\" | jq -r '.session_id // \"unknown\"')"
},
{
"id": "blocker:references/security-patterns.md:259:system-reconnaissance",
"category": "blocker",
"severity": "low",
"pattern": "System reconnaissance",
"file": "references/security-patterns.md",
"line_start": 259,
"line_end": 259,
"snippet": "echo \"Invalid JSON\" >&2"
},
{
"id": "external_commands:SKILL.md:18:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 18,
"line_end": 18,
"snippet": "| `PreToolUse` | Before tool execution | Yes |"
},
{
"id": "external_commands:SKILL.md:19:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 19,
"line_end": 19,
"snippet": "| `PostToolUse` | After tool completes | Yes |"
},
{
"id": "external_commands:SKILL.md:20:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 20,
"line_end": 20,
"snippet": "| `PermissionRequest` | Permission dialog shown | Yes |"
},
{
"id": "external_commands:SKILL.md:21:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 21,
"line_end": 21,
"snippet": "| `Notification` | Notifications sent | Yes |"
},
{
"id": "external_commands:SKILL.md:22:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 22,
"line_end": 22,
"snippet": "| `UserPromptSubmit` | User submits prompt | No |"
},
{
"id": "external_commands:SKILL.md:23:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 23,
"line_end": 23,
"snippet": "| `Stop` | Agent finishes | No |"
},
{
"id": "external_commands:SKILL.md:24:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 24,
"line_end": 24,
"snippet": "| `SubagentStop` | Subagent finishes | No |"
},
{
"id": "external_commands:SKILL.md:25:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 25,
"line_end": 25,
"snippet": "| `PreCompact` | Before context compaction | No |"
},
{
"id": "external_commands:SKILL.md:26:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 26,
"line_end": 26,
"snippet": "| `SessionStart` | Session begins/resumes | No |"
},
{
"id": "external_commands:SKILL.md:27:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 27,
"line_end": 27,
"snippet": "| `SessionEnd` | Session ends | No |"
},
{
"id": "external_commands:SKILL.md:31:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 31,
"line_end": 31,
"snippet": "Add to `~/.claude/settings.json` or `.claude/settings.local.json`:"
},
{
"id": "external_commands:SKILL.md:33:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 33,
"line_end": 46,
"snippet": "```json"
},
{
"id": "external_commands:SKILL.md:46:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 46,
"line_end": 52,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:52:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 52,
"line_end": 53,
"snippet": "| `\"Write\"` | Only Write tool |"
},
{
"id": "external_commands:SKILL.md:53:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 53,
"line_end": 53,
"snippet": "| `\"*\"` or `\"\"` | All tools |"
},
{
"id": "external_commands:SKILL.md:54:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 54,
"line_end": 55,
"snippet": "| `\"mcp__*\"` | All MCP tools |"
},
{
"id": "external_commands:SKILL.md:55:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 55,
"line_end": 59,
"snippet": "| `\"Bash\"` | Bash commands |"
},
{
"id": "external_commands:SKILL.md:59:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 59,
"line_end": 69,
"snippet": "```bash"
},
{
"id": "external_commands:SKILL.md:69:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 69,
"line_end": 82,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:82:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 82,
"line_end": 82,
"snippet": "- [ ] Quote all variables: `\"$VAR\"` not `$VAR`"
},
{
"id": "external_commands:SKILL.md:83:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 83,
"line_end": 84,
"snippet": "- [ ] Validate paths (no `..` traversal)"
},
{
"id": "external_commands:SKILL.md:84:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 84,
"line_end": 90,
"snippet": "- [ ] Use `$CLAUDE_PROJECT_DIR` for paths"
},
{
"id": "external_commands:SKILL.md:90:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 90,
"line_end": 99,
"snippet": "```bash"
},
{
"id": "external_commands:SKILL.md:99:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 99,
"line_end": 108,
"snippet": "```"
},
{
"id": "external_commands:SKILL.md:108:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 108,
"line_end": 109,
"snippet": "- `./references/hook-events.md` - All events with input/output schemas"
},
{
"id": "external_commands:SKILL.md:109:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 109,
"line_end": 110,
"snippet": "- `./references/configuration.md` - Advanced config patterns"
},
{
"id": "external_commands:SKILL.md:110:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 110,
"line_end": 114,
"snippet": "- `./references/security-patterns.md` - Production security"
},
{
"id": "external_commands:SKILL.md:114:ruby-shell-backtick-execution",
"category": "external_commands",
"severity": "medium",
"pattern": "Ruby/shell backtick execution",
"file": "SKILL.md",
"line_start": 114,
"line_end": 114,
"snippet": "**See Also:** `claude-code-debug` for troubleshooting, `claude-code-headless` for CLI automation"
},
{
"id": "external_commands:SKILL.md:62:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "SKILL.md",
"line_start": 62,
"line_end": 62,
"snippet": "INPUT=$(cat)"
},
{
"id": "external_commands:SKILL.md:63:shell-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Shell command substitution",
"file": "SKILL.md",
"line_start": 63,
"line_end": 63,
"snippet": "TOOL=$(echo \"$INPUT\" | jq -r '.tool_name')"
},
{
"id": "external_commands:SKILL.md:59:template-literal-with-command-substitution",
"category": "external_commands",
"severity": "medium",
"pattern": "Template literal with command substitution",
"file": "SKILL.md",
"line_start": 59,
"line_end": 69,
"snippet": "```bash"
},
{
"id": "external_commands:SKILL.md:60:unix-shell-invocation",
"category": "external_commands",
"severity": "medium",
"pattern": "Unix shell invocation",
"file": "SKILL.md",
"line_start": 60,
"line_end": 60,
"snippet": "#!/bin/bash"
},
{
"id": "network:SKILL.md:103:hardcoded-url",
"category": "network",
"severity": "low",
"pattern": "Hardcoded URL",
"file": "SKILL.md",
"line_start": 103,
"line_end": 103,
"snippet": "- https://code.claude.com/docs/en/hooks - Hooks reference"
},
{
"id": "network:SKILL.md:104:hardcoded-url",
"category": "network",
"severity": "low",
"pattern": "Hardcoded URL",
"file": "SKILL.md",
"line_start": 104,
"line_end": 104,
"snippet": "- https://code.claude.com/docs/en/settings - Settings configuration"
},
{
"id": "filesystem:SKILL.md:31:hidden-file-in-home-directory",
"category": "filesystem",
"severity": "high",
"pattern": "Hidden file in home directory",
"file": "SKILL.md",
"line_start": 31,
"line_end": 31,
"snippet": "Add to `~/.claude/settings.json` or `.claude/settings.local.json`:"
},
{
"id": "filesystem:SKILL.md:31:hidden-file-access",
"category": "filesystem",
"severity": "medium",
"pattern": "Hidden file access",
"file": "SKILL.md",
"line_start": 31,
"line_end": 31,
"snippet": "Add to `~/.claude/settings.json` or `.claude/settings.local.json`:"
}
],
"finding_verdicts": [
{
"id": "external_commands:references/configuration.md:145:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/configuration.md:146:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/configuration.md:144:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/configuration.md:164:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "filesystem:references/configuration.md:9:hidden-file-in-home-directory",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "filesystem:references/configuration.md:246:hidden-file-in-home-directory",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "filesystem:references/configuration.md:9:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "filesystem:references/configuration.md:132:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "filesystem:references/configuration.md:203:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "filesystem:references/configuration.md:219:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "filesystem:references/configuration.md:235:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "filesystem:references/configuration.md:246:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "external_commands:references/hook-events.md:36:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/hook-events.md:37:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/hook-events.md:75:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/hook-events.md:77:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/hook-events.md:78:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/hook-events.md:80:shell-command-substitution",
"verdict": "confirmed",
"confidence": 0.72,
"reason": "This example writes the full hook input JSON to an audit log. Tool inputs may contain prompts, file contents, commands, or secrets, so logging them verbatim creates a data exposure risk.",
"severity": "medium"
},
{
"id": "external_commands:references/hook-events.md:214:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/hook-events.md:35:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/hook-events.md:74:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/hook-events.md:211:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "filesystem:references/hook-events.md:76:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "filesystem:references/hook-events.md:213:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.91,
"reason": "The device access is standard shell redirection or command lookup in an example script. It does not read sensitive files or modify system devices."
},
{
"id": "filesystem:references/hook-events.md:213:standard-device-file-access",
"verdict": "false_positive",
"confidence": 0.91,
"reason": "The device access is standard shell redirection or command lookup in an example script. It does not read sensitive files or modify system devices."
},
{
"id": "sensitive:references/hook-events.md:213:environment-file-access",
"verdict": "false_positive",
"confidence": 0.68,
"reason": "The environment file is sourced in a session initialization example to load project-specific variables. No evidence shows the contents are logged or sent elsewhere by this snippet."
},
{
"id": "sensitive:references/hook-events.md:213:environment-variant-files",
"verdict": "false_positive",
"confidence": 0.68,
"reason": "The environment file is sourced in a session initialization example to load project-specific variables. No evidence shows the contents are logged or sent elsewhere by this snippet."
},
{
"id": "external_commands:references/security-patterns.md:13:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:21:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:45:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:46:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:55:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:66:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:67:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:93:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:99:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:100:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:127:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:128:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:136:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:186:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:209:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:213:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:214:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:215:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:220:shell-command-substitution",
"verdict": "confirmed",
"confidence": 0.78,
"reason": "The audit trail example appends raw tool_input into a JSONL log. This can persist sensitive command arguments or file contents unless the hook sanitizes fields first.",
"severity": "medium"
},
{
"id": "external_commands:references/security-patterns.md:257:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:10:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:44:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:65:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:92:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:106:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:122:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:159:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:173:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:208:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:references/security-patterns.md:240:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "filesystem:references/security-patterns.md:199:hidden-file-in-home-directory",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "filesystem:references/security-patterns.md:100:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "filesystem:references/security-patterns.md:108:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.72,
"reason": "The hidden file is referenced as a local environment or secret source in hook examples. This is legitimate configuration guidance and does not exfiltrate the file contents."
},
{
"id": "filesystem:references/security-patterns.md:109:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.72,
"reason": "The hidden file is referenced as a local environment or secret source in hook examples. This is legitimate configuration guidance and does not exfiltrate the file contents."
},
{
"id": "filesystem:references/security-patterns.md:199:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "filesystem:references/security-patterns.md:210:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "filesystem:references/security-patterns.md:16:standard-device-file-access",
"verdict": "false_positive",
"confidence": 0.91,
"reason": "The device access is standard shell redirection or command lookup in an example script. It does not read sensitive files or modify system devices."
},
{
"id": "filesystem:references/security-patterns.md:55:standard-device-file-access",
"verdict": "false_positive",
"confidence": 0.91,
"reason": "The device access is standard shell redirection or command lookup in an example script. It does not read sensitive files or modify system devices."
},
{
"id": "filesystem:references/security-patterns.md:116:standard-device-file-access",
"verdict": "false_positive",
"confidence": 0.91,
"reason": "The device access is standard shell redirection or command lookup in an example script. It does not read sensitive files or modify system devices."
},
{
"id": "filesystem:references/security-patterns.md:180:standard-device-file-access",
"verdict": "false_positive",
"confidence": 0.91,
"reason": "The device access is standard shell redirection or command lookup in an example script. It does not read sensitive files or modify system devices."
},
{
"id": "filesystem:references/security-patterns.md:254:standard-device-file-access",
"verdict": "false_positive",
"confidence": 0.91,
"reason": "The device access is standard shell redirection or command lookup in an example script. It does not read sensitive files or modify system devices."
},
{
"id": "filesystem:references/security-patterns.md:258:standard-device-file-access",
"verdict": "false_positive",
"confidence": 0.91,
"reason": "The device access is standard shell redirection or command lookup in an example script. It does not read sensitive files or modify system devices."
},
{
"id": "filesystem:references/security-patterns.md:73:non-standard-device-file-access",
"verdict": "false_positive",
"confidence": 0.93,
"reason": "The device path appears as a string in a dangerous-command deny-list. The example blocks this pattern rather than writing to the device."
},
{
"id": "filesystem:references/security-patterns.md:96:temp-directory-access",
"verdict": "false_positive",
"confidence": 0.88,
"reason": "The temp-file line is commented as a bad example and is explicitly discouraged. It is not an active recommendation to write sensitive input to /tmp."
},
{
"id": "filesystem:references/security-patterns.md:123:temp-directory-access",
"verdict": "false_positive",
"confidence": 0.82,
"reason": "The temp path is used for a simple rate-limit counter in documentation. It stores timestamps, not secrets, although production code should prefer project-scoped state."
},
{
"id": "env_access:references/security-patterns.md:113:generic-api-secret-keys",
"verdict": "false_positive",
"confidence": 0.94,
"reason": "This API key reference is in a commented bad example that warns users not to print secrets. It is a safety warning, not an instruction to expose credentials."
},
{
"id": "env_access:references/security-patterns.md:116:generic-api-secret-keys",
"verdict": "false_positive",
"confidence": 0.7,
"reason": "The API key is used in a generic example of authenticated notification without hardcoded endpoints or credential disclosure. It is legitimate secret use when controlled by the user."
},
{
"id": "blocker:references/security-patterns.md:74:disk-destruction-command",
"verdict": "false_positive",
"confidence": 0.93,
"reason": "The dangerous string appears inside a deny-list example for blocking destructive commands. The surrounding context teaches prevention rather than executing the command."
},
{
"id": "blocker:references/security-patterns.md:17:system-reconnaissance",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The snippet is ordinary hook validation or error reporting text, not system reconnaissance. It does not collect host information or disclose environment details."
},
{
"id": "blocker:references/security-patterns.md:214:system-reconnaissance",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The snippet is ordinary hook validation or error reporting text, not system reconnaissance. It does not collect host information or disclose environment details."
},
{
"id": "blocker:references/security-patterns.md:259:system-reconnaissance",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The snippet is ordinary hook validation or error reporting text, not system reconnaissance. It does not collect host information or disclose environment details."
},
{
"id": "external_commands:SKILL.md:18:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:19:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:20:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:21:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:22:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:23:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:24:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:25:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:26:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:27:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:31:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:33:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:46:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:52:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:53:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:54:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:55:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:59:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:69:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:82:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:83:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:84:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:90:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:99:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:108:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:109:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:110:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:114:ruby-shell-backtick-execution",
"verdict": "false_positive",
"confidence": 0.98,
"reason": "The backticks are Markdown formatting around hook names, patterns, paths, or fenced examples. They are not Ruby backtick execution and do not run commands."
},
{
"id": "external_commands:SKILL.md:62:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:SKILL.md:63:shell-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:SKILL.md:59:template-literal-with-command-substitution",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "external_commands:SKILL.md:60:unix-shell-invocation",
"verdict": "false_positive",
"confidence": 0.84,
"reason": "This is an example shell hook script in documentation for Claude Code hooks. It parses Claude-provided JSON with fixed commands and does not introduce a command injection sink by itself."
},
{
"id": "network:SKILL.md:103:hardcoded-url",
"verdict": "false_positive",
"confidence": 0.96,
"reason": "This is a documentation link to official Claude Code reference material, not code that performs a network request. No data is sent to the URL by the skill."
},
{
"id": "network:SKILL.md:104:hardcoded-url",
"verdict": "false_positive",
"confidence": 0.96,
"reason": "This is a documentation link to official Claude Code reference material, not code that performs a network request. No data is sent to the URL by the skill."
},
{
"id": "filesystem:SKILL.md:31:hidden-file-in-home-directory",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
},
{
"id": "filesystem:SKILL.md:31:hidden-file-access",
"verdict": "false_positive",
"confidence": 0.9,
"reason": "The hidden file path is Claude Code configuration or project hook storage documented for user setup. The skill describes expected configuration locations rather than stealthy file access."
}
],
"semantic_findings": [
{
"title": "Audit Logging Can Capture Sensitive Tool Input",
"description": "The documentation includes audit log examples that write full hook input or raw tool_input fields to local logs. Tool input may include prompts, commands, file paths, file contents, or credentials, so examples should demonstrate sanitization by default.",
"severity": "medium",
"locations": [
{
"file": "references/hook-events.md",
"line_start": 80,
"line_end": 80
},
{
"file": "references/security-patterns.md",
"line_start": 220,
"line_end": 220
}
],
"confidence": 0.82,
"confidence_reasoning": "Both cited examples directly append unsanitized hook input data to audit logs. The security-patterns file warns about full input logging elsewhere, but the audit examples still show potentially sensitive fields being persisted."
}
],
"critical_findings": [],
"high_findings": [],
"medium_findings": [
{
"title": "Shell command substitution",
"description": "echo \"$TIME | $TOOL | $(echo \"$INPUT\" | jq -c '.')\" >> \"$LOG_FILE\"",
"locations": [
{
"file": "references/hook-events.md",
"line_start": 80,
"line_end": 80
}
],
"review_kind": "capability",
"source_category": "external_commands",
"source_severity": "medium",
"confidence": 0.72,
"confidence_reasoning": "This example writes the full hook input JSON to an audit log. Tool inputs may contain prompts, file contents, commands, or secrets, so logging them verbatim creates a data exposure risk."
},
{
"title": "Shell command substitution",
"description": "echo \"{\\\"timestamp\\\":\\\"$TIMESTAMP\\\",\\\"tool\\\":\\\"$TOOL\\\",\\\"input\\\":$(echo \"$INPUT\" | jq -c '.tool_inpu",
"locations": [
{
"file": "references/security-patterns.md",
"line_start": 220,
"line_end": 220
}
],
"review_kind": "capability",
"source_category": "external_commands",
"source_severity": "medium",
"confidence": 0.78,
"confidence_reasoning": "The audit trail example appends raw tool_input into a JSONL log. This can persist sensitive command arguments or file contents unless the hook sanitizes fields first."
},
{
"title": "Audit Logging Can Capture Sensitive Tool Input",
"description": "The documentation includes audit log examples that write full hook input or raw tool_input fields to local logs. Tool input may include prompts, commands, file paths, file contents, or credentials, so examples should demonstrate sanitization by default.",
"locations": [
{
"file": "references/hook-events.md",
"line_start": 80,
"line_end": 80
},
{
"file": "references/security-patterns.md",
"line_start": 220,
"line_end": 220
}
],
"review_kind": "security",
"source_category": "semantic",
"source_severity": "medium",
"confidence": 0.82,
"confidence_reasoning": "Both cited examples directly append unsanitized hook input data to audit logs. The security-patterns file warns about full input logging elsewhere, but the audit examples still show potentially sensitive fields being persisted."
}
],
"low_findings": [],
"dangerous_patterns": [],
"files_scanned": 4,
"total_lines": 896,
"audit_model": "claude",
"audited_at": "2026-07-09T01:06:11.770Z",
"agent_auto_install_policy": "allowed",
"manual_install_policy": "allowed"
},
"content": {
"user_title": "Configure Claude Code Hooks Safely",
"value_statement": "Claude Code hooks are powerful, but unsafe hook scripts can leak data or block work unexpectedly. This skill explains hook events, configuration patterns, and safer script templates for controlled automation.",
"seo_keywords": [
"Claude hooks",
"Codex automation",
"Claude Code hooks",
"Claude Code settings",
"PreToolUse hook",
"PostToolUse hook",
"hook audit logging",
"tool validation",
"Claude automation",
"developer workflow hooks"
],
"actual_capabilities": [
"Explains Claude Code hook events and when each event runs.",
"Shows settings.json patterns for PreToolUse, PostToolUse, and SessionStart hooks.",
"Provides shell examples for parsing hook JSON input with jq.",
"Documents matcher patterns for tools, MCP tools, and wildcard hooks.",
"Lists security practices for path checks, command blocking, timeouts, and logging."
],
"limitations": [
"Does not install or enable hooks automatically.",
"Requires users to write and maintain their own hook scripts.",
"Shell examples assume jq and a Unix-like environment.",
"Audit logging examples must be adapted to avoid sensitive data exposure."
],
"use_cases": [
{
"title": "Validate tool usage before execution",
"description": "Block writes outside a project or deny dangerous shell commands before Claude Code runs them.",
"target_user": "Security-conscious developers"
},
{
"title": "Create local audit trails",
"description": "Record selected hook metadata for compliance or debugging without storing sensitive tool input.",
"target_user": "DevOps and platform engineers"
},
{
"title": "Initialize project sessions",
"description": "Run setup checks or load safe project context when a Claude Code session starts.",
"target_user": "Team leads maintaining shared workflows"
}
],
"prompt_templates": [
{
"title": "Explain hook basics",
"scenario": "Beginner learning the hook model",
"prompt": "Explain the Claude Code hook events in this skill and recommend which event I should use for validating file writes."
},
{
"title": "Draft a validation hook",
"scenario": "Create a simple project guardrail",
"prompt": "Using this skill, draft a PreToolUse hook that blocks writes outside CLAUDE_PROJECT_DIR and explain how to add it to settings.json."
},
{
"title": "Review a hook configuration",
"scenario": "Check an existing settings file",
"prompt": "Review my Claude Code hooks configuration for unsafe matchers, missing timeouts, and risky commands. Suggest safer alternatives."
},
{
"title": "Design a secure audit workflow",
"scenario": "Advanced logging and compliance setup",
"prompt": "Design a PostToolUse audit logging workflow that records useful metadata but redacts prompts, file contents, secrets, and command arguments."
}
],
"output_examples": [
{
"input": "I need to block unsafe Bash commands before they run.",
"output": "Use a PreToolUse hook with matcher Bash. The response identifies dangerous command patterns, recommends quoted variables, and shows where to add a timeout."
},
{
"input": "How should I log hook activity for debugging?",
"output": "Log only event type, tool name, timestamp, and a request identifier. Avoid storing prompts, file contents, environment values, or full command arguments."
},
{
"input": "Which hook runs when Claude starts a project session?",
"output": "Use SessionStart for startup checks or safe context loading. Keep the script short, scoped to the project, and resilient to missing optional files."
}
],
"best_practices": [
"Use project-scoped paths and validate resolved paths before acting on hook input.",
"Add short timeouts to every hook so automation cannot stall Claude Code.",
"Redact or omit sensitive fields before writing any audit or debug logs."
],
"anti_patterns": [
"Do not log full hook input because it may contain secrets or private code.",
"Do not use wildcard matchers without understanding every tool they include.",
"Do not source broad environment files unless each variable is required."
],
"faq": [
{
"question": "What are Claude Code hooks?",
"answer": "They are user-configured commands that run during Claude Code events, such as before tool use or after a tool completes."
},
{
"question": "Can this skill install hooks for me?",
"answer": "No. It documents configuration patterns and examples. You must create scripts and edit settings yourself."
},
{
"question": "Which tools does it support?",
"answer": "The report lists Claude, Codex, and Claude Code compatibility, with content focused on Claude Code settings."
},
{
"question": "Are hook scripts safe by default?",
"answer": "No. Hook scripts can run commands, read files, and write logs. Review each script before enabling it."
},
{
"question": "What should I avoid logging?",
"answer": "Avoid logging prompts, file contents, command arguments, environment values, API keys, tokens, and full tool input JSON."
},
{
"question": "What dependency do the examples use?",
"answer": "Many shell examples use jq to parse hook JSON input, so jq must be installed for those scripts."
}
]
},
"file_structure": [
{
"name": "references",
"type": "dir",
"path": "references",
"children": [
{
"name": "configuration.md",
"type": "file",
"path": "references/configuration.md",
"lines": 264
},
{
"name": "hook-events.md",
"type": "file",
"path": "references/hook-events.md",
"lines": 252
},
{
"name": "security-patterns.md",
"type": "file",
"path": "references/security-patterns.md",
"lines": 265
}
]
},
{
"name": "SKILL.md",
"type": "file",
"path": "SKILL.md",
"lines": 115
}
]
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |