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

JML project-lambda-secrets-other modules #4584

Closed
wants to merge 28 commits into from
Closed

Conversation

murad-ali-MoJ
Copy link
Contributor

@murad-ali-MoJ murad-ali-MoJ commented Jan 17, 2024

This pull request adds the lambda function, secrets, and triggers other necessary components required for the lambda function

@github-actions github-actions bot added the environments-repository Used to exclude PRs from this repo in our Slack PR update label Jan 17, 2024
Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:

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

```hcl

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

Checkov will check the following folders:

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:

Trivy Scan

Show Output

Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:

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

```hcl

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

Checkov will check the following folders:

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:

Trivy Scan

Show Output

Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:

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

```hcl

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

Checkov will check the following folders:

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:

Trivy Scan

Show Output

Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:

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

```hcl

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

Checkov will check the following folders:

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:

Trivy Scan

Show Output

Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:

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

```hcl

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

Checkov will check the following folders:

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:

Trivy Scan

Show Output

WIP
Signed-off-by: Jacob Woffenden <[email protected]>
Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:

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

```hcl

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

Checkov will check the following folders:

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:

Trivy Scan

Show Output

Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:

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

```hcl

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

Checkov will check the following folders:

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:

Trivy Scan

Show Output

Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:

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

```hcl

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

Checkov will check the following folders:

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:

Trivy Scan

Show Output

Copy link
Contributor

TFSEC Scan Failed

Show Output ```hcl

TFSEC will check the following folders:
terraform/environments/planetfm


Running TFSEC in terraform/environments/planetfm
Excluding the following checks: AWS095

======================================================
tfsec is joining the Trivy family

tfsec will continue to remain available
for the time being, although our engineering
attention will be directed at Trivy going forward.

You can read more here:
aquasecurity/tfsec#1994

Result #1 MEDIUM Bucket does not have versioning enabled
────────────────────────────────────────────────────────────────────────────────
github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=v7.1.0/main.tf:184
via main.tf:33-139 (module.baseline)
────────────────────────────────────────────────────────────────────────────────
181 resource "aws_s3_bucket_versioning" "default" {
182 bucket = aws_s3_bucket.default.id
183 versioning_configuration {
184 [ status = (var.versioning_enabled != true) ? "Suspended" : "Enabled"
185 }
186 }
────────────────────────────────────────────────────────────────────────────────
ID aws-s3-enable-versioning
Impact Deleted or modified data would not be recoverable
Resolution Enable versioning to protect against accidental/malicious removal or modification

More Information

timings
──────────────────────────────────────────
disk i/o 1.781226ms
parsing 1.868117087s
adaptation 772.844µs
checks 9.647621ms
total 1.880318778s

counts
──────────────────────────────────────────
modules downloaded 1
modules processed 7
blocks processed 341
files read 81

results
──────────────────────────────────────────
passed 9
ignored 3
critical 0
high 0
medium 1
low 0

9 passed, 3 ignored, 1 potential problem(s) detected.

tfsec_exitcode=1

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

```hcl

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

Checkov will check the following folders:
terraform/environments/planetfm

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

Running Checkov in terraform/environments/planetfm
terraform scan results:

Passed checks: 110, Failed checks: 0, Skipped checks: 20


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/planetfm

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

Running tflint in terraform/environments/planetfm
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan

Show Output

Copy link
Contributor

TFSEC Scan Failed

Show Output ```hcl

TFSEC will check the following folders:
terraform/environments/planetfm


Running TFSEC in terraform/environments/planetfm
Excluding the following checks: AWS095

======================================================
tfsec is joining the Trivy family

tfsec will continue to remain available
for the time being, although our engineering
attention will be directed at Trivy going forward.

You can read more here:
aquasecurity/tfsec#1994

Result #1 MEDIUM Bucket does not have versioning enabled
────────────────────────────────────────────────────────────────────────────────
github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=v7.1.0/main.tf:184
via main.tf:33-139 (module.baseline)
────────────────────────────────────────────────────────────────────────────────
181 resource "aws_s3_bucket_versioning" "default" {
182 bucket = aws_s3_bucket.default.id
183 versioning_configuration {
184 [ status = (var.versioning_enabled != true) ? "Suspended" : "Enabled"
185 }
186 }
────────────────────────────────────────────────────────────────────────────────
ID aws-s3-enable-versioning
Impact Deleted or modified data would not be recoverable
Resolution Enable versioning to protect against accidental/malicious removal or modification

More Information

timings
──────────────────────────────────────────
disk i/o 1.645732ms
parsing 1.537278903s
adaptation 943.719µs
checks 9.054176ms
total 1.54892253s

counts
──────────────────────────────────────────
modules downloaded 1
modules processed 7
blocks processed 341
files read 81

results
──────────────────────────────────────────
passed 9
ignored 3
critical 0
high 0
medium 1
low 0

9 passed, 3 ignored, 1 potential problem(s) detected.

tfsec_exitcode=1

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

```hcl

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

Checkov will check the following folders:
terraform/environments/planetfm

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

Running Checkov in terraform/environments/planetfm
terraform scan results:

Passed checks: 110, Failed checks: 0, Skipped checks: 20


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/planetfm

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

Running tflint in terraform/environments/planetfm
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan

Show Output

Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:
terraform/environments/hmpps-domain-services terraform/environments/nomis terraform/modules/baseline_presets


Running TFSEC in terraform/environments/hmpps-domain-services
Excluding the following checks: AWS095

======================================================
tfsec is joining the Trivy family

tfsec will continue to remain available
for the time being, although our engineering
attention will be directed at Trivy going forward.

You can read more here:
aquasecurity/tfsec#1994

timings
──────────────────────────────────────────
disk i/o 1.544826ms
parsing 155.02574ms
adaptation 191.527µs
checks 3.952393ms
total 160.714486ms

counts
──────────────────────────────────────────
modules downloaded 0
modules processed 5
blocks processed 281
files read 76

results
──────────────────────────────────────────
passed 1
ignored 0
critical 0
high 0
medium 0
low 0

No problems detected!

tfsec_exitcode=0


Running TFSEC in terraform/environments/nomis
Excluding the following checks: AWS095

======================================================
tfsec is joining the Trivy family

tfsec will continue to remain available
for the time being, although our engineering
attention will be directed at Trivy going forward.

You can read more here:
aquasecurity/tfsec#1994

timings
──────────────────────────────────────────
disk i/o 1.833099ms
parsing 219.545675ms
adaptation 283.599µs
checks 9.954847ms
total 231.61722ms

counts
──────────────────────────────────────────
modules downloaded 0
modules processed 6
blocks processed 288
files read 78

results
──────────────────────────────────────────
passed 37
ignored 4
critical 0
high 0
medium 0
low 0

No problems detected!

tfsec_exitcode=0


Running TFSEC in terraform/modules/baseline_presets
Excluding the following checks: AWS095

======================================================
tfsec is joining the Trivy family

tfsec will continue to remain available
for the time being, although our engineering
attention will be directed at Trivy going forward.

You can read more here:
aquasecurity/tfsec#1994

timings
──────────────────────────────────────────
disk i/o 349.386µs
parsing 24.167815ms
adaptation 78.727µs
checks 3.1637ms
total 27.759628ms

counts
──────────────────────────────────────────
modules downloaded 0
modules processed 1
blocks processed 45
files read 20

results
──────────────────────────────────────────
passed 0
ignored 0
critical 0
high 0
medium 0
low 0

No problems detected!

tfsec_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/hmpps-domain-services terraform/environments/nomis terraform/modules/baseline_presets

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

Running Checkov in terraform/environments/hmpps-domain-services
terraform scan results:

Passed checks: 109, Failed checks: 0, Skipped checks: 20


checkov_exitcode=0

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

Running Checkov in terraform/environments/nomis
terraform scan results:

Passed checks: 134, Failed checks: 0, Skipped checks: 23


checkov_exitcode=0

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

Running Checkov in terraform/modules/baseline_presets

checkov_exitcode=0

CTFLint Scan Failed

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/hmpps-domain-services terraform/environments/nomis terraform/modules/baseline_presets

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

Running tflint in terraform/environments/hmpps-domain-services
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

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

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

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

Running tflint in terraform/modules/baseline_presets
Excluding the following checks: terraform_unused_declarations
2 issue(s) found:

Warning: `environment` variable has no type (terraform_typed_variables)

  on terraform/modules/baseline_presets/variables.tf line 1:
   1: variable "environment" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_typed_variables.md

Warning: `ip_addresses` variable has no type (terraform_typed_variables)

  on terraform/modules/baseline_presets/variables.tf line 7:
   7: variable "ip_addresses" {

Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.5.0/docs/rules/terraform_typed_variables.md

tflint_exitcode=2

Trivy Scan

Show Output

@murad-ali-MoJ murad-ali-MoJ had a problem deploying to data-platform-apps-and-tools-development January 19, 2024 16:22 — with GitHub Actions Failure
Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:

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

```hcl

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

Checkov will check the following folders:

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:

Trivy Scan

Show Output

Signed-off-by: Jacob Woffenden <[email protected]>
@jacobwoffenden jacobwoffenden had a problem deploying to data-platform-apps-and-tools-development January 19, 2024 16:39 — with GitHub Actions Failure
Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:

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

```hcl

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

Checkov will check the following folders:

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:

Trivy Scan

Show Output

Signed-off-by: Jacob Woffenden <[email protected]>
@jacobwoffenden jacobwoffenden had a problem deploying to data-platform-apps-and-tools-development January 19, 2024 16:50 — with GitHub Actions Failure
Signed-off-by: Jacob Woffenden <[email protected]>
Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:

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

```hcl

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

Checkov will check the following folders:

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:

Trivy Scan

Show Output

1 similar comment
Copy link
Contributor

TFSEC Scan Success

Show Output ```hcl

TFSEC will check the following folders:

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

```hcl

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

Checkov will check the following folders:

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:

Trivy Scan

Show Output

@jacobwoffenden jacobwoffenden had a problem deploying to data-platform-apps-and-tools-development January 19, 2024 16:52 — with GitHub Actions Failure
@murad-ali-MoJ murad-ali-MoJ changed the title added module to execute JML lambda JML project-lambda-secrets-other modules Jan 19, 2024
@murad-ali-MoJ murad-ali-MoJ had a problem deploying to data-platform-apps-and-tools-development January 19, 2024 16:56 — with GitHub Actions Failure
@murad-ali-MoJ murad-ali-MoJ had a problem deploying to data-platform-apps-and-tools-development January 19, 2024 16:57 — with GitHub Actions Failure
@murad-ali-MoJ murad-ali-MoJ marked this pull request as ready for review January 19, 2024 17:00
@murad-ali-MoJ murad-ali-MoJ requested a review from a team as a code owner January 19, 2024 17:00
@murad-ali-MoJ murad-ali-MoJ requested a review from jhpyke January 19, 2024 17:00
Copy link
Contributor

@jhpyke jhpyke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it's ready to ship

@murad-ali-MoJ murad-ali-MoJ had a problem deploying to data-platform-apps-and-tools-development January 19, 2024 17:01 — with GitHub Actions Failure
@murad-ali-MoJ murad-ali-MoJ temporarily deployed to data-platform-apps-and-tools-development January 19, 2024 17:09 — with GitHub Actions Inactive
@murad-ali-MoJ murad-ali-MoJ deleted the jml_lambda_module branch January 22, 2024 10:41
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.

3 participants