CLI Commands
cnspec policy
Manage local and Mondoo Platform policies, including creating, uploading, enabling, and deleting policies.
Use cnspec policy subcommands to create, validate, upload, and manage security policies. Policies are collections of security checks written in MQL that cnspec uses to scan assets. These subcommands let you control which policies are active in your Mondoo Platform space, download them for local editing, and upload custom policies.
To learn about managing policies, read Manage Policies with cnspec. To learn how to write custom policies, read the Policy Authoring Guide.
Options
-h, --help help for policyOptions inherited from parent commands
--api-proxy string Set the proxy for communications with Mondoo Platform API
--auto-update Enable automatic provider installation and update (default true)
--config string Set config file path (default $HOME/.config/mondoo/mondoo.yml)
--log-level string Set the log level: error, warn, info, debug, trace (default "info")
-v, --verbose Enable verbose outputSEE ALSO
- cnspec - cnspec CLI
- cnspec policy delete - Delete a policy from the connected space
- cnspec policy disable - Disables a policy in the connected space
- cnspec policy download - download a policy to a local bundle file
- cnspec policy enable - Enables a policy in the connected space
- cnspec policy format - Apply style formatting to one or more policy bundles
- cnspec policy info - Show more info about a policy from the connected space
- cnspec policy init - Create an example policy bundle
- cnspec policy lint - Lint a policy bundle
- cnspec policy list - List enabled policies in the connected space
- cnspec policy upload - Upload a policy to the connected space