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

Fix/checkov errors #162

Closed
wants to merge 6 commits into from
Closed

Fix/checkov errors #162

wants to merge 6 commits into from

Conversation

SteveLinden
Copy link
Contributor

There were a number of errors on checkov that did not appear appropriate in the test code. Added a skip to ignore these issues.

@SteveLinden SteveLinden requested a review from a team as a code owner December 5, 2023 11:32
Copy link
Contributor

github-actions bot commented Dec 5, 2023

TFSEC Scan Success

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

TFSEC will check the following folders:
.

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

Running TFSEC in .
Excluding the following checks: aws-cloudwatch-log-group-customer-key, aws-iam-no-policy-wildcards, aws-vpc-no-public-egress-sgr, aws-iam-block-kms-policy-wildcard, aws-vpc-add-description-to-security-group

======================================================
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
======================================================
  timings
  ──────────────────────────────────────────
  disk i/o             71.022µs
  parsing              248.142µs
  adaptation           82.283µs
  checks               3.37276ms
  total                3.774207ms

  counts
  ──────────────────────────────────────────
  modules downloaded   0
  modules processed    1
  blocks processed     19
  files read           4

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


No problems detected!

tfsec_exitcode=0

Checkov Scan Success

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

Checkov will check the following folders:
.

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

Running Checkov in .
Excluding the following checks: CKV_GIT_1
terraform scan results:

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

github_actions scan results:

Passed checks: 176, Failed checks: 0, Skipped checks: 0


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

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

Running tflint in .
13 issue(s) found:

Warning: variable "tags" is declared but not used (terraform_unused_declarations)

  on variables.tf line 1:
   1: variable "tags" {

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

Warning: variable "application_name" is declared but not used (terraform_unused_declarations)

  on variables.tf line 5:
   5: variable "application_name" {

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

Warning: variable "set_identifier" is declared but not used (terraform_unused_declarations)

  on variables.tf line 25:
  25: variable "set_identifier" {

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

Warning: variable "record" is declared but not used (terraform_unused_declarations)

  on variables.tf line 30:
  30: variable "record" {

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

Warning: variable "acm_certificate_needed" is declared but not used (terraform_unused_declarations)

  on variables.tf line 35:
  35: variable "acm_certificate_needed" {

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

Warning: variable "gandi_certificate_needed" is declared but not used (terraform_unused_declarations)

  on variables.tf line 40:
  40: variable "gandi_certificate_needed" {

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

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

  on variables.tf line 45:
  45: variable "ssm_private_key" {

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

Warning: variable "ssm_private_key" is declared but not used (terraform_unused_declarations)

  on variables.tf line 45:
  45: variable "ssm_private_key" {

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

Warning: variable "certificate_body" is declared but not used (terraform_unused_declarations)

  on variables.tf line 50:
  50: variable "certificate_body" {

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

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

  on variables.tf line 55:
  55: variable "certificate_chain" {

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

Warning: variable "certificate_chain" is declared but not used (terraform_unused_declarations)

  on variables.tf line 55:
  55: variable "certificate_chain" {

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

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

  on variables.tf line 59:
  59: variable "private_key" {

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

Warning: variable "private_key" is declared but not used (terraform_unused_declarations)

  on variables.tf line 59:
  59: variable "private_key" {

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

tflint_exitcode=2

test/unit-test/main.tf Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Dec 5, 2023

TFSEC Scan Success

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

TFSEC will check the following folders:
.

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

Running TFSEC in .
Excluding the following checks: aws-cloudwatch-log-group-customer-key, aws-iam-no-policy-wildcards, aws-vpc-no-public-egress-sgr, aws-iam-block-kms-policy-wildcard, aws-vpc-add-description-to-security-group

======================================================
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
======================================================
  timings
  ──────────────────────────────────────────
  disk i/o             63.658µs
  parsing              1.053047ms
  adaptation           129.891µs
  checks               7.653845ms
  total                8.900441ms

  counts
  ──────────────────────────────────────────
  modules downloaded   0
  modules processed    1
  blocks processed     19
  files read           4

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


No problems detected!

tfsec_exitcode=0

Checkov Scan Success

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

Checkov will check the following folders:
.

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

Running Checkov in .
Excluding the following checks: CKV_GIT_1
terraform scan results:

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

github_actions scan results:

Passed checks: 176, Failed checks: 0, Skipped checks: 0


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

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

Running tflint in .
13 issue(s) found:

Warning: variable "tags" is declared but not used (terraform_unused_declarations)

  on variables.tf line 1:
   1: variable "tags" {

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

Warning: variable "application_name" is declared but not used (terraform_unused_declarations)

  on variables.tf line 5:
   5: variable "application_name" {

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

Warning: variable "set_identifier" is declared but not used (terraform_unused_declarations)

  on variables.tf line 25:
  25: variable "set_identifier" {

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

Warning: variable "record" is declared but not used (terraform_unused_declarations)

  on variables.tf line 30:
  30: variable "record" {

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

Warning: variable "acm_certificate_needed" is declared but not used (terraform_unused_declarations)

  on variables.tf line 35:
  35: variable "acm_certificate_needed" {

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

Warning: variable "gandi_certificate_needed" is declared but not used (terraform_unused_declarations)

  on variables.tf line 40:
  40: variable "gandi_certificate_needed" {

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

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

  on variables.tf line 45:
  45: variable "ssm_private_key" {

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

Warning: variable "ssm_private_key" is declared but not used (terraform_unused_declarations)

  on variables.tf line 45:
  45: variable "ssm_private_key" {

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

Warning: variable "certificate_body" is declared but not used (terraform_unused_declarations)

  on variables.tf line 50:
  50: variable "certificate_body" {

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

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

  on variables.tf line 55:
  55: variable "certificate_chain" {

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

Warning: variable "certificate_chain" is declared but not used (terraform_unused_declarations)

  on variables.tf line 55:
  55: variable "certificate_chain" {

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

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

  on variables.tf line 59:
  59: variable "private_key" {

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

Warning: variable "private_key" is declared but not used (terraform_unused_declarations)

  on variables.tf line 59:
  59: variable "private_key" {

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

tflint_exitcode=2

@SteveLinden SteveLinden added this pull request to the merge queue Dec 5, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Dec 5, 2023
@SteveLinden SteveLinden added this pull request to the merge queue Dec 5, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Dec 5, 2023
@SteveLinden SteveLinden added this pull request to the merge queue Dec 5, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Dec 5, 2023
@SteveLinden SteveLinden added this pull request to the merge queue Dec 5, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Dec 5, 2023
@SteveLinden SteveLinden added this pull request to the merge queue Dec 5, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Dec 5, 2023
@SteveLinden SteveLinden requested a review from ep-93 December 5, 2023 13:57
@SteveLinden SteveLinden added this pull request to the merge queue Dec 5, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Dec 5, 2023
@dms1981 dms1981 added this pull request to the merge queue Dec 5, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Dec 5, 2023
@SteveLinden SteveLinden closed this Dec 5, 2023
@SteveLinden SteveLinden deleted the fix/checkov-errors branch December 5, 2023 15:51
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