Skip to content

Improve Terraform checks in reusable workflow - #30

Merged
devpro merged 16 commits into
mainfrom
feature/terraform-validate-all
Nov 16, 2026
Merged

devpro merged 16 commits into
mainfrom
feature/terraform-validate-all

Conversation

@devpro

@devpro devpro commented Nov 12, 2026

Copy link
Copy Markdown
Owner

No description provided.

devpro and others added 16 commits November 12, 2026 11:24
A repository holds several modules, projects and examples, and the single init and validate at the working directory passed on an empty folder without checking any of them.
Each tracked configuration is now formatted, validated and linted on its own, a root configuration against its committed lock file, every check reporting even after one fails.
The provider cache is filled through TF_PLUGIN_CACHE_DIR, and Checkov and Trivy leave out the checkout of the workflow parts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A provider is a Go binary run with the credentials of a deployment, and pinned versions age without anyone noticing.
Every locked provider is compared with its latest stable release, a major version behind being a warning, and Trivy scans the provider binaries of the run, its findings reported as warnings and in the job summary.
The Trivy action scans a directory for vulnerabilities with the rootfs scan type, and the provider cache is no longer kept between runs, so the scan sees only the providers in use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NEKk93uuob4o7tgGpJPxh
mawk creates an array element as soon as an assignment names it, before the test of the same element on its right.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NEKk93uuob4o7tgGpJPxh
…rn about outdated TFLint plugins

One .tflint.hcl at the root then serves every configuration, and a plugin pinned to an exact version, as TFLint requires, falls behind without anything saying so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NEKk93uuob4o7tgGpJPxh
An installed package with known vulnerabilities shows the scan reads a directory the way the provider scan of the Terraform workflow needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NEKk93uuob4o7tgGpJPxh
Terraform 1.17.2, TFLint v0.66.0, Trivy 0.76.2, Syft 1.57.1, GoReleaser 2.20.2, mongosh 2.14.2, MongoDB server 9.0.8, Sonar scanner CLI 8.4.0.16527, ReportGenerator 5.6.0 and dotnet-sonarscanner 12.1.0.
scripts/check_updates.sh reads the pinned versions from the repository and compares them with the latest stable upstream releases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…check locked providers for updates

The fixture locks the latest hashicorp/local, whose vulnerabilities come from the Go version and modules it is built with, so only a new provider release clears the warning.
scripts/check_updates.sh now reports a provider of a lock file that is behind its latest release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NEKk6cC3kiJBK3MbLZdF6
… replace debian-node and debian-node-playwright with the Ubuntu 26.04 userland and default Node.js 24 of ubuntu-latest, as the GNU coreutils of Debian let pass a script the uutils coreutils of the runner fail

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndows runners, and build images without pushing them, so a CI checks the packaging that only the publication on main pushes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ds no package in a Windows image where Grype reads every .NET assembly and Windows binary

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NEKk8yDtgKD8Jc6uDbEN5
…here saving the image takes minutes for the gigabytes of its base layers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NEKk8yDtgKD8Jc6uDbEN5
…x binary left the SBOM step of a Windows job without a syft command

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… runner image may lack jq

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NEKk9DcKwty4dSHG41oPz
… failure of cygpath is not masked

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014NEKk9DcKwty4dSHG41oPz
…nd markdownlint-cli2 to 0.24.1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… updates, as they were left out of the update check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@devpro
devpro merged commit 398cf79 into main Nov 16, 2026
60 checks passed
@devpro
devpro deleted the feature/terraform-validate-all branch November 16, 2026 11:14
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.

1 participant