-
Notifications
You must be signed in to change notification settings - Fork 138
Expand file tree
/
Copy pathdocker-compose.test.yaml
More file actions
313 lines (261 loc) · 8.44 KB
/
docker-compose.test.yaml
File metadata and controls
313 lines (261 loc) · 8.44 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
services:
test-e2e:
build:
context: .
dockerfile: docker/Dockerfile
entrypoint: ""
env_file: env.test
command: python -m unittest discover test.e2e
volumes:
# We don't copy the test code into the image so that we don't pollute production image
# with test data.
- ./test/:/opt/test/
- ./docs/:/opt/docs/
- ./docker/karton.ini:/etc/karton/karton.ini
- data-test:/data/
test:
build:
context: .
dockerfile: docker/Dockerfile
entrypoint: ""
command: bash -c "alembic upgrade head && unittest-parallel -j 4 -t . -s test.modules && unittest-parallel -j 4 -t . -s test.reporting && unittest-parallel -j 4 -t . -s test.unit"
environment:
TEST_REDIS_HOST: test-redis
TEST_REDIS_PORT: 6379
BRUTER_FILE_LIST: full
RUNNING_TESTS: "true"
# Use only one provider to speed up the tests
SUBDOMAIN_ENUMERATION_GAU_ADDITIONAL_OPTIONS: "--providers wayback --timeout 60"
SQL_INJECTION_STOP_ON_FIRST_MATCH: "false"
NUCLEI_INTERACTSH_SERVER: https://interactsh.lab.cert.pl
POSTMAN_MAIL_FROM: artemis@localhost.com
POSTMAN_MAIL_TO: artemis@localhost.com
REQUESTS_PER_SECOND: 0
CUSTOM_PORT_SCANNER_PORTS: 21,80,443,6379
NUCLEI_CHECK_TEMPLATE_LIST: "false"
env_file: env.test
volumes:
# We don't copy the test code into the image so that we don't pollute production image
# with test data.
- ./test/:/opt/test/
- ./docker/karton.ini:/etc/karton/karton.ini
depends_on:
test-grafana:
condition: service_healthy
test-redis:
image: redis:7.0.5
postgres-test:
image: postgres
restart: always
shm_size: 256mb
environment:
POSTGRES_DB: artemis
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
sql-injection-test-postgres:
image: postgres
restart: always
shm_size: 256mb
environment:
POSTGRES_DB: artemis
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
sql-injection-test-mysql:
image: mysql:5.6
environment:
MYSQL_ROOT_PASSWORD: root
test-dast-vuln-app:
build:
context: .
dockerfile: test/data/dast_vuln_app/Dockerfile
volumes:
- ./test/data/dast_vuln_app/:/app/
test-flask-vulnerable-api:
build:
context: .
dockerfile: test/data/flask_vulnerable_api/Dockerfile
volumes:
- ./test/data/flask_vulnerable_api/:/app/
test-service-with-exposed-apache-config:
image: php:7.4-apache
volumes:
- ./test/data/exposed_apache_config/:/var/www/html/
test-service-with-bruteable-files:
image: php:7.4-apache
volumes:
- ./test/data/bruteable_files/:/var/www/html/
test-service-with-bruteable-files-sql-dumps-replica1:
image: php:7.4-apache
volumes:
- ./test/reporting/data/bruteable_files/sql_dumps/:/var/www/html/
test-service-with-bruteable-files-sql-dumps-replica2:
image: php:7.4-apache
volumes:
- ./test/reporting/data/bruteable_files/sql_dumps/:/var/www/html/
test-service-with-bruteable-files-sql-dumps-replica3:
image: php:7.4-apache
volumes:
- ./test/reporting/data/bruteable_files/sql_dumps/:/var/www/html/
test-service-with-bruteable-files-sql-dumps-replica4:
image: php:7.4-apache
volumes:
- ./test/reporting/data/bruteable_files/sql_dumps/:/var/www/html/
test-service-with-bruteable-files-sql-dumps-replica5:
image: php:7.4-apache
volumes:
- ./test/reporting/data/bruteable_files/sql_dumps/:/var/www/html/
test-robots-service:
image: nginx:latest
volumes:
- ./test/data/robots/default.conf:/etc/nginx/conf.d/default.conf
- ./test/data/robots/:/usr/share/nginx/html/
test-php-easy-admin-password:
image: php:8.0-apache
volumes:
- ./test/data/php_easy_admin_password/:/var/www/html/
test-php-redirect-login:
image: php:8.0-apache
volumes:
- ./test/data/php_redirect_login/:/var/www/html
test-php-mock-CVE-2020-28976:
image: php:8.0-apache
volumes:
- ./test/data/mock_CVE-2020-28976/:/var/www/html/
test-php-403-bypass:
image: php:8.0-apache
volumes:
- ./test/data/php_403_bypass/:/var/www/html/
test-php-xss-but-not-on-homepage:
image: php:8.0-apache
volumes:
- ./test/data/php_xss_but_not_on_homepage/:/var/www/html/
test-ftp-server-with-easy-password:
image: stilliard/pure-ftpd:latest
environment:
- FTP_USER_NAME=admin
- FTP_USER_PASS=12345
- FTP_USER_HOME=/dev/shm
test-old-joomla:
image: joomla:4.0.5-php8.0-apache # this is an old image on purpose
environment:
JOOMLA_DB_HOST: test-old-joomla-mysql
JOOMLA_DB_PASSWORD: example
test-old-joomla-mysql:
image: mysql:5.6
environment:
MYSQL_ROOT_PASSWORD: example
test-smtp-server:
hostname: test-smtp-server.artemis
image: bytemark/smtp
test-nginx:
image: nginx:latest
test-service-with-exposed-git:
image: nginx:latest
volumes:
- ./test/data/git/git/:/usr/share/nginx/html/.git/
test-old-wordpress:
image: wordpress:5.9.3-apache
environment:
WORDPRESS_DB_HOST: test-old-wordpress-mysql
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: example
WORDPRESS_DB_NAME: example
test-old-wordpress-mysql:
image: mysql:5.6
environment:
MYSQL_ROOT_PASSWORD: example
test-service-with-directory-index:
image: nginx:latest
volumes:
- ./test/data/directory_index/default.conf:/etc/nginx/conf.d/default.conf
- ./test/data/directory_index/:/usr/share/nginx/html/
test-wordpress-easy-password:
image: wordpress:6.3.2-apache
environment:
WORDPRESS_DB_HOST: test-wordpress-easy-password-mysql
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: example
WORDPRESS_DB_NAME: example
test-wordpress-easy-password-mysql:
image: mysql:5.6
environment:
MYSQL_ROOT_PASSWORD: example
test-mysql-with-easy-password:
image: mysql:5.6
environment:
MYSQL_ROOT_PASSWORD: root
test-ssh-with-bad-key:
build:
context: test/data/ssh_bad_keys
dockerfile: Dockerfile
test-ssh-with-easy-password:
image: lscr.io/linuxserver/openssh-server:latest
environment:
PASSWORD_ACCESS: "true"
USER_PASSWORD: password
USER_NAME: user
test-postgresql-with-easy-password:
image: postgres
environment:
POSTGRES_USER: example
POSTGRES_PASSWORD: example
test-phpmyadmin-easy-password-subdirectory-nginx:
image: nginx
volumes:
- ./test/data/phpmyadmin_subdirectory_proxy/default.conf:/etc/nginx/conf.d/default.conf
test-phpmyadmin-easy-password-subdirectory:
image: phpmyadmin
environment:
- PMA_ABSOLUTE_URI=http://test-phpmyadmin-easy-password-subdirectory-nginx/phpmyadmin/
- PMA_HOST=test-phpmyadmin-easy-password-mysql
test-phpmyadmin-easy-password:
image: phpmyadmin
environment:
- PMA_HOST=test-phpmyadmin-easy-password-mysql
test-phpmyadmin-easy-password-mysql:
image: mariadb:10.3
environment:
MYSQL_ROOT_PASSWORD: root
test-service-with-bruteable-files-sql-dumps:
image: php:7.4-apache
volumes:
- ./test/reporting/data/bruteable_files/sql_dumps/:/var/www/html/
test-service-with-bruteable-files-htpasswd:
image: php:7.4-apache
volumes:
- ./test/reporting/data/bruteable_files/htpasswd/:/var/www/html/
test-apache-with-lfi-and-rce:
image: php:7.4-apache
volumes:
- ./test/data/lfi-rce/:/var/www/html/
test-apache-with-sql-injection-postgres:
build:
dockerfile: test/images/php-postgres/Dockerfile
command: systemctl start apache2.service
volumes:
- ./test/data/sql_injection_postgres/:/var/www/html/
test-apache-with-sql-injection-mysql:
build:
dockerfile: test/images/php-mysql/Dockerfile
command: systemctl start apache2.service
volumes:
- ./test/data/sql_injection_mysql/:/var/www/html/
test-nginx-with-sni-tls:
build:
context: test/images/nginx-with-sni-tls
dockerfile: Dockerfile
test-grafana:
image: grafana/grafana:latest
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_AUTH_DISABLE_LOGIN_FORM=false
- GF_SECURITY_DISABLE_BRUTE_FORCE_LOGIN_PROTECTION=true
healthcheck:
test: [ "CMD-SHELL", "wget -qO /dev/null http://localhost:3000/api/health" ]
interval: 5s
timeout: 10s
retries: 12
start_period: 60s
volumes:
data-test: