triat / terraform-security-scan

Run a security scan on your terraform with the very nice https://github.com/aquasecurity/tfsec
MIT License
110 stars 30 forks source link

module github.com/hashicorp/terraform@latest found (v0.15.4), but does not contain package #40

Closed richstokes closed 3 years ago

richstokes commented 3 years ago

tfsec failing with:

build github.com/tfsec/tfsec/cmd/tfsec: cannot load github.com/hashicorp/terraform/lang/funcs: module github.com/hashicorp/terraform@latest found (v0.15.4), but does not contain package github.com/hashicorp/terraform/lang/funcs

Version 2.0.2 via github actions.

Full output:

go: finding github.com/tfsec/tfsec v0.39.40
go: downloading github.com/tfsec/tfsec v0.39.40
go: extracting github.com/tfsec/tfsec v0.39.40
go: downloading github.com/liamg/tml v0.4.0
go: downloading github.com/owenrumney/go-sarif v1.0.4
go: downloading github.com/spf13/cobra v1.1.3
go: downloading github.com/zclconf/go-cty v1.8.3
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/liamg/clinch v1.5.6
go: downloading github.com/zclconf/go-cty-yaml v1.0.2
go: downloading github.com/hashicorp/hcl v1.0.0
go: extracting github.com/liamg/tml v0.4.0
go: extracting github.com/owenrumney/go-sarif v1.0.4
go: downloading github.com/hashicorp/terraform v0.15.3
go: extracting github.com/hashicorp/hcl v1.0.0
go: extracting github.com/zclconf/go-cty-yaml v1.0.2
go: extracting github.com/spf13/cobra v1.1.3
go: extracting gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: extracting github.com/zclconf/go-cty v1.8.3
go: downloading github.com/hashicorp/hcl/v2 v2.10.0
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
go: downloading github.com/hashicorp/go-version v1.3.0
go: downloading golang.org/x/text v0.3.5
go: extracting github.com/olekukonko/tablewriter v0.0.5
go: extracting github.com/inconshreveable/mousetrap v1.0.0
go: extracting github.com/hashicorp/hcl/v2 v2.10.0
go: downloading github.com/apparentlymart/go-textseg v1.0.0
go: downloading github.com/mattn/go-runewidth v0.0.12
go: extracting github.com/inconshreveable/go-update v0.0.0-20160112193335-8152e7eb6ccf
go: extracting github.com/hashicorp/go-version v1.3.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/agext/levenshtein v1.2.2
go: extracting github.com/agext/levenshtein v1.2.2
go: downloading github.com/mitchellh/go-wordwrap v1.0.0
go: extracting github.com/apparentlymart/go-textseg v1.0.0
go: extracting github.com/mattn/go-runewidth v0.0.12
go: downloading github.com/rivo/uniseg v0.2.0
go: extracting github.com/spf13/pflag v1.0.5
go: downloading github.com/apparentlymart/go-textseg/v13 v13.0.0
go: extracting github.com/mitchellh/go-wordwrap v1.0.0
go: extracting github.com/liamg/clinch v1.5.6
go: extracting github.com/rivo/uniseg v0.2.0
go: extracting github.com/apparentlymart/go-textseg/v13 v13.0.0
go: downloading golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
go: extracting github.com/hashicorp/terraform v0.15.3
go: extracting golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
go: downloading golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf
go: extracting golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf
go: downloading golang.org/x/sys v0.0.0-20201119102817-f84b799fce68
go: extracting golang.org/x/sys v0.0.0-20201119102817-f84b799fce68
go: extracting golang.org/x/text v0.3.5
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/google/uuid v1.2.0
go: extracting github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/bmatcuk/doublestar v1.1.5
go: downloading github.com/hashicorp/go-uuid v1.0.1
go: downloading github.com/apparentlymart/go-cidr v1.1.0
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: extracting github.com/hashicorp/go-multierror v1.1.1
go: extracting github.com/google/uuid v1.2.0
go: extracting github.com/bmatcuk/doublestar v1.1.5
go: extracting github.com/hashicorp/go-uuid v1.0.1
go: extracting github.com/apparentlymart/go-cidr v1.1.0
go: extracting github.com/hashicorp/errwrap v1.1.0
go: finding golang.org/x/text v0.3.6
go: finding github.com/hashicorp/go-uuid v1.0.2
go: finding golang.org/x/crypto latest
go: finding golang.org/x/sys latest
go: finding golang.org/x/term latest
go: finding github.com/mattn/go-runewidth v0.0.13
go: finding gopkg.in/yaml.v2 v2.4.0
go: finding github.com/mitchellh/go-wordwrap v1.0.1
go: finding github.com/google/uuid v1.2.0
go: finding github.com/rivo/uniseg v0.2.0
go: finding github.com/agext/levenshtein v1.2.3
go: finding github.com/hashicorp/go-version v1.3.0
go: finding github.com/liamg/tml v0.4.0
go: finding github.com/mitchellh/go-homedir v1.1.0
go: finding github.com/owenrumney/go-sarif v1.0.4
go: finding github.com/spf13/pflag v1.0.5
go: finding github.com/inconshreveable/go-update latest
go: finding github.com/olekukonko/tablewriter v0.0.5
go: finding github.com/hashicorp/go-multierror v1.1.1
go: finding github.com/liamg/clinch v1.5.6
go: finding github.com/hashicorp/terraform v0.15.4
go: finding github.com/zclconf/go-cty-yaml v1.0.2
go: finding github.com/apparentlymart/go-cidr v1.1.0
go: finding github.com/inconshreveable/mousetrap v1.0.0
go: finding github.com/hashicorp/errwrap v1.1.0
go: finding github.com/zclconf/go-cty v1.8.3
go: finding github.com/apparentlymart/go-textseg/v13 v13.0.0
go: finding github.com/bmatcuk/doublestar v1.3.4
go: finding github.com/spf13/cobra v1.1.3
go: finding github.com/hashicorp/hcl/v2 v2.10.0
go: downloading github.com/mattn/go-runewidth v0.0.13
go: downloading github.com/mitchellh/go-wordwrap v1.0.1
go: downloading golang.org/x/text v0.3.6
go: downloading github.com/agext/levenshtein v1.2.3
go: downloading github.com/hashicorp/terraform v0.15.4
go: downloading golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
go: extracting github.com/mattn/go-runewidth v0.0.13
go: extracting github.com/mitchellh/go-wordwrap v1.0.1
go: extracting github.com/agext/levenshtein v1.2.3
go: extracting golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
go: downloading golang.org/x/term v0.0.0-20210503060354-a79de5458b56
go: extracting golang.org/x/term v0.0.0-20210503060354-a79de5458b56
go: downloading golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea
go: extracting github.com/hashicorp/terraform v0.15.4
go: extracting golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea
go: extracting golang.org/x/text v0.3.6
build github.com/tfsec/tfsec/cmd/tfsec: cannot load github.com/hashicorp/terraform/lang/funcs: module github.com/hashicorp/terraform@latest found (v0.15.4), but does not contain package github.com/hashicorp/terraform/lang/funcs
/entrypoint.sh: line 18: /go/bin/tfsec: No such file or directory
richstokes commented 3 years ago

Oh, I see - there's a newer version. The README is listing an out dated version.

triat commented 3 years ago

I've updated the README, I'm not updating it every time I release it, as this is only an example and the values you have defined there might be outdated.