Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(misconf): properly resolve local Terraform cache #7984

Closed
2 tasks done
nikpivkin opened this issue Nov 22, 2024 Discussed in #7981 · 0 comments · Fixed by #7983
Closed
2 tasks done

fix(misconf): properly resolve local Terraform cache #7984

nikpivkin opened this issue Nov 22, 2024 Discussed in #7981 · 0 comments · Fixed by #7983
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. scan/misconfiguration Issues relating to misconfiguration scanning
Milestone

Comments

@nikpivkin
Copy link
Contributor

We need to build the module key properly.

Discussed in #7981

Originally posted by marcinbelczewski November 22, 2024

Description

Because of how method Block.ModuleName in terraform package is implemented, Terraform modules nested more than two levels, fail to be resolved from Terraform cache.
For example for modules' hierarchy parent.child.grandchild, where the folder in .terraform folder carries exactly this name parent.child.grandchild, Block.ModuleName method produces a name parent.module.child.grandchild which does not match the folder on disk, hence the cache is not utilized.
Block.ModuleName method strips module prefix from only root and leaf modules.

I know how to fix this issue and can submit a PR.

Desired Behavior

Given the presence of the module in Terraform cache, all terraform modules in the hierarchy of modules, should be resolved from cache.

Actual Behavior

For three levels of hierarchy of modules, only the root module and the leaf module are resolved from cache, the middle module is being resolved from the source/registry.

Reproduction Steps

1. Create the following Terraform root module:

./main.tf:


terraform {}

module "level_1" {
  source = "./modules/level_1"
}


./modules/level_1/main.tf

```hcl
module "level_2" {
  source  = "../level_2"
}

./modules/level_2/main.tf

module "level_3" {
  source  = "../level_3"
}

./modules/level_3/main.tf

data "external" "example" {
  program = ["echo", "Hello From Level 3"]
}
  1. Invoke terraform init
  2. Run trivy config . -d
  3. Verfify the output of trivy to notice the presence of following entries:
DEBUG	[terraform evaluator] Using module from Terraform cache .terraform/modules	source="./modules/level_1"

DEBUG	[terraform evaluator] Using module from Terraform cache .terraform/modules	source="../level_2"

DEBUG	[terraform evaluator] Locating non-initialized module	source="../level_3"
DEBUG	[module resolver] Resolving module	name="module.level_1.module.level_2.module.level_3" source="../level_3"
DEBUG	[module resolver] Module resolved locally	name="module.level_1.module.level_2.module.level_3" file_path="modules/level_3"

It can be seen that modules level_1 and level_2 were indeed resolved from cache while module level_3 was not.



### Target

Config

### Scanner

Misconfiguration

### Output Format

None

### Mode

Standalone

### Debug Output

```bash
2024-11-21T18:44:23+01:00	DEBUG	No plugins loaded
2024-11-21T18:44:23+01:00	INFO	Loaded	file_path="trivy.yaml"
...
2024-11-21T18:44:23+01:00	DEBUG	Parsed severities	severities=[UNKNOWN LOW MEDIUM HIGH CRITICAL]
2024-11-21T18:44:23+01:00	INFO	[misconfig] Misconfiguration scanning is enabled
2024-11-21T18:44:23+01:00	DEBUG	[misconfig] Checks successfully loaded from disk
2024-11-21T18:44:23+01:00	DEBUG	Enabling misconfiguration scanners	scanners=[azure-arm cloudformation dockerfile helm kubernetes terraform terraformplan-json terraformplan-snapshot]
2024-11-21T18:44:23+01:00	DEBUG	Initializing scan cache...	type="memory"
2024-11-21T18:44:23+01:00	DEBUG	Skipping path	path=".git"
2024-11-21T18:44:23+01:00	DEBUG	[misconfig] Scanning files for misconfigurations...	scanner="Helm"
2024-11-21T18:44:23+01:00	DEBUG	[rego] Overriding filesystem for checks
2024-11-21T18:44:23+01:00	DEBUG	[rego] Embedded libraries are loaded	count=15
2024-11-21T18:44:23+01:00	DEBUG	[rego] Embedded checks are loaded	count=509
2024-11-21T18:44:23+01:00	DEBUG	[rego] Checks from disk are loaded	count=524
2024-11-21T18:44:23+01:00	DEBUG	[rego] Overriding filesystem for data
2024-11-21T18:44:24+01:00	DEBUG	[misconfig] Scanning files for misconfigurations...	scanner="Terraform"
2024-11-21T18:44:24+01:00	DEBUG	[terraform scanner] Scanning directory	file_path="."
2024-11-21T18:44:24+01:00	DEBUG	[rego] Overriding filesystem for checks
2024-11-21T18:44:24+01:00	DEBUG	[rego] Embedded libraries are loaded	count=15
2024-11-21T18:44:24+01:00	DEBUG	[rego] Embedded checks are loaded	count=509
2024-11-21T18:44:24+01:00	DEBUG	[rego] Checks from disk are loaded	count=524
2024-11-21T18:44:24+01:00	DEBUG	[rego] Overriding filesystem for data
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Setting project/module root	module="root" file_path="."
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing FS	module="root" file_path="."
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="root" file_path="main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="root" file_path="main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="root" file_path="terraform.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="root" file_path="terraform.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing FS	module="root" file_path="modules/filesystem"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="root" file_path="modules/filesystem/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="root" file_path="modules/filesystem/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="root" file_path="modules/filesystem/variables.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="root" file_path="modules/filesystem/variables.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing FS	module="root" file_path="modules/level_1"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="root" file_path="modules/level_1/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="root" file_path="modules/level_1/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing FS	module="root" file_path="modules/level_2"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="root" file_path="modules/level_2/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="root" file_path="modules/level_2/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing FS	module="root" file_path="modules/level_3"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="root" file_path="modules/level_3/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="root" file_path="modules/level_3/main.tf"
2024-11-21T18:44:24+01:00	INFO	[terraform scanner] Scanning root module	file_path="."
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Setting project/module root	module="root" file_path="."
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing FS	module="root" file_path="."
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="root" file_path="main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="root" file_path="main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="root" file_path="terraform.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="root" file_path="terraform.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Loading module	module="root" module="root"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Read block(s) and ignore(s)	module="root" blocks=2 ignores=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added input variables from tfvars	module="root" count=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Loaded module metadata for modules	module="root" file_path=".terraform/modules/modules.json" count=4
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Working directory for module evaluation	module="root" file_path="/Users/marcin.belczewski/spikes/trivy-fun"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting module evaluation...	path="."
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Module resolved using modules.json	block="module.level_1" source="" modulePath="modules/level_1"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing FS	module="level_1" file_path="modules/level_1"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="level_1" file_path="modules/level_1/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="level_1" file_path="modules/level_1/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Using module from Terraform cache .terraform/modules	source="./modules/level_1"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Loaded module	name="level_1" file_path="modules/level_1"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Loading module	module="level_1" module="level_1"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Read block(s) and ignore(s)	module="level_1" blocks=1 ignores=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added input variables from module definition	module="level_1" count=2
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Loaded module metadata for modules	module="level_1" file_path=".terraform/modules/modules.json" count=4
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Working directory for module evaluation	module="level_1" file_path="/Users/marcin.belczewski/spikes/trivy-fun"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting submodules evaluation...
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Evaluating submodule	name="level_1"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting module evaluation...	path="modules/level_1"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Module resolved using modules.json	block="module.level_1.module.level_2" source="" modulePath="modules/level_2"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing FS	module="level_2" file_path="modules/level_2"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="level_2" file_path="modules/level_2/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="level_2" file_path="modules/level_2/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Using module from Terraform cache .terraform/modules	source="../level_2"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Loaded module	name="level_2" file_path="modules/level_2"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Loading module	module="level_2" module="level_2"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Read block(s) and ignore(s)	module="level_2" blocks=1 ignores=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added input variables from module definition	module="level_2" count=2
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Loaded module metadata for modules	module="level_2" file_path=".terraform/modules/modules.json" count=4
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Working directory for module evaluation	module="level_2" file_path="/Users/marcin.belczewski/spikes/trivy-fun"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting submodules evaluation...
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Evaluating submodule	name="level_2"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting module evaluation...	path="modules/level_2"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Locating non-initialized module	source="../level_3"
2024-11-21T18:44:24+01:00	DEBUG	[module resolver] Resolving module	name="module.level_1.module.level_2.module.level_3" source="../level_3"
2024-11-21T18:44:24+01:00	DEBUG	[module resolver] Module resolved locally	name="module.level_1.module.level_2.module.level_3" file_path="modules/level_3"
2024-11-21T18:44:24+01:00	DEBUG	[module resolver] Module resolved	file_path="modules/level_3"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Module resolved	block="module.level_1.module.level_2.module.level_3" source="../level_3" prefix="" file_path="modules/level_3"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing FS	module="level_3" file_path="modules/level_3"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="level_3" file_path="modules/level_3/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="level_3" file_path="modules/level_3/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Loaded module	name="level_3" file_path="modules/level_3"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Loading module	module="level_3" module="level_3"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Read block(s) and ignore(s)	module="level_3" blocks=1 ignores=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added input variables from module definition	module="level_3" count=2
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Loaded module metadata for modules	module="level_3" file_path=".terraform/modules/modules.json" count=4
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Working directory for module evaluation	module="level_3" file_path="/Users/marcin.belczewski/spikes/trivy-fun"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting submodules evaluation...
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Evaluating submodule	name="level_3"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting module evaluation...	path="modules/level_3"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting post-submodules evaluation...
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Module evaluation complete.
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Submodule inputs unchanged	name="level_3"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] All submodules are evaluated	loop=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting post-submodule evaluation...
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Finished processing submodule(s).	count=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting post-submodules evaluation...
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Module evaluation complete.
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Submodule inputs unchanged	name="level_2"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] All submodules are evaluated	loop=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting post-submodule evaluation...
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Finished processing submodule(s).	count=2
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting post-submodules evaluation...
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Module evaluation complete.
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Submodule inputs unchanged	name="level_1"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] All submodules are evaluated	loop=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting post-submodule evaluation...
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Finished processing submodule(s).	count=3
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting post-submodules evaluation...
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Module evaluation complete.
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Finished parsing module	module="root"
2024-11-21T18:44:24+01:00	INFO	[terraform scanner] Scanning root module	file_path="modules/filesystem"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Setting project/module root	module="root" file_path="modules/filesystem"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing FS	module="root" file_path="modules/filesystem"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="root" file_path="modules/filesystem/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="root" file_path="modules/filesystem/main.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Parsing	module="root" file_path="modules/filesystem/variables.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added file	module="root" file_path="modules/filesystem/variables.tf"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Loading module	module="root" module="root"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Read block(s) and ignore(s)	module="root" blocks=3 ignores=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Added input variables from tfvars	module="root" count=0
2024-11-21T18:44:24+01:00	WARN	[terraform parser] Variable values was not found in the environment or variable files. Evaluating may not work correctly.	module="root" variables="name, subnet_ids, vpc_id"
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Working directory for module evaluation	module="root" file_path="/Users/marcin.belczewski/spikes/trivy-fun"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting module evaluation...	path="modules/filesystem"
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting post-submodules evaluation...
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=0
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Starting iteration	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Context unchanged	iteration=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform evaluator] Module evaluation complete.
2024-11-21T18:44:24+01:00	DEBUG	[terraform parser] Finished parsing module	module="root"
2024-11-21T18:44:24+01:00	DEBUG	[terraform executor] Adapting modules...
2024-11-21T18:44:24+01:00	DEBUG	[terraform executor] Adapted module(s) into state data.	count=4
2024-11-21T18:44:24+01:00	DEBUG	[terraform executor] Using max routines	count=11
2024-11-21T18:44:24+01:00	DEBUG	[terraform executor] Initialized Go check(s).	count=482
2024-11-21T18:44:24+01:00	DEBUG	[rego] Scanning inputs	count=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform executor] Finished applying rules.
2024-11-21T18:44:24+01:00	DEBUG	[terraform executor] Applying ignores...
2024-11-21T18:44:24+01:00	DEBUG	[terraform executor] Adapting modules...
2024-11-21T18:44:24+01:00	DEBUG	[terraform executor] Adapted module(s) into state data.	count=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform executor] Using max routines	count=11
2024-11-21T18:44:24+01:00	DEBUG	[terraform executor] Initialized Go check(s).	count=482
2024-11-21T18:44:24+01:00	DEBUG	[rego] Scanning inputs	count=1
2024-11-21T18:44:24+01:00	DEBUG	[terraform executor] Finished applying rules.
2024-11-21T18:44:24+01:00	DEBUG	[terraform executor] Applying ignores...
2024-11-21T18:44:24+01:00	DEBUG	OS is not detected.
2024-11-21T18:44:24+01:00	INFO	Detected config files	num=2
2024-11-21T18:44:24+01:00	DEBUG	Scanned config file	file_path="modules/filesystem"
2024-11-21T18:44:24+01:00	DEBUG	Scanned config file	file_path="."
2024-11-21T18:44:24+01:00	DEBUG	[vex] VEX filtering is disabled

Operating System

MacOs 14

Version

2024-11-21T18:54:25+01:00	INFO	Loaded	file_path="trivy.yaml"
Version: 0.57.0
Check Bundle:
  Digest: sha256:b381d8e123c2568845a65f751635033051b076e66c460ab0037b4084845c19de
  DownloadedAt: 2024-11-21 08:44:39.470903 +0000 UTC

Checklist

@nikpivkin nikpivkin added kind/bug Categorizes issue or PR as related to a bug. scan/misconfiguration Issues relating to misconfiguration scanning labels Nov 22, 2024
@nikpivkin nikpivkin self-assigned this Nov 22, 2024
@simar7 simar7 added this to the v0.58.0 milestone Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. scan/misconfiguration Issues relating to misconfiguration scanning
Projects
Status: No status
2 participants