Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update VPC modules to optionally send flow logs to S3 #8002

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

dms1981
Copy link
Contributor

@dms1981 dms1981 commented Sep 20, 2024

A reference to the issue / Description of it

#7607

How does this PR fix the problem?

Adds configuration to optionally send VPC flow logs to S3

How has this been tested?

Changes currently not invoked but will be in a following PR

Deployment Plan / Instructions

Deploy through CI

Checklist (check x in [ ] of list items)

  • I have performed a self-review of my own code
  • All checks have passed
  • I have made corresponding changes to the documentation
  • Plan and discussed how it should be deployed to PROD (If needed)

Additional comments (if any)

{Please write here}

@dms1981 dms1981 requested a review from a team as a code owner September 20, 2024 15:08
Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/modules/vpc-hub
terraform/modules/vpc-inspection


Running Trivy in terraform/modules/vpc-hub
2024-09-20T15:10:24Z INFO [db] Need to update DB
2024-09-20T15:10:24Z INFO [db] Downloading DB... repository="ghcr.io/aquasecurity/trivy-db:2"
2024-09-20T15:10:26Z INFO [vuln] Vulnerability scanning is enabled
2024-09-20T15:10:26Z INFO [misconfig] Misconfiguration scanning is enabled
2024-09-20T15:10:26Z INFO Need to update the built-in policies
2024-09-20T15:10:26Z INFO Downloading the built-in policies...
74.86 KiB / 74.86 KiB [-----------------------------------------------------------] 100.00% ? p/s 0s2024-09-20T15:10:26Z INFO [secret] Secret scanning is enabled
2024-09-20T15:10:26Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-09-20T15:10:26Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.55/docs/scanner/secret#recommendation for faster secret detection
2024-09-20T15:10:27Z INFO [terraform scanner] Scanning root module file_path="."
2024-09-20T15:10:27Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="tags_common, tags_prefix, vpc_cidr, vpc_flow_log_iam_role"
2024-09-20T15:10:27Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_subnet.data" value="cty.NilVal"
2024-09-20T15:10:27Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_subnet.private" value="cty.NilVal"
2024-09-20T15:10:27Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_subnet.public" value="cty.NilVal"
2024-09-20T15:10:27Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_subnet.transit-gateway" value="cty.NilVal"
2024-09-20T15:10:27Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_eip.public" value="cty.NilVal"
2024-09-20T15:10:27Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_nat_gateway.public" value="cty.NilVal"
2024-09-20T15:10:27Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_route.transit-gateway-nat" value="cty.NilVal"
2024-09-20T15:10:27Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_route.transit-gateway-tgw" value="cty.NilVal"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="main.tf:133-138"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:398-411"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:398-411"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:398-411"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:398-411"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:398-411"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:398-411"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:324-337"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:324-337"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:324-337"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:324-337"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:324-337"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:324-337"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:232"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:224-237"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:224-237"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:224-237"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:232"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:232"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:224-237"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:483"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:483"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:408"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:398-411"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:398-411"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:398-411"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:398-411"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:334"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:324-337"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:324-337"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:324-337"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:324-337"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:234"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:234"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:234"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:224-237"
2024-09-20T15:10:27Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:485"
2024-09-20T15:10:27Z INFO Number of language-specific files num=0
2024-09-20T15:10:27Z INFO Detected config files num=2
trivy_exitcode=0


Running Trivy in terraform/modules/vpc-inspection
2024-09-20T15:10:27Z INFO [vuln] Vulnerability scanning is enabled
2024-09-20T15:10:27Z INFO [misconfig] Misconfiguration scanning is enabled
2024-09-20T15:10:27Z INFO [secret] Secret scanning is enabled
2024-09-20T15:10:27Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-09-20T15:10:27Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.55/docs/scanner/secret#recommendation for faster secret detection
2024-09-20T15:10:28Z INFO [terraform scanner] Scanning root module file_path="."
2024-09-20T15:10:28Z WARN [terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly. module="root" variables="application_name, fw_allowed_domains, fw_home_net_ips, fw_kms_arn, fw_rules, tags_common, tags_prefix, vpc_cidr, vpc_flow_log_iam_role"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_subnet.inspection" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_subnet.public" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_subnet.transit-gateway" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_route.inspection-0-0-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_route.inspection-10-20-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_route.inspection-10-231-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_route.inspection-10-26-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_route.inspection-10-27-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_route.public-0-0-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_route.public-10-20-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_route.public-10-231-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_route.public-10-26-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="aws_route.public-10-27-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.inline_inspection_policy.dynamic.stateful_rule" value="cty.NilVal"
2024-09-20T15:10:28Z ERROR [terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable. block="module.inline_inspection_policy.dynamic.stateful_rule" value="cty.NilVal"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:278"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:278"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:278"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:278"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:376"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:376"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:376"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:376"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:184"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:184"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:184"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-excessive-port-access" range="main.tf:184"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-cloudwatch-log-group-customer-key" range="../firewall-logging/main.tf:21-26"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:280"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:267-283"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:378"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:365-381"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:186"
2024-09-20T15:10:28Z INFO [terraform executor] Ignore finding rule="aws-ec2-no-public-ingress-acl" range="main.tf:173-189"
2024-09-20T15:10:28Z INFO Number of language-specific files num=0
2024-09-20T15:10:28Z INFO Detected config files num=3
trivy_exitcode=0

</details> #### `Checkov Scan` Success
<details><summary>Show Output</summary>

```hcl

*****************************

Checkov will check the following folders:
terraform/modules/vpc-hub
terraform/modules/vpc-inspection

*****************************

Running Checkov in terraform/modules/vpc-hub
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
terraform scan results:

Passed checks: 50, Failed checks: 0, Skipped checks: 12


checkov_exitcode=0

*****************************

Running Checkov in terraform/modules/vpc-inspection
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
terraform scan results:

Passed checks: 53, Failed checks: 0, Skipped checks: 19


checkov_exitcode=0

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing "terraform" plugin...
Installed "terraform" (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.9.1)
tflint will check the following folders:
terraform/modules/vpc-hub
terraform/modules/vpc-inspection

*****************************

Running tflint in terraform/modules/vpc-hub
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

*****************************

Running tflint in terraform/modules/vpc-inspection
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

Show Output
*****************************

Trivy will check the following folders:
terraform/modules/vpc-hub
terraform/modules/vpc-inspection

*****************************

Running Trivy in terraform/modules/vpc-hub
2024-09-20T15:10:24Z	INFO	[db] Need to update DB
2024-09-20T15:10:24Z	INFO	[db] Downloading DB...	repository="ghcr.io/aquasecurity/trivy-db:2"
2024-09-20T15:10:26Z	INFO	[vuln] Vulnerability scanning is enabled
2024-09-20T15:10:26Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-09-20T15:10:26Z	INFO	Need to update the built-in policies
2024-09-20T15:10:26Z	INFO	Downloading the built-in policies...
74.86 KiB / 74.86 KiB [-----------------------------------------------------------] 100.00% ? p/s 0s2024-09-20T15:10:26Z	INFO	[secret] Secret scanning is enabled
2024-09-20T15:10:26Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-09-20T15:10:26Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.55/docs/scanner/secret#recommendation for faster secret detection
2024-09-20T15:10:27Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-09-20T15:10:27Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="tags_common, tags_prefix, vpc_cidr, vpc_flow_log_iam_role"
2024-09-20T15:10:27Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_subnet.data" value="cty.NilVal"
2024-09-20T15:10:27Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_subnet.private" value="cty.NilVal"
2024-09-20T15:10:27Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_subnet.public" value="cty.NilVal"
2024-09-20T15:10:27Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_subnet.transit-gateway" value="cty.NilVal"
2024-09-20T15:10:27Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_eip.public" value="cty.NilVal"
2024-09-20T15:10:27Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_nat_gateway.public" value="cty.NilVal"
2024-09-20T15:10:27Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_route.transit-gateway-nat" value="cty.NilVal"
2024-09-20T15:10:27Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_route.transit-gateway-tgw" value="cty.NilVal"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="main.tf:133-138"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:398-411"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:398-411"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:398-411"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:398-411"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:398-411"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:398-411"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:406"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:324-337"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:324-337"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:324-337"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:324-337"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:324-337"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:324-337"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:332"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:232"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:224-237"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:224-237"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:224-237"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:232"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:232"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:224-237"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:483"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:483"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:408"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:398-411"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:398-411"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:398-411"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:398-411"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:334"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:324-337"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:324-337"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:324-337"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:324-337"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:234"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:234"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:234"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:224-237"
2024-09-20T15:10:27Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:485"
2024-09-20T15:10:27Z	INFO	Number of language-specific files	num=0
2024-09-20T15:10:27Z	INFO	Detected config files	num=2
trivy_exitcode=0

*****************************

Running Trivy in terraform/modules/vpc-inspection
2024-09-20T15:10:27Z	INFO	[vuln] Vulnerability scanning is enabled
2024-09-20T15:10:27Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-09-20T15:10:27Z	INFO	[secret] Secret scanning is enabled
2024-09-20T15:10:27Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-09-20T15:10:27Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.55/docs/scanner/secret#recommendation for faster secret detection
2024-09-20T15:10:28Z	INFO	[terraform scanner] Scanning root module	file_path="."
2024-09-20T15:10:28Z	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="application_name, fw_allowed_domains, fw_home_net_ips, fw_kms_arn, fw_rules, tags_common, tags_prefix, vpc_cidr, vpc_flow_log_iam_role"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_subnet.inspection" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_subnet.public" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_subnet.transit-gateway" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_route.inspection-0-0-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_route.inspection-10-20-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_route.inspection-10-231-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_route.inspection-10-26-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_route.inspection-10-27-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_route.public-0-0-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_route.public-10-20-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_route.public-10-231-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_route.public-10-26-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="aws_route.public-10-27-0-0" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.inline_inspection_policy.dynamic.stateful_rule" value="cty.NilVal"
2024-09-20T15:10:28Z	ERROR	[terraform evaluator] Failed to expand block. Invalid "for-each" argument. Must be known and iterable.	block="module.inline_inspection_policy.dynamic.stateful_rule" value="cty.NilVal"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:278"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:278"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:278"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:278"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:376"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:376"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:376"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:376"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:184"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:184"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:184"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-excessive-port-access" range="main.tf:184"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-cloudwatch-log-group-customer-key" range="../firewall-logging/main.tf:21-26"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:280"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:267-283"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:378"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:365-381"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:186"
2024-09-20T15:10:28Z	INFO	[terraform executor] Ignore finding	rule="aws-ec2-no-public-ingress-acl" range="main.tf:173-189"
2024-09-20T15:10:28Z	INFO	Number of language-specific files	num=0
2024-09-20T15:10:28Z	INFO	Detected config files	num=3
trivy_exitcode=0

@dms1981 dms1981 added this pull request to the merge queue Sep 20, 2024
Merged via the queue into main with commit 129132f Sep 20, 2024
8 checks passed
@dms1981 dms1981 deleted the feature/7607-enable-logging-to-s3-for-core-accounts branch September 20, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants