Report Results
Control how cnspec reports scan results, including terminal output formats, JSON, YAML, CSV, and JUnit for CI/CD integration.
cnspec supports a variety of output formats for scan results. Use the -o (or --output) flag to choose the format:
cnspec scan local -o FORMATTerminal formats
These formats are designed for reading results directly in the terminal.
compact (default)
The default output format. It shows a summary of each policy with pass/fail counts and an overall score:
cnspec scan localfull
Shows detailed results for every check in every policy, including descriptions and remediation steps:
cnspec scan local -o fullsummary
Shows a high-level overview with scores per policy:
cnspec scan local -o summaryreport
Shows a formatted report suitable for sharing:
cnspec scan local -o reportMachine-readable formats
These formats are useful for automation, scripting, and integration with other tools.
json
Exports results as JSON. Use shell redirection to save to a file:
cnspec scan local -o json > results.jsonFor example, to scan a Kubernetes cluster and save the results:
cnspec scan k8s -o json > k8s-results.jsoncnspec also supports json-v1 and json-v2 format variants. Use json (the default variant)
unless you have a specific need for a particular schema version.
yaml
Exports results as YAML:
cnspec scan local -o yaml > results.yamlyaml-v1 and yaml-v2 variants.csv
Exports results as comma-separated values, useful for importing into spreadsheets or data analysis tools:
cnspec scan local -o csv > results.csvCI/CD integration
junit
Exports results in JUnit XML format, which most CI/CD platforms (GitHub Actions, GitLab CI, Jenkins, CircleCI) can parse to display test results:
cnspec scan local -o junit > results.xmlSave results to a file or AWS SQS
As an alternative to shell redirection, you can use the --output-target flag to write results directly to a local file or send them to an AWS SQS queue:
cnspec scan local -o json --output-target results.jsoncnspec scan local -o json --output-target https://sqs.us-east-1.amazonaws.com/123456789/my-queueView results in the Mondoo Console
When cnspec completes a scan, it provides a link to the Mondoo Console, where you can view graphical results.
You must register cnspec to see results in the Mondoo Console. To learn more, read Register cnspec with Mondoo Platform.

To open printer-friendly results in a new browser tab, select the print icon near the top-right corner of the Mondoo Console.