CLI Commands
cnspec policy graph search
Search the policy graph for nodes by name, title, or UID.
Find nodes in the policy graph using multi-strategy search: exact name, prefix, or substring match across names, qualified names, and titles. Pass a search query and the path to the bundle file. Narrow the results with the filter flags.
Search for nodes matching a query:
cnspec policy graph search "password" my-policy.mql.yamlFilter to a specific kind of node and limit the results:
cnspec policy graph search "password" my-policy.mql.yaml --kind check --limit 10Options
-h, --help help for search
--impact int Minimum impact score
--json Output as JSON
--kind string Filter by node kind (policy, check, group, query, framework, control)
--limit int Maximum results (default 50)
--tag string Filter by tag keyOptions 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 outputSEE ALSO
- cnspec policy graph - Navigate policy bundle structure via graph commands