feat: Add end-to-end Terraform EOL scanning support - #602
Open
hellonico wants to merge 3 commits into
Open
Conversation
…raform provider EOL detection - Add xeol/pkg/cataloger/terraform: walks dirs for .terraform.lock.hcl, parses provider blocks with a stdlib line scanner (no HCL v2 dep needed) - Inject cataloger output into xeol/pkg provider.Provide() for dir: inputs, converting Provider records to xeol.Package with pkg:terraform/... PURLs - Add ProductID FK to CycleModel so GetCyclesByPurl JOIN works correctly - Rewrite cmd/db-gen: seeds both Terraform binary + hashicorp/aws provider EOL cycles; cube-plus-infra aws@4.67.0 now flagged as EOL (841 days)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #601
Description
Adds end-to-end End-of-Life (EOL) scanning support for Terraform infrastructure.
Currently, the Xeol scanner does not detect EOL Terraform providers or binaries. As infrastructure-as-code matures, catching deprecated Terraform providers hidden deep in environment sub-folders is critical to preventing breaking changes and maintaining security compliance.
Implementation Details
This PR encompasses three core components to bypass upstream Syft limitations and provide full Terraform support:
xeol/pkg/cataloger/terraform)v1.10.0) lacks native Terraform support, this introduces a lightweight, zero-dependency cataloger..terraform.lock.hclfiles, parses provider blocks, and emits them asxeol.Packageobjects.xeol/matcher/terraform)pkg:terraform/PURL prefix and evaluates them against the local SQLite database.cmd/db-gen)CycleModelschema to includeproduct_idfor correct SQLJOINqueries.cmd/db-gen/main.go) that demonstrates how to map Terraform binary data fromendoflife.dateand static HashiCorp provider lifecycles into the internalxeol-dbschema.Type of change
Validation
v4.67.0, accurately flagging it as 800+ days past EOL).