upbound / provider-terraform

A Crossplane provider for Terraform
https://marketplace.upbound.io/providers/upbound/provider-terraform/
Apache License 2.0
151 stars 59 forks source link

V0.16.0 upbound/provider-terraform image has CVE-2023-44487 and CVE-2023-39325 #270

Closed kanchan-dhamane closed 4 months ago

kanchan-dhamane commented 5 months ago

What happened?

We ran Trivy and Twistlock Scans on upbound/provider-terraform:v0.16.0 and found a few vulnerabilities. Following are the critical and high level vulnerabilities we would like to be addressed.

Here is the full Trivy scan report attached. tf-provider-scan.txt

How can we reproduce it?

Run the trivy scan on image

trivy image xpkg.upbound.io/upbound/provider-terraform:v0.16.0 > tf-provider-scan.txt

What environment did it happen in?

Notes

We did primary investigation. It seems that the version of golang.org/x/net and google.golang.org/grpc is already high enough in go.mod which does not contain these vulnerabilities, but the image seems to contain these old versions.

So one guess is the binaries are compiled with older versions.

bobh66 commented 4 months ago

The first two CVEs are reported against the terraform binary which we don't compile, we just install the pre-compiled executable. I am investigating if we can install terraform 1.5.7 which is the latest pre-BSL version, but I don't know if that resolved the two CVEs.

The third CVE is resolved by the latest renovate PR that patches go-getter to 1.7.5.