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

change cms security group #6655

Merged
merged 1 commit into from
Jun 19, 2024
Merged

change cms security group #6655

merged 1 commit into from
Jun 19, 2024

Conversation

robertsweetman
Copy link
Contributor

No description provided.

@robertsweetman robertsweetman requested review from a team as code owners June 19, 2024 11:20
@github-actions github-actions bot added the environments-repository Used to exclude PRs from this repo in our Slack PR update label Jun 19, 2024
@robertsweetman robertsweetman had a problem deploying to nomis-combined-reporting-development June 19, 2024 11:22 — with GitHub Actions Failure
@robertsweetman robertsweetman had a problem deploying to nomis-combined-reporting-test June 19, 2024 11:22 — with GitHub Actions Failure
@robertsweetman robertsweetman merged commit 0b9c1c5 into main Jun 19, 2024
12 of 15 checks passed
@robertsweetman robertsweetman deleted the ncr/cms-ingress-sg branch June 19, 2024 11:22
Copy link
Contributor

Trivy Scan Failed

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/nomis-combined-reporting


Running Trivy in terraform/environments/nomis-combined-reporting
2024-06-19T11:22:41Z INFO Need to update DB
2024-06-19T11:22:41Z INFO Downloading DB... repository="ghcr.io/aquasecurity/trivy-db:2"
2024-06-19T11:22:43Z INFO Vulnerability scanning is enabled
2024-06-19T11:22:43Z INFO Misconfiguration scanning is enabled
2024-06-19T11:22:43Z INFO Need to update the built-in policies
2024-06-19T11:22:43Z INFO Downloading the built-in policies...
53.79 KiB / 53.79 KiB [-----------------------------------------------------------] 100.00% ? p/s 0s2024-06-19T11:22:43Z INFO Secret scanning is enabled
2024-06-19T11:22:43Z INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-06-19T11:22:43Z INFO Please see also https://aquasecurity.github.io/trivy/v0.52/docs/scanner/secret/#recommendation for faster secret detection
2024-06-19T11:22:45Z INFO Number of language-specific files num=0
2024-06-19T11:22:45Z INFO Detected config files num=6

github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=v4.2.0/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf (terraform)

Tests: 7 (SUCCESSES: 6, FAILURES: 1, EXCEPTIONS: 0)
Failures: 1 (HIGH: 1, CRITICAL: 0)

HIGH: Bucket does not encrypt data with a customer managed key.
════════════════════════════════════════
Encryption using AWS keys provides protection for your S3 buckets. To increase control of the encryption and manage factors like rotation use customer managed keys.

See https://avd.aquasec.com/misconfig/avd-aws-0132
────────────────────────────────────────
github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=v4.2.0/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179
via github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=v4.2.0/main.tf:109-172 (module.s3-bucket)
via ../../modules/baseline/bastion_linux.tf:1-36 (module.bastion_linux[0])
via main.tf:37-208 (module.baseline)
────────────────────────────────────────
171 ┌ resource "aws_s3_bucket_server_side_encryption_configuration" "default" {
172 │ bucket = aws_s3_bucket.default.id
173 │ rule {
174 │ apply_server_side_encryption_by_default {
175 │ sse_algorithm = var.sse_algorithm
176 │ kms_master_key_id = (var.custom_kms_key != "") ? var.custom_kms_key : ""
177 │ }
178 │ }
179 └ }
────────────────────────────────────────

github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=v4.2.0/main.tf (terraform)

Tests: 7 (SUCCESSES: 5, FAILURES: 0, EXCEPTIONS: 2)
Failures: 0 (HIGH: 0, CRITICAL: 0)

github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=v7.1.0/main.tf (terraform)

Tests: 7 (SUCCESSES: 6, FAILURES: 1, EXCEPTIONS: 0)
Failures: 1 (HIGH: 1, CRITICAL: 0)

HIGH: Bucket does not encrypt data with a customer managed key.
════════════════════════════════════════
Encryption using AWS keys provides protection for your S3 buckets. To increase control of the encryption and manage factors like rotation use customer managed keys.

See https://avd.aquasec.com/misconfig/avd-aws-0132
────────────────────────────────────────
github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=v7.1.0/main.tf:171-179
via ../../modules/cost_usage_report/main.tf:17-36 (module.s3_bucket)
via ../../modules/baseline/cost_usage_report.tf:1-15 (module.cost_usage_report[0])
via main.tf:37-208 (module.baseline)
────────────────────────────────────────
171 ┌ resource "aws_s3_bucket_server_side_encryption_configuration" "default" {
172 │ bucket = aws_s3_bucket.default.id
173 │ rule {
174 │ apply_server_side_encryption_by_default {
175 │ sse_algorithm = var.sse_algorithm
176 │ kms_master_key_id = (var.custom_kms_key != "") ? var.custom_kms_key : ""
177 │ }
178 │ }
179 └ }
────────────────────────────────────────

trivy_exitcode=1

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

```hcl

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

Checkov will check the following folders:
terraform/environments/nomis-combined-reporting

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

Running Checkov in terraform/environments/nomis-combined-reporting
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
terraform scan results:

Passed checks: 120, Failed checks: 0, Skipped checks: 18


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.5.0)
tflint will check the following folders:
terraform/environments/nomis-combined-reporting

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

Running tflint in terraform/environments/nomis-combined-reporting
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Failed

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

Trivy will check the following folders:
terraform/environments/nomis-combined-reporting

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

Running Trivy in terraform/environments/nomis-combined-reporting
2024-06-19T11:22:41Z	INFO	Need to update DB
2024-06-19T11:22:41Z	INFO	Downloading DB...	repository="ghcr.io/aquasecurity/trivy-db:2"
2024-06-19T11:22:43Z	INFO	Vulnerability scanning is enabled
2024-06-19T11:22:43Z	INFO	Misconfiguration scanning is enabled
2024-06-19T11:22:43Z	INFO	Need to update the built-in policies
2024-06-19T11:22:43Z	INFO	Downloading the built-in policies...
53.79 KiB / 53.79 KiB [-----------------------------------------------------------] 100.00% ? p/s 0s2024-06-19T11:22:43Z	INFO	Secret scanning is enabled
2024-06-19T11:22:43Z	INFO	If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-06-19T11:22:43Z	INFO	Please see also https://aquasecurity.github.io/trivy/v0.52/docs/scanner/secret/#recommendation for faster secret detection
2024-06-19T11:22:45Z	INFO	Number of language-specific files	num=0
2024-06-19T11:22:45Z	INFO	Detected config files	num=6

github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=v4.2.0/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf (terraform)
===============================================================================================================================================================================================================================
Tests: 7 (SUCCESSES: 6, FAILURES: 1, EXCEPTIONS: 0)
Failures: 1 (HIGH: 1, CRITICAL: 0)

HIGH: Bucket does not encrypt data with a customer managed key.
════════════════════════════════════════
Encryption using AWS keys provides protection for your S3 buckets. To increase control of the encryption and manage factors like rotation use customer managed keys.

See https://avd.aquasec.com/misconfig/avd-aws-0132
────────────────────────────────────────
 github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=v4.2.0/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=568694e50e03630d99cb569eafa06a0b879a1239/main.tf:171-179
   via github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=v4.2.0/main.tf:109-172 (module.s3-bucket)
    via ../../modules/baseline/bastion_linux.tf:1-36 (module.bastion_linux[0])
     via main.tf:37-208 (module.baseline)
────────────────────────────────────────
 171resource "aws_s3_bucket_server_side_encryption_configuration" "default" {
 172bucket = aws_s3_bucket.default.id
 173rule {
 174apply_server_side_encryption_by_default {
 175sse_algorithm     = var.sse_algorithm
 176kms_master_key_id = (var.custom_kms_key != "") ? var.custom_kms_key : ""
 177 │     }
 178 │   }
 179 └ }
────────────────────────────────────────



github.com/ministryofjustice/modernisation-platform-terraform-bastion-linux?ref=v4.2.0/main.tf (terraform)
==========================================================================================================
Tests: 7 (SUCCESSES: 5, FAILURES: 0, EXCEPTIONS: 2)
Failures: 0 (HIGH: 0, CRITICAL: 0)


github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=v7.1.0/main.tf (terraform)
======================================================================================================
Tests: 7 (SUCCESSES: 6, FAILURES: 1, EXCEPTIONS: 0)
Failures: 1 (HIGH: 1, CRITICAL: 0)

HIGH: Bucket does not encrypt data with a customer managed key.
════════════════════════════════════════
Encryption using AWS keys provides protection for your S3 buckets. To increase control of the encryption and manage factors like rotation use customer managed keys.

See https://avd.aquasec.com/misconfig/avd-aws-0132
────────────────────────────────────────
 github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=v7.1.0/main.tf:171-179
   via ../../modules/cost_usage_report/main.tf:17-36 (module.s3_bucket)
    via ../../modules/baseline/cost_usage_report.tf:1-15 (module.cost_usage_report[0])
     via main.tf:37-208 (module.baseline)
────────────────────────────────────────
 171resource "aws_s3_bucket_server_side_encryption_configuration" "default" {
 172bucket = aws_s3_bucket.default.id
 173rule {
 174apply_server_side_encryption_by_default {
 175sse_algorithm     = var.sse_algorithm
 176kms_master_key_id = (var.custom_kms_key != "") ? var.custom_kms_key : ""
 177 │     }
 178 │   }
 179 └ }
────────────────────────────────────────


trivy_exitcode=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
environments-repository Used to exclude PRs from this repo in our Slack PR update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants