CLI Commands
cnspec serve
Start cnspec in background mode to run scheduled security scans.
Run cnspec as a background service that performs scheduled security scans at regular intervals, so you get continuous security monitoring without manually triggering scans. Use --timer to set the scan interval and --splay to randomize the start time. This requires cnspec to be registered with Mondoo Platform.
Scan every 30 minutes with up to 5 minutes of random delay:
cnspec serve --timer 30 --splay 5Scan a set of assets defined in an inventory file:
cnspec serve --timer 60 --inventory-file inventory.ymlOptions
-h, --help help for serve
--inventory-file string Set the path to the inventory file
--splay int Randomize the timer by up to this many minutes (default 60)
--timer int Set the scan interval in minutes (default 60)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")
-v, --verbose Enable verbose outputSEE ALSO
- cnspec - cnspec CLI