Skip to content

KEH-674 + KEH-675 | Fix Terraform Linting Errors#12

Merged
TotalDwarf03 merged 7 commits into
mainfrom
KEH-674-5
Aug 20, 2025
Merged

KEH-674 + KEH-675 | Fix Terraform Linting Errors#12
TotalDwarf03 merged 7 commits into
mainfrom
KEH-674-5

Conversation

@TotalDwarf03

@TotalDwarf03 TotalDwarf03 commented Aug 19, 2025

Copy link
Copy Markdown
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

What

In this PR, I will remove the follow linting errors from being excluded and address them properly:

  • CKV_AWS_115: Add a concurrent execution limit.
  • CKV_AWS_TF1/2: Pin remote Terraform modules to a particular GitHub commit. This is more secure than using an AWS TF Registry release.

Testing

Have any new tests been added as part of this issue? If not, try to explain why test coverage is not needed here.

  • Yes
  • No
    Please write a brief description of why test coverage is not necessary here.
  • Not as part of this ticket. (Could be done at a later point)

Documentation

Has any new documentation been written as part of this issue? We should try to keep documentation up to date
as new code is added, rather than leaving it for the future.

  • Yes
  • No
    Please write a brief description of why documentation is not necessary here.
  • Not as part of this ticket. (Could be done at a later point)

Related issues

KEH-674 + KEH-675 (Jira)

How to review

Linting should pass if this PR is successful.

@TotalDwarf03 TotalDwarf03 self-assigned this Aug 19, 2025
@github-actions

github-actions Bot commented Aug 19, 2025

Copy link
Copy Markdown
Contributor

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Warnings Elapsed time
⚠️ BASH bash-exec 4 2 0 0.02s
✅ BASH shellcheck 4 0 0 0.14s
✅ BASH shfmt 4 0 0 0.01s
✅ CSHARP csharpier 1 0 0 0.69s
✅ DOCKERFILE hadolint 1 0 0 0.14s
✅ JSON jsonlint 1 0 0 0.25s
✅ JSON prettier 1 0 0 0.56s
✅ JSON v8r 1 0 0 4.13s
✅ MARKDOWN markdownlint 11 0 0 1.0s
✅ MARKDOWN markdown-table-formatter 11 0 0 0.33s
✅ REPOSITORY checkov yes no no 25.55s
✅ REPOSITORY dustilock yes no no 0.01s
✅ REPOSITORY gitleaks yes no no 3.86s
✅ REPOSITORY grype yes no no 45.99s
✅ REPOSITORY kics yes no no 39.85s
✅ REPOSITORY secretlint yes no no 1.01s
✅ REPOSITORY syft yes no no 3.24s
✅ REPOSITORY trivy yes no no 12.09s
✅ REPOSITORY trivy-sbom yes no no 0.49s
✅ TERRAFORM terraform-fmt 6 0 0 0.47s
✅ YAML prettier 8 0 0 0.66s
✅ YAML v8r 8 0 0 8.63s
✅ YAML yamllint 8 0 0 0.53s

See detailed report in MegaLinter reports

You could have same capabilities but better runtime performances if you request a new MegaLinter flavor.

MegaLinter is graciously provided by OX Security

@TotalDwarf03 TotalDwarf03 requested a review from a team August 19, 2025 14:52
Comment thread terraform/service/eventbridge.tf Outdated
# version = "4.1.0"

# Pin to a git commit instead. This is the same as the above.
source = "git::https://github.com/terraform-aws-modules/terraform-aws-eventbridge.git?ref=3e8657cd925d5b4a21301a09b67d8081f24bcfc3"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was raised as a false positive - bridgecrewio/checkov#6354. The tool itself checkov makes use of version for modules.

- Update Makefile to use V8 docker container.
- Update Megalint action to use V8 instead of a specific commit hash.
- Add an ignore rule to Kics to ignore version pin instead of commit hash.
Comment thread .github/workflows/mega-linter.yml Fixed
@TotalDwarf03 TotalDwarf03 requested a review from mwirikia August 20, 2025 09:31
@TotalDwarf03 TotalDwarf03 merged commit 71a482a into main Aug 20, 2025
5 checks passed
@TotalDwarf03 TotalDwarf03 deleted the KEH-674-5 branch August 20, 2025 09:45
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.

4 participants