Full port of llm-security plugin for internal use on Windows with GitHub Copilot CLI. Protocol translation layer (copilot-hook-runner.mjs) normalizes Copilot camelCase I/O to Claude Code snake_case format — all original hook scripts run unmodified. - 8 hooks with protocol translation (stdin/stdout/exit code) - 18 SKILL.md skills (Agent Skills Open Standard) - 6 .agent.md agent definitions - 20 scanners + 14 scanner lib modules (unchanged) - 14 knowledge files (unchanged) - 39 test files including copilot-port-verify.mjs (17 tests) - Windows-ready: node:path, os.tmpdir(), process.execPath, no bash Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
79 lines
1.7 KiB
JSON
79 lines
1.7 KiB
JSON
{
|
|
"version": 1,
|
|
"hooks": {
|
|
"userPromptSubmitted": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node hooks/scripts/copilot-hook-runner.mjs pre-prompt-inject-scan.mjs"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node hooks/scripts/copilot-hook-runner.mjs update-check.mjs"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"preToolUse": [
|
|
{
|
|
"matcher": "edit|create",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node hooks/scripts/copilot-hook-runner.mjs pre-edit-secrets.mjs"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": "bash",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node hooks/scripts/copilot-hook-runner.mjs pre-bash-destructive.mjs"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": "bash",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node hooks/scripts/copilot-hook-runner.mjs pre-install-supply-chain.mjs"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": "create",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node hooks/scripts/copilot-hook-runner.mjs pre-write-pathguard.mjs"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"postToolUse": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node hooks/scripts/copilot-hook-runner.mjs post-mcp-verify.mjs"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "node hooks/scripts/copilot-hook-runner.mjs post-session-guard.mjs"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|