-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcore-rules.json
208 lines (208 loc) · 6.52 KB
/
core-rules.json
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
{
"rules": [
{
"id": "DOTRules:Disp-1---ignoreUrlParams-allow-list",
"description": "The Dispatcher publish farm cache should have its ignoreUrlParams rules configured in an allow list manner.",
"severity": "MAJOR",
"farmTypeList": ["PUBLISH"],
"element": "farm.cache.ignoreUrlParams",
"type": "Code Smell",
"tags": ["beta","dispatcher"],
"enabled": true,
"checks": [
{
"condition": "RULE_LIST_STARTS_WITH",
"ruleValue": {
"glob": "*",
"type": "ALLOW"
}
}
]
},
{
"id": "DOTRules:Disp-2---statfileslevel",
"description": "The Dispatcher publish farm cache statfileslevel property should be >= 2.",
"severity": "MAJOR",
"farmTypeList": ["PUBLISH"],
"element": "farm.cache.statfileslevel",
"type": "Code Smell",
"tags": ["beta","dispatcher"],
"enabled": true,
"checks": [
{
"condition": "INT_GREATER_OR_EQUAL",
"value": "2"
}
]
},
{
"id": "DOTRules:Disp-3---gracePeriod",
"description": "The Dispatcher publish farm gracePeriod property should be >= 2.",
"severity": "MAJOR",
"farmTypeList": ["PUBLISH"],
"element": "farm.cache.gracePeriod",
"type": "Code Smell",
"tags": ["beta","dispatcher"],
"enabled": true,
"checks": [
{
"condition": "INT_GREATER_OR_EQUAL",
"value": "2"
}
]
},
{
"id": "DOTRules:Disp-4---default-filter-deny-rules",
"description": "The Dispatcher publish farm filters should contain the default `deny` rules from the 6.x.x version of the AEM archetype.",
"severity": "MAJOR",
"farmTypeList": ["PUBLISH"],
"element": "farm.filter",
"type": "Code Smell",
"tags": ["beta","dispatcher"],
"enabled": true,
"checks": [
{
"condition": "FILTER_LIST_STARTS_WITH",
"filterValue": {
"type": "DENY",
"url": "*"
},
"context": "The farm's filter list should start with: /0001 { /type \"deny\" /url \"*\" }"
},
{
"condition": "FILTER_LIST_INCLUDES",
"filterValue": {
"type": "DENY",
"selectors": "(feed|rss|pages|languages|blueprint|infinity|tidy|sysview|docview|query|[0-9-]+|jcr:content)",
"extension": "(json|xml|html|feed)"
},
"context": "The farm's filter list should include: /<id> { /type \"deny\" /selectors '(feed|rss|pages|languages|blueprint|infinity|tidy|sysview|docview|query|[0-9-]+|jcr:content)' /extension '(json|xml|html|feed)' }"
},
{
"condition": "FILTER_LIST_INCLUDES",
"filterValue": {
"type": "DENY",
"method": "GET",
"query": "debug=*"
},
"context": "The farm's filter list should include: `/<id> { /type \"deny\" /method \"GET\" /query \"debug=*\" }`"
},
{
"condition": "FILTER_LIST_INCLUDES",
"filterValue": {
"type": "DENY",
"method": "GET",
"query": "wcmmode=*"
},
"context": "The farm's filter list should include: `/<id> { /type \"deny\" /method \"GET\" /query \"wcmmode=*\" }`"
},
{
"condition": "FILTER_LIST_INCLUDES",
"filterValue": {
"type": "DENY",
"path": "/content/ams/healthcheck/*"
},
"context": "The farm's filter list should include: `/<id> { /type \"deny\" /path \"/content/ams/healthcheck/*\"}`"
},
{
"condition": "FILTER_LIST_INCLUDES",
"filterValue": {
"type": "DENY",
"url": "/content/regent.html"
},
"context": "The farm's filter list should include: `/<id> { /type \"deny\" /url \"/content/regent.html\"}`"
}
]
},
{
"id": "DOTRules:Disp-5---serveStaleOnError",
"description": "The Dispatcher publish farm cache should have serveStaleOnError enabled.",
"severity": "MAJOR",
"farmTypeList": ["PUBLISH"],
"element": "farm.cache.serveStaleOnError",
"type": "Code Smell",
"tags": ["beta","dispatcher"],
"enabled": true,
"checks": [
{
"condition": "BOOLEAN_EQUALS",
"value": true
}
]
},
{
"id": "DOTRules:Disp-6---suffix-allow-list",
"description": "The Dispatcher publish farm filters should specify the allowed Sling suffix patterns in an allow list manner.",
"severity": "MAJOR",
"farmTypeList": ["PUBLISH"],
"element": "farm.filter",
"type": "Code Smell",
"tags": ["beta","dispatcher"],
"enabled": true,
"checks": [
{
"condition": "FILTER_LIST_INCLUDES",
"filterValue": {
"type": "DENY",
"url": "/content*",
"suffix": "*"
}
}
]
},
{
"id": "DOTRules:Disp-7---selector-allow-list",
"description": "The Dispatcher publish farm filters should specify the allowed Sling selectors in an allow list manner.",
"severity": "MAJOR",
"farmTypeList": ["PUBLISH"],
"element": "farm.filter",
"type": "Code Smell",
"tags": ["beta","dispatcher"],
"enabled": true,
"checks": [
{
"condition": "FILTER_LIST_INCLUDES",
"filterValue": {
"type": "DENY",
"url": "/content*",
"selectors": "*"
}
}
]
},
{
"id": "DOTRules:Disp-8---unique-farm-name",
"description": "Each Dispatcher farm should have a unique name.",
"severity": "MAJOR",
"farmTypeList": ["PUBLISH","AUTHOR"],
"element": "farm",
"type": "Code Smell",
"tags": ["beta","dispatcher"],
"enabled": true,
"checks": [
{
"condition": "IS_UNIQUE_LABEL"
}
]
},
{
"id": "DOTRules:Httpd-1---require-all-granted",
"description": "The 'Require all granted' directive should not be used in a VirtualHost Directory section with a root directory-path.",
"severity": "MAJOR",
"element": "httpd.vhost.directory.root",
"type": "Code Smell",
"tags": ["beta","dispatcher"],
"enabled": true,
"checks": [
{
"condition": "HAS_DIRECTIVE",
"directiveValue": {
"name": "Require",
"arguments": ["all", "granted"]
},
"failIf": true
}
]
}
]
}