diff --git a/syft/pkg/cataloger/terraform/cataloger_test.go b/syft/pkg/cataloger/terraform/cataloger_test.go index dda41bdd7fa..1a03f489369 100644 --- a/syft/pkg/cataloger/terraform/cataloger_test.go +++ b/syft/pkg/cataloger/terraform/cataloger_test.go @@ -22,6 +22,7 @@ func TestTerraformCataloger(t *testing.T) { FoundBy: "terraform-lock-cataloger", Locations: file.NewLocationSet(location), Type: pkg.TerraformPkg, + Language: pkg.Go, PURL: "pkg:terraform/registry.terraform.io/hashicorp/aws@5.72.1", Metadata: pkg.TerraformLockEntry{ URL: "registry.terraform.io/hashicorp/aws", @@ -55,6 +56,7 @@ func TestTerraformCataloger(t *testing.T) { FoundBy: "terraform-lock-cataloger", Locations: file.NewLocationSet(location), Type: pkg.TerraformPkg, + Language: pkg.Go, PURL: "pkg:terraform/registry.terraform.io/hashicorp/google@6.8.0", Metadata: pkg.TerraformLockEntry{ URL: "registry.terraform.io/hashicorp/google", diff --git a/syft/pkg/cataloger/terraform/parse_tf_lock.go b/syft/pkg/cataloger/terraform/parse_tf_lock.go index 1976fd978f1..cde3ac9907d 100644 --- a/syft/pkg/cataloger/terraform/parse_tf_lock.go +++ b/syft/pkg/cataloger/terraform/parse_tf_lock.go @@ -39,11 +39,10 @@ func parseTerraformLock(_ context.Context, _ file.Resolver, _ *generic.Environme Version: provider.Version, Locations: file.NewLocationSet(reader.Location.WithAnnotation(pkg.EvidenceAnnotationKey, pkg.PrimaryEvidenceAnnotation)), Licenses: pkg.NewLicenseSet(), // TODO: license could be found in .terraform/providers/${name}/${version}/${arch}/LICENSE.txt - // TODO: Language? - Type: pkg.TerraformPkg, - // TODO: CPEs? - PURL: packageurl.NewPackageURL(packageurl.TypeTerraform, "", provider.URL, provider.Version, nil, "").String(), - Metadata: provider, + Language: pkg.Go, + Type: pkg.TerraformPkg, + PURL: packageurl.NewPackageURL(packageurl.TypeTerraform, "", provider.URL, provider.Version, nil, "").String(), + Metadata: provider, } p.SetID()