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

DSOS-2927: permissions for letsencrypt acme v2 #7597

Merged
merged 5 commits into from
Aug 23, 2024

Conversation

drobinson-moj
Copy link
Contributor

Removing the LetsEncrypt permissions from hmpps-domain-services as that was just for a test
Adding them to PlanetFM web servers instead.
Corrected some other tags while at it.

@drobinson-moj drobinson-moj requested review from a team as code owners August 22, 2024 15:55
@github-actions github-actions bot added the environments-repository Used to exclude PRs from this repo in our Slack PR update label Aug 22, 2024
Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/hmpps-domain-services
terraform/environments/planetfm


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


Running Trivy in terraform/environments/planetfm
2024-08-22T15:57:47Z INFO [vuln] Vulnerability scanning is enabled
2024-08-22T15:57:47Z INFO [misconfig] Misconfiguration scanning is enabled
2024-08-22T15:57:47Z INFO [secret] Secret scanning is enabled
2024-08-22T15:57:47Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-08-22T15:57:47Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.54/docs/scanner/secret#recommendation for faster secret detection
2024-08-22T15:57:49Z INFO Number of language-specific files num=0
2024-08-22T15:57:49Z INFO Detected config files num=7
trivy_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/planetfm

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

Running Checkov in terraform/environments/hmpps-domain-services
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-08-22 15:57:52,063 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-ssm-patching.git?ref=v3.1.0:None (for external modules, the --download-external-modules flag is required)
2024-08-22 15:57:52,064 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-ssm-patching.git?ref=v3.0.0:None (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 126, Failed checks: 0, Skipped checks: 24


checkov_exitcode=0

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

Running Checkov in terraform/environments/planetfm
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
terraform scan results:

Passed checks: 137, Failed checks: 0, Skipped checks: 24


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/hmpps-domain-services
terraform/environments/planetfm

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

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

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

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

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/hmpps-domain-services
terraform/environments/planetfm

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

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

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

Running Trivy in terraform/environments/planetfm
2024-08-22T15:57:47Z	INFO	[vuln] Vulnerability scanning is enabled
2024-08-22T15:57:47Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-08-22T15:57:47Z	INFO	[secret] Secret scanning is enabled
2024-08-22T15:57:47Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-08-22T15:57:47Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.54/docs/scanner/secret#recommendation for faster secret detection
2024-08-22T15:57:49Z	INFO	Number of language-specific files	num=0
2024-08-22T15:57:49Z	INFO	Detected config files	num=7
trivy_exitcode=0

Copy link
Contributor

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/environments/hmpps-domain-services
terraform/environments/planetfm


Running Trivy in terraform/environments/hmpps-domain-services
2024-08-23T09:59:17Z INFO [db] Need to update DB
2024-08-23T09:59:17Z INFO [db] Downloading DB... repository="ghcr.io/aquasecurity/trivy-db:2"
2024-08-23T09:59:19Z INFO [vuln] Vulnerability scanning is enabled
2024-08-23T09:59:19Z INFO [misconfig] Misconfiguration scanning is enabled
2024-08-23T09:59:19Z INFO Need to update the built-in policies
2024-08-23T09:59:19Z INFO Downloading the built-in policies...
74.86 KiB / 74.86 KiB [-----------------------------------------------------------] 100.00% ? p/s 0s2024-08-23T09:59:19Z INFO [secret] Secret scanning is enabled
2024-08-23T09:59:19Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-08-23T09:59:19Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.54/docs/scanner/secret#recommendation for faster secret detection
2024-08-23T09:59:22Z INFO Number of language-specific files num=0
2024-08-23T09:59:22Z INFO Detected config files num=6
trivy_exitcode=0


Running Trivy in terraform/environments/planetfm
2024-08-23T09:59:22Z INFO [vuln] Vulnerability scanning is enabled
2024-08-23T09:59:22Z INFO [misconfig] Misconfiguration scanning is enabled
2024-08-23T09:59:22Z INFO [secret] Secret scanning is enabled
2024-08-23T09:59:22Z INFO [secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-08-23T09:59:22Z INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.54/docs/scanner/secret#recommendation for faster secret detection
2024-08-23T09:59:24Z INFO Number of language-specific files num=0
2024-08-23T09:59:24Z INFO Detected config files num=7
trivy_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/planetfm

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

Running Checkov in terraform/environments/hmpps-domain-services
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-08-23 09:59:27,142 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-ssm-patching.git?ref=v3.1.0:None (for external modules, the --download-external-modules flag is required)
2024-08-23 09:59:27,143 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-ssm-patching.git?ref=v3.0.0:None (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 126, Failed checks: 0, Skipped checks: 24


checkov_exitcode=0

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

Running Checkov in terraform/environments/planetfm
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
terraform scan results:

Passed checks: 137, Failed checks: 0, Skipped checks: 24


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/hmpps-domain-services
terraform/environments/planetfm

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

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

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

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

Trivy Scan Success

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

Trivy will check the following folders:
terraform/environments/hmpps-domain-services
terraform/environments/planetfm

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

Running Trivy in terraform/environments/hmpps-domain-services
2024-08-23T09:59:17Z	INFO	[db] Need to update DB
2024-08-23T09:59:17Z	INFO	[db] Downloading DB...	repository="ghcr.io/aquasecurity/trivy-db:2"
2024-08-23T09:59:19Z	INFO	[vuln] Vulnerability scanning is enabled
2024-08-23T09:59:19Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-08-23T09:59:19Z	INFO	Need to update the built-in policies
2024-08-23T09:59:19Z	INFO	Downloading the built-in policies...
74.86 KiB / 74.86 KiB [-----------------------------------------------------------] 100.00% ? p/s 0s2024-08-23T09:59:19Z	INFO	[secret] Secret scanning is enabled
2024-08-23T09:59:19Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-08-23T09:59:19Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.54/docs/scanner/secret#recommendation for faster secret detection
2024-08-23T09:59:22Z	INFO	Number of language-specific files	num=0
2024-08-23T09:59:22Z	INFO	Detected config files	num=6
trivy_exitcode=0

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

Running Trivy in terraform/environments/planetfm
2024-08-23T09:59:22Z	INFO	[vuln] Vulnerability scanning is enabled
2024-08-23T09:59:22Z	INFO	[misconfig] Misconfiguration scanning is enabled
2024-08-23T09:59:22Z	INFO	[secret] Secret scanning is enabled
2024-08-23T09:59:22Z	INFO	[secret] If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-08-23T09:59:22Z	INFO	[secret] Please see also https://aquasecurity.github.io/trivy/v0.54/docs/scanner/secret#recommendation for faster secret detection
2024-08-23T09:59:24Z	INFO	Number of language-specific files	num=0
2024-08-23T09:59:24Z	INFO	Detected config files	num=7
trivy_exitcode=0

@drobinson-moj drobinson-moj merged commit 2c65757 into main Aug 23, 2024
26 checks passed
@drobinson-moj drobinson-moj deleted the DSOS-2927/permissions-for-letsencrypt-acme-v2 branch August 23, 2024 10:13
georgepstaylor pushed a commit that referenced this pull request Sep 11, 2024
* add tags and policy for PlanetFM for LetsEncrypt certs

* undo last change

* update tag

* remove cert-cn tag, putting code in config management instead

* add azure DNS zones for backward compat
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