Skip to main content

MQL Reference

MQL is a lightweight, ultra-fast query language purpose-built for:

  • Searching and filtering infrastructure configuration data
  • Making checks about infrastructure configuration
  • Building security policies

For an introduction to MQL, read the MQL intro slide deck

To learn how to create queries, checks, and policies in MQL, read Write Effective MQL.

Resources

A resource is a source of information about an asset in your infrastructure, such as a file, a container image, or an AWS EC2 instance. We've organized MQL resources into packs to make it easy to find what you need.

Core resource pack: The core pack is essential for queries and checks against many different systems. Use it to retrieve information about users, files, packages, ports, and much more.

Operating system resource pack: Some of the resources in the operating system pack span different operating systems, while others are specific to a single operating system.

Network resource pack: The network pack includes resources for querying assets like host names and checking certificate contents.

Platform-specific resource packs: These specialized packs let you deep-dive into attributes unique to the platforms:

Learn more

  • To learn about querying your systems with MQL, read the cnquery docs.

  • To learn how to create queries, checks, and policies in MQL, read Write Effective MQL.