mirror of
https://github.com/github/awesome-copilot.git
synced 2026-03-19 23:55:12 +00:00
* Tool Guardian Hook Add Tool Guardian hook for blocking dangerous tool operations Introduces a preToolUse hook that scans Copilot agent tool invocations against ~20 threat patterns (destructive file ops, force pushes, DB drops, permission abuse, network exfiltration) and blocks or warns before execution. * Address review feedback: move hook to .github/, remove accidental log file - Move hooks/tool-guardian/ to .github/hooks/tool-guardian/ - Remove accidentally committed guard.log - Update all path references in README.md * Move log directory to .github/, revert hook files back to hooks/ - Revert hook files from .github/hooks/ back to hooks/tool-guardian/ - Update default log path to .github/logs/copilot/tool-guardian/ - Update all path references in README.md and hooks.json
17 lines
264 B
JSON
17 lines
264 B
JSON
{
|
|
"version": 1,
|
|
"hooks": {
|
|
"preToolUse": [
|
|
{
|
|
"type": "command",
|
|
"bash": "hooks/tool-guardian/guard-tool.sh",
|
|
"cwd": ".",
|
|
"env": {
|
|
"GUARD_MODE": "block"
|
|
},
|
|
"timeoutSec": 10
|
|
}
|
|
]
|
|
}
|
|
}
|