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

pin secure baselines tf provider to 5.38.0 #6494

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

richgreen-moj
Copy link
Contributor

@richgreen-moj richgreen-moj commented Mar 14, 2024

A reference to the issue / Description of it

#6486

How does this PR fix the problem?

Pinning the provider to the last version that worked successfully (v5.38.0) when running the 'secure-baselines' job in the scheduled baseline workflow.

This would be a temporary fix until there is more stability in the TF provider, I think completion of this issue should help remedy the situation hashicorp/terraform-provider-aws#36024

How has this been tested?

I've triggered scheduled baseline on this branch and it worked successfully first time... (pinned to v5.38.0) https://github.com/ministryofjustice/modernisation-platform/actions/runs/8341764086
I then tried triggering it on main again and it failed... (v5.41.0)
https://github.com/ministryofjustice/modernisation-platform/actions/runs/8342287044

Deployment Plan / Instructions

Will this deployment impact the platform and / or services on it?

{Please write here}

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}

Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy 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 Success

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

Trivy will check the following folders:

Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/core-network-services terraform/modules/firewall-policy


Running Trivy in terraform/environments/core-network-services
2024-03-19T10:56:15.933Z �[34mINFO�[0m Need to update DB
2024-03-19T10:56:15.933Z �[34mINFO�[0m DB Repository: ghcr.io/aquasecurity/trivy-db:2
2024-03-19T10:56:15.933Z �[34mINFO�[0m Downloading DB...
2024-03-19T10:56:18.273Z �[34mINFO�[0m Vulnerability scanning is enabled
2024-03-19T10:56:18.273Z �[34mINFO�[0m Misconfiguration scanning is enabled
2024-03-19T10:56:18.273Z �[34mINFO�[0m Need to update the built-in policies
2024-03-19T10:56:18.273Z �[34mINFO�[0m Downloading the built-in policies...
46.13 KiB / 46.13 KiB [-----------------------------------------------------------] 100.00% ? p/s 0s2024-03-19T10:56:18.848Z �[34mINFO�[0m Secret scanning is enabled
2024-03-19T10:56:18.848Z �[34mINFO�[0m If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-03-19T10:56:18.848Z �[34mINFO�[0m Please see also https://aquasecurity.github.io/trivy/v0.50/docs/scanner/secret/#recommendation for faster secret detection
2024-03-19T10:56:21.266Z �[34mINFO�[0m Number of language-specific files: 1
2024-03-19T10:56:21.266Z �[34mINFO�[0m Detecting gomod vulnerabilities...
2024-03-19T10:56:21.272Z �[34mINFO�[0m Detected config files: 8
2024-03-19T10:56:21.275Z �[34mINFO�[0m Some vulnerabilities have been ignored/suppressed. Use the "--show-suppressed" flag to display them.

test/go.mod (gomod)

Total: 0 (HIGH: 0, CRITICAL: 0)

iam.tf (terraform)

Tests: 21 (SUCCESSES: 0, FAILURES: 0, EXCEPTIONS: 21)
Failures: 0 (HIGH: 0, CRITICAL: 0)

trivy_exitcode=0


Running Trivy in terraform/modules/firewall-policy
2024-03-19T10:56:21.868Z �[34mINFO�[0m Vulnerability scanning is enabled
2024-03-19T10:56:21.868Z �[34mINFO�[0m Misconfiguration scanning is enabled
2024-03-19T10:56:21.868Z �[34mINFO�[0m Secret scanning is enabled
2024-03-19T10:56:21.868Z �[34mINFO�[0m If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-03-19T10:56:21.868Z �[34mINFO�[0m Please see also https://aquasecurity.github.io/trivy/v0.50/docs/scanner/secret/#recommendation for faster secret detection
2024-03-19T10:56:22.421Z �[34mINFO�[0m Number of language-specific files: 0
2024-03-19T10:56:22.421Z �[34mINFO�[0m Detected config files: 1
trivy_exitcode=0

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

```hcl

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

Checkov will check the following folders:
terraform/environments/core-network-services terraform/modules/firewall-policy

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

Running Checkov in terraform/environments/core-network-services
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-03-19 10:56:25,135 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-pagerduty-integration?ref=0179859e6fafc567843cd55c0b05d325d5012dc4:None (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 214, Failed checks: 0, Skipped checks: 88


checkov_exitcode=0

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

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

Passed checks: 3, Failed checks: 0, Skipped checks: 0


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/core-network-services terraform/modules/firewall-policy

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

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

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

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

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/core-network-services terraform/modules/firewall-policy

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

Running Trivy in terraform/environments/core-network-services
2024-03-19T10:56:15.933Z	�[34mINFO�[0m	Need to update DB
2024-03-19T10:56:15.933Z	�[34mINFO�[0m	DB Repository: ghcr.io/aquasecurity/trivy-db:2
2024-03-19T10:56:15.933Z	�[34mINFO�[0m	Downloading DB...
2024-03-19T10:56:18.273Z	�[34mINFO�[0m	Vulnerability scanning is enabled
2024-03-19T10:56:18.273Z	�[34mINFO�[0m	Misconfiguration scanning is enabled
2024-03-19T10:56:18.273Z	�[34mINFO�[0m	Need to update the built-in policies
2024-03-19T10:56:18.273Z	�[34mINFO�[0m	Downloading the built-in policies...
46.13 KiB / 46.13 KiB [-----------------------------------------------------------] 100.00% ? p/s 0s2024-03-19T10:56:18.848Z	�[34mINFO�[0m	Secret scanning is enabled
2024-03-19T10:56:18.848Z	�[34mINFO�[0m	If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-03-19T10:56:18.848Z	�[34mINFO�[0m	Please see also https://aquasecurity.github.io/trivy/v0.50/docs/scanner/secret/#recommendation for faster secret detection
2024-03-19T10:56:21.266Z	�[34mINFO�[0m	Number of language-specific files: 1
2024-03-19T10:56:21.266Z	�[34mINFO�[0m	Detecting gomod vulnerabilities...
2024-03-19T10:56:21.272Z	�[34mINFO�[0m	Detected config files: 8
2024-03-19T10:56:21.275Z	�[34mINFO�[0m	Some vulnerabilities have been ignored/suppressed. Use the "--show-suppressed" flag to display them.

test/go.mod (gomod)
===================
Total: 0 (HIGH: 0, CRITICAL: 0)


iam.tf (terraform)
==================
Tests: 21 (SUCCESSES: 0, FAILURES: 0, EXCEPTIONS: 21)
Failures: 0 (HIGH: 0, CRITICAL: 0)

trivy_exitcode=0

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

Running Trivy in terraform/modules/firewall-policy
2024-03-19T10:56:21.868Z	�[34mINFO�[0m	Vulnerability scanning is enabled
2024-03-19T10:56:21.868Z	�[34mINFO�[0m	Misconfiguration scanning is enabled
2024-03-19T10:56:21.868Z	�[34mINFO�[0m	Secret scanning is enabled
2024-03-19T10:56:21.868Z	�[34mINFO�[0m	If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-03-19T10:56:21.868Z	�[34mINFO�[0m	Please see also https://aquasecurity.github.io/trivy/v0.50/docs/scanner/secret/#recommendation for faster secret detection
2024-03-19T10:56:22.421Z	�[34mINFO�[0m	Number of language-specific files: 0
2024-03-19T10:56:22.421Z	�[34mINFO�[0m	Detected config files: 1
trivy_exitcode=0

@richgreen-moj richgreen-moj merged commit 1b79c5e into main Mar 19, 2024
716 checks passed
@richgreen-moj richgreen-moj deleted the bug/6486-API-rate-limiting-on-secure-baselines branch March 19, 2024 13:49
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