CLI Commands
cnspec policy graph
Build and query a graph of policies, checks, frameworks, and controls from policy bundle files.
Use cnspec policy graph subcommands to build and query a graph of policies, checks, frameworks, and controls from local .mql.yaml bundle files. These commands help you understand how the pieces of a bundle relate to each other: what a node references, what references it, and how nodes connect. This is useful when authoring or auditing large policy bundles.
Options
-h, --help help for graphOptions 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 - Manage local and upstream policies
- cnspec policy graph callees - Show what a node contains or references (outbound edges)
- cnspec policy graph callers - Show what references a node (inbound edges)
- cnspec policy graph context - Show LLM-friendly context with YAML snippets
- cnspec policy graph export - Export the full policy graph
- cnspec policy graph paths - Find paths between two nodes
- cnspec policy graph reachable - Show all nodes reachable from a node
- cnspec policy graph search - Search for nodes by name, title, or UID