Skip to content

Commit 3574688

Browse files
committed
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
1 parent 1192ffc commit 3574688

4 files changed

Lines changed: 5 additions & 7 deletions

File tree

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ AI coding agents can autonomously execute shell commands, file operations, and d
3333
1. Copy the hook folder to your repository:
3434

3535
```bash
36-
cp -r hooks/tool-guardian .github/hooks/
36+
cp -r .github/hooks/tool-guardian your-repo/.github/hooks/
3737
```
3838

3939
2. Ensure the script is executable:
@@ -110,14 +110,14 @@ The hook is configured in `hooks.json` to run on the `preToolUse` event:
110110
### Safe command (exit 0)
111111

112112
```bash
113-
echo '{"toolName":"bash","toolInput":"git status"}' | bash hooks/tool-guardian/guard-tool.sh
113+
echo '{"toolName":"bash","toolInput":"git status"}' | bash .github/hooks/tool-guardian/guard-tool.sh
114114
```
115115

116116
### Blocked command (exit 1)
117117

118118
```bash
119119
echo '{"toolName":"bash","toolInput":"git push --force origin main"}' | \
120-
GUARD_MODE=block bash hooks/tool-guardian/guard-tool.sh
120+
GUARD_MODE=block bash .github/hooks/tool-guardian/guard-tool.sh
121121
```
122122

123123
```
@@ -135,14 +135,14 @@ echo '{"toolName":"bash","toolInput":"git push --force origin main"}' | \
135135

136136
```bash
137137
echo '{"toolName":"bash","toolInput":"rm -rf /"}' | \
138-
GUARD_MODE=warn bash hooks/tool-guardian/guard-tool.sh
138+
GUARD_MODE=warn bash .github/hooks/tool-guardian/guard-tool.sh
139139
```
140140

141141
### Allowlisted command (exit 0)
142142

143143
```bash
144144
echo '{"toolName":"bash","toolInput":"git push --force origin main"}' | \
145-
TOOL_GUARD_ALLOWLIST="git push --force" bash hooks/tool-guardian/guard-tool.sh
145+
TOOL_GUARD_ALLOWLIST="git push --force" bash .github/hooks/tool-guardian/guard-tool.sh
146146
```
147147

148148
## Log Format

logs/copilot/tool-guardian/guard.log

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)