-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathcfbs.json
More file actions
386 lines (386 loc) · 15.1 KB
/
cfbs.json
File metadata and controls
386 lines (386 loc) · 15.1 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
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
{
"name": "modules",
"description": "Repository of modules written by the CFEngine team.",
"type": "module",
"provides": {
"allow-all-hosts": {
"description": "Allows all hosts / IP addresses to connect and fetch policy.",
"subdirectory": "management/allow-all-hosts",
"steps": ["json def.json def.json"]
},
"autorun": {
"description": "Enable autorun functionality.",
"subdirectory": "management/autorun",
"steps": ["json def.json def.json"]
},
"autorun-bundles": {
"description": "Enable automatic execution of bundles tagged 'autorun'.",
"subdirectory": "management/autorun-bundles",
"steps": ["json def.json def.json"]
},
"autorun-inputs": {
"description": "Enable automatic loading of policy files in 'services/autorun/'.",
"subdirectory": "management/autorun-inputs",
"steps": ["json def.json def.json"]
},
"disable-recommendations": {
"description": "Disable all recommendations emitted from the Masterfiles Policy Framework (MPF).",
"subdirectory": "management/disable-recommendations",
"steps": ["json def.json def.json"]
},
"client-initiated-reporting": {
"description": "Enable client initiated reporting and disable pull collection.",
"subdirectory": "reporting/client-initiated-reporting",
"steps": ["json def.json def.json"]
},
"command-dispatcher": {
"description": "Command dispatcher for running shell commands on schedule",
"subdirectory": "management/command-dispatcher",
"steps": [
"copy main.cf services/cfbs/modules/command-dispatcher/main.cf",
"policy_files services/cfbs/modules/command-dispatcher/main.cf",
"bundles command_dispatcher:main",
"input ./input.json def.json"
],
"input": [
{
"type": "list",
"variable": "commands_to_run",
"namespace": "command_dispatcher",
"bundle": "main",
"label": "Command",
"subtype": [
{
"key": "command",
"type": "string",
"label": "Command",
"question": "Command to run"
},
{
"key": "condition",
"type": "string",
"label": "Condition",
"question": "Condition for when to run",
"default": "any"
},
{
"key": "ifelapsed",
"type": "string",
"label": "ifelapsed",
"question": "Number of minutes between promise assessments",
"default": "5"
}
],
"while": "Do you want to specify more commands to be run?"
}
]
},
"conditional-installer": {
"description": "Allows you to specify packages you want installed and conditions for where you want them installed, as well as a list of packages you generally want uninstalled.",
"subdirectory": "security/conditional-installer",
"steps": [
"copy main.cf services/cfbs/modules/conditional-installer/main.cf",
"input ./input.json def.json",
"bundles conditional_installer:main",
"policy_files services/cfbs/modules/conditional-installer/main.cf"
],
"input": [
{
"type": "string",
"variable": "packages_to_uninstall",
"namespace": "conditional_installer",
"bundle": "main",
"label": "Uninstall",
"question": "Which package(s) would you like to be uninstalled?"
},
{
"type": "list",
"variable": "packages_to_install",
"namespace": "conditional_installer",
"bundle": "main",
"label": "Install",
"subtype": [
{
"key": "packages",
"type": "string",
"label": "Package(s)",
"question": "Package(s) to install"
},
{
"key": "condition",
"type": "string",
"label": "Condition",
"question": "Condition for where to install"
},
{
"key": "why",
"type": "string",
"label": "Why",
"question": "Why?",
"default": "Unknown"
}
],
"while": "Do you want to specify more packages to be installed?"
}
]
},
"delete-home-dotrhosts": {
"description": "Ensure that ~/.rhosts files are not present, as they present a security risk.",
"subdirectory": "security/delete-home-dotrhosts",
"steps": [
"copy policy/main.cf services/cfbs/delete-home-dotrhosts/",
"policy_files services/cfbs/delete-home-dotrhosts/",
"bundles delete_home_dotrhosts:main"
]
},
"delete-home-dotshosts": {
"description": "Ensure that ~/.shosts files are not present, as they present a security risk.",
"subdirectory": "security/delete-home-dotshots",
"steps": [
"copy policy/main.cf services/cfbs/delete-home-dotshots/",
"policy_files services/cfbs/delete-home-dotshots/",
"bundles delete_home_dotshosts:main"
]
},
"demo": {
"description": "Enables convenient and insecure settings for demoing CFEngine.",
"subdirectory": "management/demo",
"dependencies": ["autorun", "every-minute"],
"steps": ["json def.json def.json"]
},
"disable-automatic-key-trust": {
"description": "Makes the hub / policy server stop accepting new keys automatically.",
"subdirectory": "management/disable-automatic-key-trust",
"steps": ["json def.json def.json"]
},
"enable-aslr": {
"description": "Ensure that Address space layout randomization (ASLR) is enabled on the system.",
"subdirectory": "security/enable-aslr",
"steps": [
"copy enable-aslr.cf services/cfbs/modules/enable-aslr/enable-aslr.cf",
"bundles enable_aslr",
"policy_files services/cfbs/modules/enable-aslr/enable-aslr.cf"
]
},
"every-minute": {
"description": "Make policy fetching, evaluation, and reporting happen every minute.",
"subdirectory": "management/every-minute",
"steps": ["json def.json def.json"]
},
"inventory-unshadowed-users": {
"description": "Adds reporting data (inventory) on local users in /etc/passwd not using /etc/shadow for their password.",
"subdirectory": "security/inventory-unshadowed-users",
"dependencies": ["library-parsed-local-users"],
"steps": [
"copy policy/main.cf services/cfbs/inventory-unshadowed-users/",
"policy_files services/cfbs/inventory-unshadowed-users/",
"bundles inventory_unshadowed_users:main"
]
},
"inventory-windows-services": {
"description": "Inventory running Windows services.",
"subdirectory": "inventory/inventory-windows-services",
"steps": [
"copy inventory-windows-services.cf services/cfbs/inventory-windows-services/",
"policy_files services/cfbs/inventory-windows-services/",
"bundles inventory_windows_services_running"
]
},
"inventory-fde": {
"description": "Inventory full disk encryption status (LUKS, FileVault, BitLocker).",
"tags": ["inventory", "security"],
"subdirectory": "inventory/inventory-fde",
"steps": [
"copy inventory-fde.cf services/cfbs/modules/inventory-fde/inventory-fde.cf",
"policy_files services/cfbs/modules/inventory-fde/inventory-fde.cf",
"bundles inventory_fde:main"
]
},
"library-for-promise-types-in-bash": {
"description": "Library enabling promise types implemented in bash.",
"subdirectory": "libraries/bash",
"steps": ["copy cfengine.sh modules/promises/"]
},
"library-for-promise-types-in-python": {
"description": "Library enabling promise types implemented in python.",
"subdirectory": "libraries/python",
"steps": [
"copy cfengine_module_library.py modules/promises/cfengine_module_library.py",
"replace_version 2 0.0.0 modules/promises/cfengine_module_library.py",
"copy cfengine_module_library.py modules/promises/cfengine.py",
"replace_version 2 0.0.0 modules/promises/cfengine.py"
]
},
"maintainers-in-motd": {
"description": "Add maintainer and purpose information from CMDB to /etc/motd",
"subdirectory": "security/maintainers-in-motd",
"steps": [
"copy ./maintainers-in-motd.cf services/cfbs/modules/maintainers-in-motd.cf",
"policy_files services/cfbs/modules/maintainers-in-motd.cf",
"bundles maintainers_in_motd"
]
},
"powershell-execution-policy": {
"description": "Inventory and bundle for PowerShell Execution Policy",
"subdirectory": "management/powershell-execution-policy",
"steps": [
"directory ./ services/cfbs/powershell-execution-policy/",
"policy_files services/cfbs/powershell-execution-policy/",
"bundles powershell_execution_policy_inventory"
]
},
"package-method-ansible-galaxy-collection": {
"description": "Package method for installing Ansible Galaxy Collections.",
"subdirectory": "management/package-method-ansible-galaxy-collection",
"dependencies": [],
"steps": [
"directory ./ services/cfbs/modules/package-method-ansible-galaxy-collection/",
"policy_files services/cfbs/modules/package-method-ansible-galaxy-collection/"
]
},
"package-method-winget": {
"description": "Package method for Windows winget package manager.",
"subdirectory": "management/package-method-winget",
"dependencies": ["powershell-execution-policy"],
"steps": [
"input ./input.json def.json",
"directory ./ services/cfbs/modules/package-method-winget/",
"policy_files services/cfbs/modules/package-method-winget/",
"bundles package_method_winget:package_method_winget winget_installed:winget_installed"
],
"input": [
{
"type": "string",
"variable": "accept_source_agreements",
"namespace": "data",
"bundle": "package_method_winget",
"label": "Accept Source Agreements",
"question": "Would you like to accept source agreements for winget packages promises? [yes|no]"
},
{
"type": "string",
"variable": "accept_package_agreements",
"namespace": "data",
"bundle": "package_method_winget",
"label": "Accept Package Agreements",
"question": "Would you like to accept package agreements for winget packages promises? [yes|no]"
},
{
"type": "string",
"variable": "allow_powershell_execution_policy_change",
"namespace": "data",
"bundle": "winget_installed",
"label": "Allow necessary PowerShell Execution Policy change: LocalMachine set to Unrestricted in order to install winget and cmdlets",
"question": "Would you like to allow this module to change PowerShell Execution Policy to LocalMachine:Unrestricted? [yes|no]"
}
]
},
"promise-type-ansible": {
"description": "Promise type to manage systemd services.",
"subdirectory": "promise-types/ansible",
"dependencies": ["library-for-promise-types-in-python"],
"steps": [
"copy ansible_promise.py modules/promises/",
"append enable.cf services/init.cf"
]
},
"promise-type-git": {
"description": "Promise type to manage git repos.",
"subdirectory": "promise-types/git",
"dependencies": ["library-for-promise-types-in-python"],
"steps": [
"copy git.py modules/promises/",
"append enable.cf services/init.cf"
]
},
"promise-type-groups": {
"description": "Experimental promise type to manage local user groups.",
"subdirectory": "promise-types/groups",
"dependencies": ["library-for-promise-types-in-python"],
"steps": [
"copy groups.py modules/promises/",
"append enable.cf services/init.cf"
]
},
"promise-type-systemd": {
"description": "Promise type to manage systemd services.",
"subdirectory": "promise-types/systemd",
"dependencies": ["library-for-promise-types-in-python"],
"steps": [
"copy systemd.py modules/promises/",
"append enable.cf services/init.cf"
]
},
"uninstall-packages": {
"description": "Allows you to specify a list of packages you want uninstalled on your hosts.",
"subdirectory": "security/uninstall-packages",
"steps": [
"copy uninstall-packages.cf services/cfbs/modules/uninstall-packages/uninstall-packages.cf",
"input uninstall-packages/input.json def.json",
"bundles uninstall_packages:uninstall_packages",
"policy_files services/cfbs/modules/uninstall-packages/uninstall-packages.cf"
],
"input": [
{
"type": "list",
"variable": "package_names",
"namespace": "uninstall_packages",
"bundle": "uninstall_packages",
"label": "Packages to uninstall",
"subtype": [
{
"key": "name",
"type": "string",
"label": "Package name",
"question": "Package name"
},
{
"key": "why",
"type": "string",
"label": "Why",
"question": "Why should this package be uninstalled?",
"default": "Unknown"
}
],
"while": "Do you want to specify more packages to be uninstalled?"
}
]
},
"uninstall-rsh-server": {
"description": "Ensure the remote shell (rsh) server package is not installed on the system.",
"subdirectory": "security/uninstall-rsh-server",
"steps": [
"copy uninstall-rsh-server.cf services/cfbs/modules/uninstall-rsh-server/uninstall-rsh-server.cf",
"bundles uninstall_rsh_server",
"policy_files services/cfbs/modules/uninstall-rsh-server/uninstall-rsh-server.cf"
]
},
"windows-capability": {
"description": "Manage and inventory Windows Capabilities.",
"subdirectory": "management/windows-capability",
"steps": [
"directory ./ services/cfbs/windows-capability/",
"policy_files services/cfbs/windows-capability/",
"bundles windows_capability"
]
},
"windows-openssh-server": {
"description": "Optionally install Windows OpenSSH Server.",
"subdirectory": "software/windows",
"steps": [
"copy windows-openssh-server.cf services/cfbs/software/windows/windows-openssh-server.cf",
"policy_files services/cfbs/software/windows/windows-openssh-server.cf",
"bundles windows_openssh_server"
]
},
"windows-optional-feature": {
"description": "Manage and inventory Windows Optional Features.",
"subdirectory": "management/windows-optional-feature",
"steps": [
"directory ./ services/cfbs/windows-optional-feature/",
"policy_files services/cfbs/windows-optional-feature/",
"bundles windows_optional_feature"
]
}
}
}