Closed atomic111 closed 2 months ago
This is caused by the leading []
on the second row. This is difficult to understand by the MQL compiler. Alternatives are:
Semicolon
Semicolon explicitly separate to mql statements.
asset.family.contains('windows');
['Sophos Endpoint Defense', 'Sophos Endpoint Agent'].all(package(_).installed)
Ampersand
To make sure multiple queries are and-connected, we can use &&
. This is especially useful for asset filters since it is easy to understand.
asset.family.contains('windows') &&
['Sophos Endpoint Defense', 'Sophos Endpoint Agent'].all(package(_).installed)
We have the PR https://github.com/mondoohq/cnspec-policies/pull/421
cnspec lint fails with:
the filters for the query looks like:
if I adjust the query filter to:
then cnspec policy lints shows 'valid policy bundle'