-
Notifications
You must be signed in to change notification settings - Fork 20
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
Issue with some Test Errors in cnquery Scans (Exchange server 2019) #4256
Comments
We also tried working around this issue using a Example
|
This blocks the completion of: https://github.com/mondoohq/cnspec-enterprise-policies/pull/917 |
can you provide the json that is causing problems |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary:
The scan runs successfully overall; however, some specific tests encounter errors consistently. The error message for these tests is:
Notably, these tests execute without any issues when run directly from the shell.
Text example: test.mql.yaml
The error appears when customer has several Connectors in this case.
Expected Behavior:
The test should pass without any errors during the cnquery scan, just as it does when the PowerShell command is executed directly from the shell.
Actual Behavior:
The test fails with the error: could not convert []interface {} to block.
Possible Cause:
The error suggests that there might be an issue with how cnquery processes the output of the PowerShell command or converts the JSON result.
Suggested Fix:
Investigate the output format of the PowerShell command and ensure it is compatible with the expected input format for cnquery.
Review the JSON parsing logic within cnquery to handle the output correctly.
Important:
Using .all() is not an option here, as in the case of single connector, it is not able to make a proper comparison as can be seen here:
The text was updated successfully, but these errors were encountered: