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 policy

Options 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")
      --logging-config string   Path to a logging configuration file (YAML or JSON) that selects the log writer, level, and writer-specific options
  -v, --verbose                 Enable verbose output

SEE ALSO

On this page