mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-21 23:00:42 -08:00
fix(misconf): properly resolve local Terraform cache (#7983)
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io> Co-authored-by: simar7 <1254783+simar7@users.noreply.github.com>
This commit is contained in:
@@ -90,9 +90,9 @@ func (e *evaluator) loadModuleFromTerraformCache(ctx context.Context, b *terrafo
|
||||
var modulePath string
|
||||
if e.moduleMetadata != nil {
|
||||
// if we have module metadata we can parse all the modules as they'll be cached locally!
|
||||
name := b.ModuleName()
|
||||
moduleKey := b.ModuleKey()
|
||||
for _, module := range e.moduleMetadata.Modules {
|
||||
if module.Key == name {
|
||||
if module.Key == moduleKey {
|
||||
modulePath = path.Clean(path.Join(e.projectRootPath, module.Dir))
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user