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

Commenting out irrelevant checkov checks #215

Merged
merged 5 commits into from
Sep 14, 2023
Merged

Commenting out irrelevant checkov checks #215

merged 5 commits into from
Sep 14, 2023

Conversation

SteveLinden
Copy link
Contributor

No description provided.

@SteveLinden SteveLinden requested a review from a team as a code owner September 13, 2023 14:33
@github-actions
Copy link
Contributor

TFSEC Scan Failed

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

TFSEC will check the following folders:
.

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

Running TFSEC in .
Excluding the following checks: AWS089, AWS099, AWS009, AWS097, AWS018

======================================================
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: 
https://github.com/aquasecurity/tfsec/discussions/1994
======================================================

Results #1-14 HIGH IAM policy document uses wildcarded action 's3:*' (14 similar results)
────────────────────────────────────────────────────────────────────────────────
  main.tf:135-142
────────────────────────────────────────────────────────────────────────────────
  123    data "aws_iam_policy_document" "ssm-admin-policy-doc" {
  ...  
  135actions = ["s3:*",
  136"ec2:*",
  137"ssm:*",
  138"cloudwatch:*",
  139"cloudformation:*",
  140"iam:*",
  141"lambda:*"
  ...  
────────────────────────────────────────────────────────────────────────────────
  Individual Causes
  - main.tf:123-145 (data.aws_iam_policy_document.ssm-admin-policy-doc) 14 instances
────────────────────────────────────────────────────────────────────────────────
          ID aws-iam-no-policy-wildcards
      Impact Overly permissive policies may grant access to sensitive resources
  Resolution Specify the exact permissions required, and to which resources they should apply instead of using wildcards.

  More Information
  - https://aquasecurity.github.io/tfsec/latest/checks/aws/iam/no-policy-wildcards/
  - https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document
────────────────────────────────────────────────────────────────────────────────


Results #15-16 HIGH IAM policy document uses sensitive action 's3:*' on wildcarded resource '*' (2 similar results)
────────────────────────────────────────────────────────────────────────────────
  main.tf:143
────────────────────────────────────────────────────────────────────────────────
  123    data "aws_iam_policy_document" "ssm-admin-policy-doc" {
  ...  
  143  [     resources = ["*"]
  ...  
  145    }
────────────────────────────────────────────────────────────────────────────────
  Individual Causes
  - main.tf:123-145 (data.aws_iam_policy_document.ssm-admin-policy-doc) 2 instances
────────────────────────────────────────────────────────────────────────────────
          ID aws-iam-no-policy-wildcards
      Impact Overly permissive policies may grant access to sensitive resources
  Resolution Specify the exact permissions required, and to which resources they should apply instead of using wildcards.

  More Information
  - https://aquasecurity.github.io/tfsec/latest/checks/aws/iam/no-policy-wildcards/
  - https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document
────────────────────────────────────────────────────────────────────────────────


  timings
  ──────────────────────────────────────────
  disk i/o             269.603µs
  parsing              596.56365ms
  adaptation           408.607µs
  checks               36.510891ms
  total                633.752751ms

  counts
  ──────────────────────────────────────────
  modules downloaded   1
  modules processed    2
  blocks processed     73
  files read           8

  results
  ──────────────────────────────────────────
  passed               6
  ignored              4
  critical             0
  high                 16
  medium               0
  low                  0

  6 passed, 4 ignored, 16 potential problem(s) detected.

tfsec_exitcode=1

Checkov Scan Failed

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

Checkov will check the following folders:
.

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

Running Checkov in .
Excluding the following checks: CKV_GIT_1
2023-09-13 14:36:55,799 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=v7.0.0:None (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 28, Failed checks: 1, Skipped checks: 6

Check: CKV_TF_1: "Ensure Terraform module sources use a commit hash"
	FAILED for resource: module.ssm-auto-patching.s3-bucket
	File: /main.tf:3-57
	Calling File: /test/unit-test/main.tf:1-16

		Code lines for this resource are too many. Please use IDE of your choice to review the file.
github_actions scan results:

Passed checks: 175, Failed checks: 1, Skipped checks: 0

Check: CKV2_GHA_1: "Ensure top-level permissions are not set to write-all"
	FAILED for resource: on(Generate Terraform README docs)
	File: /.github/workflows/documentation.yml:0-1

checkov_exitcode=1

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.2.1)
tflint will check the following folders:
.

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

Running tflint in .
tflint_exitcode=0

@github-actions
Copy link
Contributor

TFSEC Scan Failed

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

TFSEC will check the following folders:
.

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

Running TFSEC in .
Excluding the following checks: AWS089, AWS099, AWS009, AWS097, AWS018

======================================================
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: 
https://github.com/aquasecurity/tfsec/discussions/1994
======================================================

Results #1-14 HIGH IAM policy document uses wildcarded action 's3:*' (14 similar results)
────────────────────────────────────────────────────────────────────────────────
  main.tf:135-142
────────────────────────────────────────────────────────────────────────────────
  123    data "aws_iam_policy_document" "ssm-admin-policy-doc" {
  ...  
  135actions = ["s3:*",
  136"ec2:*",
  137"ssm:*",
  138"cloudwatch:*",
  139"cloudformation:*",
  140"iam:*",
  141"lambda:*"
  ...  
────────────────────────────────────────────────────────────────────────────────
  Individual Causes
  - main.tf:123-145 (data.aws_iam_policy_document.ssm-admin-policy-doc) 14 instances
────────────────────────────────────────────────────────────────────────────────
          ID aws-iam-no-policy-wildcards
      Impact Overly permissive policies may grant access to sensitive resources
  Resolution Specify the exact permissions required, and to which resources they should apply instead of using wildcards.

  More Information
  - https://aquasecurity.github.io/tfsec/latest/checks/aws/iam/no-policy-wildcards/
  - https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document
────────────────────────────────────────────────────────────────────────────────


Results #15-16 HIGH IAM policy document uses sensitive action 's3:*' on wildcarded resource '*' (2 similar results)
────────────────────────────────────────────────────────────────────────────────
  main.tf:143
────────────────────────────────────────────────────────────────────────────────
  123    data "aws_iam_policy_document" "ssm-admin-policy-doc" {
  ...  
  143  [     resources = ["*"]
  ...  
  145    }
────────────────────────────────────────────────────────────────────────────────
  Individual Causes
  - main.tf:123-145 (data.aws_iam_policy_document.ssm-admin-policy-doc) 2 instances
────────────────────────────────────────────────────────────────────────────────
          ID aws-iam-no-policy-wildcards
      Impact Overly permissive policies may grant access to sensitive resources
  Resolution Specify the exact permissions required, and to which resources they should apply instead of using wildcards.

  More Information
  - https://aquasecurity.github.io/tfsec/latest/checks/aws/iam/no-policy-wildcards/
  - https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document
────────────────────────────────────────────────────────────────────────────────


  timings
  ──────────────────────────────────────────
  disk i/o             226.801µs
  parsing              397.896048ms
  adaptation           380.803µs
  checks               10.398166ms
  total                408.901818ms

  counts
  ──────────────────────────────────────────
  modules downloaded   1
  modules processed    2
  blocks processed     73
  files read           8

  results
  ──────────────────────────────────────────
  passed               6
  ignored              4
  critical             0
  high                 16
  medium               0
  low                  0

  6 passed, 4 ignored, 16 potential problem(s) detected.

tfsec_exitcode=1

Checkov Scan Failed

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

Checkov will check the following folders:
.

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

Running Checkov in .
Excluding the following checks: CKV_GIT_1
2023-09-13 15:23:44,560 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=8688bc15a08fbf5a4f4eef9b7433c5a417df8df1:None (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 29, Failed checks: 0, Skipped checks: 6

github_actions scan results:

Passed checks: 175, Failed checks: 1, Skipped checks: 0

Check: CKV2_GHA_1: "Ensure top-level permissions are not set to write-all"
	FAILED for resource: on(Generate Terraform README docs)
	File: /.github/workflows/documentation.yml:0-1

checkov_exitcode=1

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.2.1)
tflint will check the following folders:
.

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

Running tflint in .
tflint_exitcode=0

@ep-93 ep-93 merged commit b116a7e into main Sep 14, 2023
@ep-93 ep-93 deleted the fix/checkov-errors branch September 14, 2023 09:53
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