File tree Expand file tree Collapse file tree 7 files changed +12
-5
lines changed Expand file tree Collapse file tree 7 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 94
94
" cpus" ,
95
95
" cpuset" ,
96
96
" gitter" ,
97
+ " imds" ,
97
98
" netsh" ,
98
99
" Niek" ,
99
100
" oxsecurity" ,
Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ resource "aws_launch_template" "this" {
57
57
58
58
tags = local. tags
59
59
60
+ # as per user decision. The module default is "required" for better security.
61
+ # tfsec:ignore:aws-ec2-enforce-launch-config-http-token-imds
60
62
metadata_options {
61
63
http_tokens = var. runner_worker_docker_autoscaler_instance . http_tokens
62
64
http_put_response_hop_limit = var. runner_worker_docker_autoscaler_instance . http_put_response_hop_limit
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ locals {
13
13
provided_kms_key = var. kms_key_id != " " ? var. kms_key_id : " "
14
14
}
15
15
16
+ # ignored as decided by the user
17
+ # tfsec:ignore:aws-cloudwatch-log-group-customer-key
16
18
resource "aws_cloudwatch_log_group" "environment" {
17
19
count = var. runner_cloudwatch . enable ? 1 : 0
18
20
name = var. runner_cloudwatch . log_group_name != null ? var. runner_cloudwatch . log_group_name : var. environment
@@ -22,7 +24,6 @@ resource "aws_cloudwatch_log_group" "environment" {
22
24
tags = local. tags
23
25
24
26
# ignored as decided by the user
25
- # tfsec:ignore:aws-cloudwatch-log-group-customer-key
26
27
# checkov:skip=CKV_AWS_158:Encryption can be enabled by user
27
28
kms_key_id = local. kms_key_arn
28
29
}
Original file line number Diff line number Diff line change @@ -41,9 +41,10 @@ resource "aws_s3_bucket" "build_cache" {
41
41
resource "aws_s3_bucket_versioning" "build_cache_versioning" {
42
42
bucket = aws_s3_bucket. build_cache . id
43
43
44
+ # ok as decided by the user
45
+ # tfsec:ignore:aws-s3-enable-versioning
44
46
versioning_configuration {
45
47
# ok as decided by the user
46
- # tfsec:ignore:aws-s3-enable-versioning
47
48
# kics-scan ignore-line
48
49
status = var. cache_bucket_versioning ? " Enabled" : " Suspended"
49
50
}
Original file line number Diff line number Diff line change @@ -28,13 +28,14 @@ resource "aws_cloudwatch_event_target" "terminate_instances" {
28
28
arn = aws_lambda_function. terminate_runner_instances . arn
29
29
}
30
30
31
+ # ok as encryption can be activated by the user
32
+ # tfsec:ignore:aws-cloudwatch-log-group-customer-key
31
33
resource "aws_cloudwatch_log_group" "lambda" {
32
34
name = " /aws/lambda/${ var . environment } -${ var . name } "
33
35
# checkov:skip=CKV_AWS_338:There is no need to store the logs for 1+ years. They are not critical.
34
36
retention_in_days = var. cloudwatch_logging_retention_in_days
35
37
36
38
# ok as encryption can be activated by the user
37
- # tfsec:ignore:aws-cloudwatch-log-group-customer-key
38
39
# checkov:skip=CKV_AWS_158:Encryption can be activated by the user
39
40
kms_key_id = var. kms_key_id
40
41
Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ resource "aws_vpc_security_group_egress_rule" "docker_autoscaler_egress" {
43
43
}
44
44
45
45
# tracing functions can be activated by the user
46
- # tfsec:ignore:aws-lambda-enable-tracing
47
46
# kics-scan ignore-line
47
+ # tfsec:ignore:aws-lambda-enable-tracing
48
48
resource "aws_lambda_function" "terminate_runner_instances" {
49
49
# ts:skip=AC_AWS_0485:Tracing functions can be activated by the user
50
50
# checkov:skip=CKV_AWS_50:Tracing functions can be activated by the user
Original file line number Diff line number Diff line change @@ -775,7 +775,8 @@ variable "runner_worker_docker_autoscaler_instance" {
775
775
EOT
776
776
777
777
type = object ({
778
- ebs_optimized = optional (bool , true )
778
+ ebs_optimized = optional (bool , true )
779
+ # TODO should always be "required", right? https://aquasecurity.github.io/tfsec/v1.28.0/checks/aws/ec2/enforce-launch-config-http-token-imds/
779
780
http_tokens = optional (string , " required" )
780
781
http_put_response_hop_limit = optional (number , 2 )
781
782
monitoring = optional (bool , false )
You can’t perform that action at this time.
0 commit comments