You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Today if you try to scan YAML that's not necessary a playbook the provider throws unmarshall errors. We should validate the code to some degree and throw a friendly error message if we can't parse the code.
Example where I scan defaults/main.yml from our ansible role:
cnspec scan ansible main.yml
→ found a new version for 'ansible' provider installed=10.0.0 latest=11.0.0
→ successfully installed ansible provider path=/Users/tsmith/.config/mondoo/providers/ansible version=11.0.0
→ loaded configuration from /Users/tsmith/.config/mondoo/mondoo.yml using source default
→ using service account credentials
→ discover related assets for 1 asset(s)
x unable to create runtime for asset error="rpc error: code = Unknown desc = yaml: unmarshal errors:\n line 7: cannot unmarshal !!map into play.Playbook" asset=
Asset:
-------
error: rpc error: code = Unknown desc = yaml: unmarshal errors:
line 7: cannot unmarshal !!map into play.Playbook
The text was updated successfully, but these errors were encountered:
Describe the bug
Today if you try to scan YAML that's not necessary a playbook the provider throws unmarshall errors. We should validate the code to some degree and throw a friendly error message if we can't parse the code.
Example where I scan defaults/main.yml from our ansible role:
The text was updated successfully, but these errors were encountered: