`.Label()` and `.Child()` for types panic on some map types
czunker opened this issue · comments
Christian Zunker commented
Describe the bug
We experienced a panic in the backend, when trying to call .Label()
or .Child()
on a map.
The panics happened here:
https://github.com/mondoohq/cnquery/blob/main/types/types.go#L271
and
https://github.com/mondoohq/cnquery/blob/main/types/types.go#L224
The resource which triggered this was most likely logindefs.params
.
Strange is, the resource is defined as map[string]string
:
cnquery/providers/os/resources/os.lr
Line 1036 in 3fd1be3
But created as
map[string]interface
:To Reproduce
Steps to reproduce the behavior:
- I'm not sure how to replicate this with cnquery directly.
Expected behavior
No panic.
Desktop (please complete the following information):
- cnquery v11.2.0 and os provider 11.1.0