CLI Commands
cnspec
The cnspec CLI is a cloud-native security testing tool for assessing the security of your entire infrastructure.
cnspec is a cloud-native security testing tool for your entire infrastructure. Use it to scan assets for misconfigurations and vulnerabilities using security policies, so you can find and fix security issues before they become problems.
To learn more, read What Is cnspec?. To get started, read Installation Overview.
Options
--api-proxy string Set the proxy for communications with Mondoo Platform API
--auto-update Enable automatic updates of cnspec and its providers; overrides auto_update in the config file (default true)
--config string Set config file path (default $HOME/.config/mondoo/mondoo.yml)
-h, --help help for cnspec
--log-level string Set the log level: error, warn, info, debug, trace (default "info")
--logging-config string Path to a logging configuration file (YAML or JSON) that selects the log writer, level, and writer-specific options
--strict Default MQL strict mode for policies that do not declare one: every link in an MQL chain must resolve
-v, --verbose Enable verbose outputSEE ALSO
- cnspec aibom - Generate an AI bill of materials (AIBOM) for AI models across providers
- cnspec completion - Generate the autocompletion script for the specified shell
- cnspec discover - Discover assets
- cnspec framework - Manage local and Mondoo Platform hosted compliance frameworks
- cnspec integrate - Onboard integrations for continuous scanning into the Mondoo Platform
- cnspec login - Register with Mondoo Platform
- cnspec logout - Log out from Mondoo Platform
- cnspec lsp - Launch the MQL Language Server
- cnspec migrate - Migrate cnspec CLI configuration to the latest version
- cnspec policy - Manage local and upstream policies
- cnspec providers - Providers add connectivity to all assets
- cnspec run - Run an MQL query
- cnspec sbom - Experimental: Generate a software bill of materials (SBOM) for a given asset
- cnspec scan - Scan assets with one or more policies
- cnspec serve - Start cnspec in background mode
- cnspec shell - Interactive query shell for MQL
- cnspec status - Verify access to Mondoo Platform
- cnspec update - Update cnspec to the latest version
- cnspec vault - Manage vault environments
- cnspec version - Display the cnspec version
- cnspec vuln - Scan a target for vulnerabilities