forked from konstruktoid/hardening
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackages.bats
193 lines (154 loc) · 3.98 KB
/
packages.bats
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
#!/usr/bin/env bats
load test_helper
@test "Verify that acct is installed" {
run packageInstalled 'acct'
[ "$status" -eq 0 ]
}
@test "Verify that aide-common is installed" {
run packageInstalled 'aide-common'
[ "$status" -eq 0 ]
}
@test "Verify that apparmor is installed" {
run packageInstalled 'apparmor'
[ "$status" -eq 0 ]
}
@test "Verify that apparmor-profiles is installed" {
run packageInstalled 'apparmor-profiles'
[ "$status" -eq 0 ]
}
@test "Verify that apparmor-utils is installed" {
run packageInstalled 'apparmor-utils'
[ "$status" -eq 0 ]
}
@test "Verify that auditd is installed" {
run packageInstalled 'auditd'
[ "$status" -eq 0 ]
}
@test "Verify that audispd-plugins is installed" {
run packageInstalled 'audispd-plugins'
[ "$status" -eq 0 ]
}
@test "Verify that debsums is installed" {
run packageInstalled 'debsums'
[ "$status" -eq 0 ]
}
@test "Verify that gnupg2 is installed" {
run packageInstalled 'gnupg2'
[ "$status" -eq 0 ]
}
@test "Verify that haveged is installed" {
run packageInstalled 'haveged'
[ "$status" -eq 0 ]
}
@test "Verify that libpam-pwquality is installed" {
run packageInstalled 'libpam-pwquality'
[ "$status" -eq 0 ]
}
@test "Verify that libpam-tmpdir is installed" {
run packageInstalled 'libpam-tmpdir'
[ "$status" -eq 0 ]
}
@test "Verify that openssh-server is installed" {
run packageInstalled 'openssh-server'
[ "$status" -eq 0 ]
}
@test "Verify that postfix is installed" {
run packageInstalled 'postfix'
[ "$status" -eq 0 ]
}
@test "Verify that rkhunter is installed" {
run packageInstalled 'rkhunter'
[ "$status" -eq 0 ]
}
@test "Verify that tcpd is installed" {
run packageInstalled 'tcpd'
[ "$status" -eq 0 ]
}
@test "Verify that vlock is installed" {
run packageInstalled 'vlock'
[ "$status" -eq 0 ]
}
@test "Verify that libpam-apparmor is installed" {
run packageInstalled 'libpam-apparmor'
[ "$status" -eq 0 ]
}
@test "Verify that needrestart is installed" {
run packageInstalled 'needrestart'
[ "$status" -eq 0 ]
}
@test "Verify that sysstat is installed" {
run packageInstalled 'sysstat'
[ "$status" -eq 0 ]
}
@test "Verify that sysstat is enabled" {
run bash -c 'grep ENABLED=\"true\" /etc/default/sysstat'
[ "$status" -eq 0 ]
}
@test "Verify that update-notifier-common is installed" {
run packageInstalled 'update-notifier-common'
[ "$status" -eq 0 ]
}
@test "Verify that autofs is not installed" {
run packageInstalled 'autofs'
[ "$status" -eq 1 ]
}
@test "Verify that avahi is not installed" {
run packageInstalled 'avahi'
[ "$status" -eq 1 ]
}
@test "Verify that beep is not installed" {
run packageInstalled 'beep'
[ "$status" -eq 1 ]
}
@test "Verify that git is not installed" {
run packageInstalled 'git'
[ "$status" -eq 1 ]
}
@test "Verify that pastebinit is not installed" {
run packageInstalled 'pastebinit'
[ "$status" -eq 1 ]
}
@test "Verify that popularity-contest is not installed" {
run packageInstalled 'popularity-contest'
[ "$status" -eq 1 ]
}
@test "Verify that rsh is not installed" {
run packageInstalled 'rsh'
[ "$status" -eq 1 ]
}
@test "Verify that rsync is not installed" {
run packageInstalled 'rsync'
[ "$status" -eq 1 ]
}
@test "Verify that talk is not installed" {
run packageInstalled 'talk'
[ "$status" -eq 1 ]
}
@test "Verify that telnet is not installed" {
run packageInstalled 'telnet'
[ "$status" -eq 1 ]
}
@test "Verify that tftp is not installed" {
run packageInstalled 'tftp'
[ "$status" -eq 1 ]
}
@test "Verify that whoopsie is not installed" {
run packageInstalled 'whoopsie'
[ "$status" -eq 1 ]
}
@test "Verify that xinetd is not installed" {
run packageInstalled 'xinetd'
[ "$status" -eq 1 ]
}
@test "Verify that yp-tools is not installed" {
run packageInstalled 'yp-tools'
[ "$status" -eq 1 ]
}
@test "Verify that ypbind is not installed" {
run packageInstalled 'ypbind'
[ "$status" -eq 1 ]
}
@test "Verify that psad is installed" {
run packageInstalled 'psad'
[ "$status" -eq 0 ]
}