MatthewJohn / terrareg

Open source Terraform module registry with UI, optional Git integration and deep analysis
https://gitlab.dockstudios.co.uk/pub/terrareg
GNU General Public License v3.0
268 stars 20 forks source link

Incorrect Terraform version being used when code is scanned by tfsec #44

Closed mrmattyboy1 closed 3 months ago

mrmattyboy1 commented 3 months ago

Analytics are shown for tfsec when it scans modules

MatthewJohn commented 3 months ago

tfsec (v1.28.4) passes the following headers:

User-Agent: Go-http-client/1.1
X-Terraform-Version: 19.13.1

Terraform (1.4.5) passes the following headers:

User-Agent: Terraform/1.4.5
X-Terraform-Version: 1.4.5

I will look at ignoring X-Terraform-Version when the user agent does not conform to the Terraform/(\d+)\.(\d+)\.(\d+) format

MatthewJohn commented 3 months ago

Changes have been made in branch 519-ignore-terraform-version-from-tfsec-in-analytics

MatthewJohn commented 3 months ago

Created gitlab issue: https://gitlab.dockstudios.co.uk/pub/terrareg/-/issues/519 gitlab-issue-id:519

MatthewJohn commented 3 months ago

PR: https://gitlab.dockstudios.co.uk/pub/terrareg/-/merge_requests/404 This was fixed in 3.4.2 (b93a0846)