Replies: 2 comments 6 replies
-
|
Can you share a small reproducible example for this issue? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi @rogi-sh ! I cannot reproduce this issue on the latest version: ❯ cat main.tf
provider "aws" {
default_tags {
tags = {}
}
}%
❯ trivy conf main.tf
2025-09-25T15:18:50+06:00 INFO [misconfig] Misconfiguration scanning is enabled
2025-09-25T15:18:51+06:00 INFO [terraform scanner] Scanning root module file_path="."
2025-09-25T15:18:51+06:00 INFO Detected config files num=1
Report Summary
┌────────┬───────────┬───────────────────┐
│ Target │ Type │ Misconfigurations │
├────────┼───────────┼───────────────────┤
│ . │ terraform │ 0 │
└────────┴───────────┴───────────────────┘
Legend:
- '-': Not scanned
- '0': Clean (no security findings detected) |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
If a map is empty or null trivy config fails with value is null (go-cty/cty.Value.AsString)
Desired Behavior
Should skip null values
Actual Behavior
panic: value is null
goroutine 1 [running]:
github.com/zclconf/go-cty/cty.Value.AsString({{{0x6654470?, 0xc000289099?}}, {0x0?, 0x0?}})
/home/runner/go/pkg/mod/github.com/zclconf/[email protected]/cty/value_ops.go:1413 +0x10b
github.com/aquasecurity/trivy/pkg/iac/adapters/terraform/aws/provider.adaptDefaultTags.(*Attribute).AsMapValue.func1.1({{{0x6654470?, 0xc000289099?}}, {0x4839700?, 0xc0026ec6e0?}}, {{{0x6654470?, 0xc000289099?}}, {0x0?, 0x0?}})
/home/runner/work/trivy/trivy/pkg/iac/terrafo
Reproduction Steps
Target
None
Scanner
None
Output Format
None
Mode
None
Debug Output
Operating System
aquasec/trivy:0.66.0 in Gitlab Pipeline
Version
Checklist
trivy clean --allBeta Was this translation helpful? Give feedback.
All reactions