-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhooks.json
More file actions
86 lines (86 loc) · 1.73 KB
/
hooks.json
File metadata and controls
86 lines (86 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
"version": 1,
"events": {
"pre_command": [
"dangerous_cmd_guard"
],
"pre_commit": [
"write_scope_guard",
"tdd_guard"
],
"post_change": [
"tdd_guard"
],
"pre_phase_complete": [
"write_scope_guard",
"tdd_guard"
],
"pre_review": [
"latest_verified_run_guard"
],
"pre_complete": [
"user_validation_guard"
],
"pre_push": [
"dangerous_cmd_guard",
"latest_verified_run_guard"
]
},
"guards": {
"tdd_guard": {
"strict": true,
"implementation_patterns": [
"*.py",
"*.sh",
"*.js",
"*.jsx",
"*.ts",
"*.tsx",
"*.java",
"*.kt"
],
"test_patterns": [
"tests/**",
"**/*_test.py",
"**/*test*.py",
"**/*.spec.ts",
"**/*.test.ts",
"**/*.spec.tsx",
"**/*.test.tsx",
"**/src/test/**"
],
"ignore_patterns": [
"docs/**",
"workflows/**",
".github/**",
"*.md",
"*.json",
"*.yml",
"*.yaml"
]
},
"dangerous_cmd_guard": {
"blocked_patterns": [
"rm\\s+-rf",
"git\\s+reset\\s+--hard",
"git\\s+checkout\\s+--",
"git\\s+clean\\s+-fd",
"git\\s+push(?:\\s+\\S+)*\\s+--force(?:\\S+)?",
"git\\s+push(?:\\s+\\S+)*\\s+-[A-Za-z]*f[A-Za-z]*",
"DROP\\s+TABLE",
"TRUNCATE\\s+TABLE"
]
},
"latest_verified_run_guard": {
"require_phase_match": true,
"scope_sensitive_events": [
"pre_push"
]
},
"circuit_breaker": {
"window_seconds": 60,
"threshold": 5,
"state_file": "workflows/system/circuit-breaker.json"
}
}
}