-
Notifications
You must be signed in to change notification settings - Fork 17
/
tox.ini
434 lines (368 loc) · 19.4 KB
/
tox.ini
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
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
[tox]
minversion = 3.6.0
skip_missing_interpreters = true
envlist =
unit-aws-ec2-default-security-group-traffic
unit-aws-iam-password-policy-min-length
unit-aws-iam-password-reuse-prevention
unit-aws-iam-server-certificate-expired
unit-ec2-close-port-5601
unit-ec2-close-port-5439
unit-ec2-close-port-3306
unit-ec2-close-port-27017
unit-ec2-close-port-23
unit-ec2-close-port-21
unit-ec2-close-port-20
unit-ec2-close-port-1521
unit-ec2-close-port-1433
unit-ec2-close-port-8080
unit-ec2-close-port-8200-9300
unit-security-group-close-port-5432
unit-s3-remove-public-admin-acl
unit-s3-enable-access-logging
unit-ec2-close-port-3389
unit-s3-enable-default-encryption
unit-ec2-close-port-22
unit-s3-list-buckets
unit-security-group-close-port-3389
unit-rds-backup-retention-30-days
unit-elb-enable-access-logs
unit-security-group-close-port-22
unit-aws-ec2-administration-ports-ingress-allowed
unit-aws-cloudtrail-logs-encrypted
unit-aws-s3-cloudtrail-public-access
unit-aws-kms-key-rotates
unit-azure-network-security-group-close-port-22
unit-azure-network-security-group-close-port-3389
unit-azure-vm-close-port-22
unit-azure-blob-remove-public-access
unit-azure-storage-allow-only-https
unit-azure-storage-default-network-access-deny
unit-azure-security-center-enable-ddos-protection
unit-azure-sql-data-encryption-on
unit-azure-sql-auditing-on-server
unit-azure-sql-threat-detection-on-server
unit-azure-key-vault-logging-for-keyvault-enabled
unit-azure-storage-soft-delete-not-enabled
unit-azure-storage-encryption-at-rest-not-configured-with-customer-managed-key
unit-azure-key-vault-is-recoverable
unit-azure-key-vault-expiry-date-set-for-all-secrets
unit-azure-key-vault-expiry-date-set-for-all-keys
unit-azure-mysql-enforce-ssl-connection-enable
unit-azure-postgresql-enforce-ssl-connection-enable
unit-azure-sql-threat-detection-types-all-server
unit-azure-security-udp-access-restricted-from-internet
unit-azure-sql-tde-protector-encrypted-cmk
unit-azure-postgresql-allow-access-to-azure-service-disabled
unit-aws-s3-bucket-policy-allow-https
unit-aws-sqs-queue-publicly-accessible
unit-ebs-private-snapshot
unit-rds-remove-public-endpoint
unit-rds_enable_version_update
unit-kinesis-encrypt-stream
unit-aws_ec2_close_port_11211
unit-aws-rds-snapshot-remove-publicaccess
unit-aws_s3_remove_fullaccess_authenticatedusers
[testenv]
passenv =
# Prevent Python bytecode files from being created
#
# This can cause weird errors if you test multiple version of python because the bytecode files
# are not necessarily compatible across the different versions. This was most clear in the
# 2.x -> 3.x change.
PYTHONDONTWRITEBYTECODE
SSH_AUTH_SOCK
AWS_PROFILE
AWS_DEFAULT_REGION
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
# Used to make tox (and python) work correctly on macOS
OBJC_DISABLE_INITIALIZE_FORK_SAFETY
[testenv:unit-security-group-close-port-5432]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_security_group_close_port_5432.py
deps = -r remediation_worker/jobs/security_group_close_port_5432/requirements-dev.txt
[testenv:unit-s3-remove-public-admin-acl]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_s3_remove_public_admin_acl.py
deps = -r remediation_worker/jobs/s3_remove_public_admin_acl/requirements-dev.txt
[testenv:unit-s3-enable-access-logging]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_s3_enable_access_logging.py
deps = -r remediation_worker/jobs/s3_enable_access_logging/requirements-dev.txt
[testenv:unit-ec2-close-port-3389]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_ec2_close_port_3389.py
deps = -r remediation_worker/jobs/ec2_close_port_3389/requirements-dev.txt
[testenv:unit-s3-enable-default-encryption]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_s3_enable_default_encryption.py
deps = -r remediation_worker/jobs/s3_enable_default_encryption/requirements-dev.txt
[testenv:unit-ec2-close-port-22]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_ec2_close_port_22.py
deps = -r remediation_worker/jobs/ec2_close_port_22/requirements-dev.txt
[testenv:unit-s3-list-buckets]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_s3_list_buckets.py
deps = -r remediation_worker/jobs/s3_list_buckets/requirements-dev.txt
[testenv:unit-security-group-close-port-3389]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_security_group_close_port_3389.py
deps = -r remediation_worker/jobs/security_group_close_port_3389/requirements-dev.txt
[testenv:unit-rds-backup-retention-30-days]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_rds_backup_retention_30_days.py
deps = -r remediation_worker/jobs/rds_backup_retention_30_days/requirements-dev.txt
[testenv:unit-security-group-close-port-22]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_security_group_close_port_22.py
deps = -r remediation_worker/jobs/security_group_close_port_22/requirements-dev.txt
[testenv:unit-elb-enable-access-logs]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_elb_enable_access_logs.py
deps = -r remediation_worker/jobs/elb_enable_access_logs/requirements-dev.txt
[testenv:unit-aws-ec2-administration-ports-ingress-allowed]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_aws_ec2_administration_ports_ingress_allowed.py
deps = -r remediation_worker/jobs/aws_ec2_administration_ports_ingress_allowed/requirements-dev.txt
[testenv:unit-aws-cloudtrail-logs-encrypted]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_aws_cloudtrail_logs_encrypted.py
deps = -r remediation_worker/jobs/aws_cloudtrail_logs_encrypted/requirements-dev.txt
[testenv:unit-aws-kms-key-rotates]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_aws_kms_key_rotates.py
deps = -r remediation_worker/jobs/aws_kms_key_rotates/requirements-dev.txt
[testenv:unit-azure-network-security-group-close-port-22]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_network_security_group_close_port_22.py
deps = -r remediation_worker/jobs/azure_network_security_group_close_port_22/requirements-dev.txt
[testenv:unit-azure-network-security-group-close-port-3389]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_network_security_group_close_port_3389.py
deps = -r remediation_worker/jobs/azure_network_security_group_close_port_3389/requirements-dev.txt
[testenv:unit-azure-vm-close-port-22]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_vm_close_port_22.py
deps = -r remediation_worker/jobs/azure_vm_close_port_22/requirements-dev.txt
[testenv:unit-azure-blob-remove-public-access]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_blob_remove_public_access.py
deps = -r remediation_worker/jobs/azure_blob_remove_public_access/requirements-dev.txt
[testenv:unit-azure-storage-allow-only-https]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_storage_account_allow_https_traffic_only.py
deps = -r remediation_worker/jobs/azure_storage_account_allow_https_traffic_only/requirements-dev.txt
[testenv:unit-azure-storage-default-network-access-deny]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_storage_default_network_access_deny.py
deps = -r remediation_worker/jobs/azure_storage_default_network_access_deny/requirements-dev.txt
[testenv:unit-azure-security-center-enable-ddos-protection]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_security_center_enable_ddos_protection.py
deps = -r remediation_worker/jobs/azure_security_center_enable_ddos_protection/requirements-dev.txt
[testenv:unit-azure-sql-data-encryption-on]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_sql_data_encryption_on.py
deps = -r remediation_worker/jobs/azure_sql_data_encryption_on/requirements-dev.txt
[testenv:unit-azure-sql-auditing-on-server]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_sql_auditing_on_server.py
deps = -r remediation_worker/jobs/azure_sql_auditing_on_server/requirements-dev.txt
[testenv:unit-azure-sql-threat-detection-on-server]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_sql_threat_detection_on_server.py
deps = -r remediation_worker/jobs/azure_sql_threat_detection_on_server/requirements-dev.txt
[testenv:unit-azure-key-vault-logging-for-keyvault-enabled]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_key_vault_logging_for_keyvault_enabled.py
deps = -r remediation_worker/jobs/azure_key_vault_logging_for_keyvault_enabled/requirements-dev.txt
[testenv:unit-azure-storage-soft-delete-not-enabled]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_storage_soft_delete_not_enabled.py
deps = -r remediation_worker/jobs/azure_storage_soft_delete_not_enabled/requirements-dev.txt
[testenv:unit-azure-storage-encryption-at-rest-not-configured-with-customer-managed-key]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_storage_encryption_at_rest_not_configured_with_customer_managed_key.py
deps = -r remediation_worker/jobs/azure_storage_encryption_at_rest_not_configured_with_customer_managed_key/requirements-dev.txt
[testenv:unit-aws-s3-cloudtrail-public-access]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_aws_s3_cloudtrail_public_access.py
deps = -r remediation_worker/jobs/aws_s3_cloudtrail_public_access/requirements-dev.txt
[testenv:unit-azure-key-vault-is-recoverable]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_key_vault_is_recoverable.py
deps = -r remediation_worker/jobs/azure_key_vault_is_recoverable/requirements-dev.txt
[testenv:unit-azure-key-vault-expiry-date-set-for-all-secrets]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_key_vault_expiry_date_set_for_all_secrets.py
deps = -r remediation_worker/jobs/azure_key_vault_expiry_date_set_for_all_secrets/requirements-dev.txt
[testenv:unit-azure-key-vault-expiry-date-set-for-all-keys]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_key_vault_expiry_date_set_for_all_keys.py
deps = -r remediation_worker/jobs/azure_key_vault_expiry_date_set_for_all_keys/requirements-dev.txt
[testenv:unit-azure-mysql-enforce-ssl-connection-enable]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_mysql_enforce_ssl_connection_enable.py
deps = -r remediation_worker/jobs/azure_mysql_enforce_ssl_connection_enable/requirements-dev.txt
[testenv:unit-azure-postgresql-enforce-ssl-connection-enable]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_postgresql_enforce_ssl_connection_enable.py
deps = -r remediation_worker/jobs/azure_postgresql_enforce_ssl_connection_enable/requirements-dev.txt
[testenv:unit-azure-sql-threat-detection-types-all-server]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_sql_threat_detection_types_all_server.py
deps = -r remediation_worker/jobs/azure_sql_threat_detection_types_all_server/requirements-dev.txt
[testenv:unit-azure-security-udp-access-restricted-from-internet]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_security_udp_access_restricted_from_internet.py
deps = -r remediation_worker/jobs/azure_security_udp_access_restricted_from_internet/requirements-dev.txt
[testenv:unit-azure-sql-tde-protector-encrypted-cmk]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_sql_tde_protector_encrypted_cmk.py
deps = -r remediation_worker/jobs/azure_sql_tde_protector_encrypted_cmk/requirements-dev.txt
[testenv:unit-azure-postgresql-allow-access-to-azure-service-disabled]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_azure_postgresql_allow_access_to_azure_service_disabled.py
deps = -r remediation_worker/jobs/azure_postgresql_allow_access_to_azure_service_disabled/requirements-dev.txt
[testenv:unit-aws-s3-bucket-policy-allow-https]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_aws_s3_bucket_policy_allow_https.py
deps = -r remediation_worker/jobs/aws_s3_bucket_policy_allow_https/requirements-dev.txt
[testenv:unit-aws-sqs-queue-publicly-accessible]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_aws_sqs_queue_publicly_accessible.py
deps = -r remediation_worker/jobs/aws_sqs_queue_publicly_accessible/requirements-dev.txt
[testenv:unit-ebs-private-snapshot]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_ebs_private_snapshot.py
deps = -r remediation_worker/jobs/ebs_private_snapshot/requirements-dev.txt
[testenv:unit-rds-remove-public-endpoint]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_rds_remove_public_endpoint.py
deps = -r remediation_worker/jobs/rds_remove_public_endpoint/requirements-dev.txt
[testenv:unit-rds_enable_version_update]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_rds_enable_version_update.py
deps = -r remediation_worker/jobs/rds_enable_version_update/requirements-dev.txt
[testenv:unit-kinesis-encrypt-stream]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_kinesis_encrypt_stream.py
deps = -r remediation_worker/jobs/kinesis_encrypt_stream/requirements-dev.txt
[testenv:unit-ec2-close-port-5601]
description = Unit test the project
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_ec2_close_port_5601.py
deps = -r remediation_worker/jobs/ec2_close_port_3389/requirements-dev.txt
[testenv:unit-ec2-close-port-5439]
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_ec2_close_port_5439.py
changedir = test
deps = -r remediation_worker/jobs/ec2_close_port_5439/requirements-dev.txt
[testenv:unit-ec2-close-port-3306]
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_ec2_close_port_3306.py
deps = -r remediation_worker/jobs/ec2_close_port_3306/requirements-dev.txt
[testenv:unit-ec2-close-port-27017]
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_ec2_close_port_27017.py
deps = -r remediation_worker/jobs/ec2_close_port_27017/requirements-dev.txt
[testenv:unit-ec2-close-port-23]
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_ec2_close_port_23.py
deps = -r remediation_worker/jobs/ec2_close_port_23/requirements-dev.txt
[testenv:unit-ec2-close-port-21]
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_ec2_close_port_21.py
deps = -r remediation_worker/jobs/ec2_close_port_21/requirements-dev.txt
[testenv:unit-ec2-close-port-20]
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_ec2_close_port_20.py
deps = -r remediation_worker/jobs/ec2_close_port_20/requirements-dev.txt
[testenv:unit-ec2-close-port-1521]
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_ec2_close_port_1521.py
deps = -r remediation_worker/jobs/ec2_close_port_1521/requirements-dev.txt
[testenv:unit-ec2-close-port-1433]
changedir = test
commands = pytest --capture=no --basetemp="{envtmpdir}" unit/test_ec2_close_port_1433.py
deps = -r remediation_worker/jobs/ec2_close_port_1433/requirements-dev.txt
[testenv:unit-ec2-close-port-9200-9300]
changedir = test
pytest --capture=no --basetemp="{envtmpdir}" unit/test_ec2_close_port_9200_9300.py
deps = -r remediation_worker/jobs/ec2_close_port_9200_9300/requirements-dev.txt
[testenv:unit-ec2-close-port-8080]
changedir = test
pytest --capture=no --basetemp="{envtmpdir}" unit/test_ec2_close_port_8080.py
deps = -r remediation_worker/jobs/ec2_close_port_8080/requirements-dev.txt
[testenv:unit-aws-ec2-default-security-group-traffic]
changedir = test
pytest --capture=no --basetemp="{envtmpdir}" unit/test_aws_ec2_default_security_group_traffic.py
deps = -r remediation_worker/jobs/aws_ec2_default_security_group_traffic/requirements-dev.txt
[testenv:unit-aws-iam-password-policy-min-length]
changedir = test
pytest --capture=no --basetemp="{envtmpdir}" unit/test_aws_iam_password_policy_min_length.py
deps = -r remediation_worker/jobs/aws_iam_password_policy_min_length/requirements-dev.txt
[testenv:unit-aws-iam-password-reuse-prevention]
changedir = test
pytest --capture=no --basetemp="{envtmpdir}" unit/test_aws_iam_password_reuse_prevention.py
deps = -r remediation_worker/jobs/aws_iam_password_reuse_prevention/requirements-dev.txt
[testenv:unit-aws-iam-server-certificate-expired]
changedir = test
pytest --capture=no --basetemp="{envtmpdir}" unit/test_aws_iam_server_certificate_expired.py
deps = -r remediation_worker/jobs/aws_iam_server_certificate_expired/requirements-dev.txt
[testenv:unit-aws-ec2-close-port-11211]
changedir = test
pytest --capture=no --basetemp="{envtmpdir}" unit/test_aws_ec2_close_port_11211.py
deps = -r remediation_worker/jobs/aws_ec2_close_port_11211/requirements-dev.txt
[testenv:unit-aws-rds-snapshot-remove-publicaccess]
changedir = test
pytest --capture=no --basetemp="{envtmpdir}" unit/test_aws_rds_snapshot_remove_publicaccess.py
deps = -r remediation_worker/jobs/aws_rds_snapshot_remove_publicaccess/requirements-dev.txt
[testenv:unit-aws_s3_remove_fullaccess_authenticatedusers]
changedir = test
pytest --capture=no --basetemp="{envtmpdir}" unit/test_aws_s3_iam_remove_fullaccess_authenticatedusers.py
deps = -r remediation_worker/jobs/aws_s3_remove_fullaccess_authenticatedusers/requirements-dev.txt