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.yaml

Filter to a specific kind of node and limit the results:

cnspec policy graph search "password" my-policy.mql.yaml --kind check --limit 10

Options

  -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 key

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