Scanning Resources

Overview of nctl scan commands for Kubernetes clusters, Terraform, Dockerfiles, Helm charts, and more

nctl scan is the primary command group for scanning resources for policy violations and security misconfigurations. It supports a wide range of resource types — from live Kubernetes clusters and Git repositories to Terraform plans, Dockerfiles, and Helm charts — making it easy to shift-left security across your entire stack.

Subcommands

CommandDescription
nctl scan kubernetesScan Kubernetes resources from a live cluster or local manifests against Kyverno policies
nctl scan repositoryScan all supported resource types in a Git repository or local directory in a single command
nctl scan terraformScan Terraform plan files for policy violations
nctl scan dockerfileScan Dockerfiles for security and best-practice violations
nctl scan helmScan Helm charts for policy violations
nctl scan jsonScan arbitrary JSON-formatted resources
nctl scan github-actionsScan GitHub Actions workflow files for security vulnerabilities
nctl scan complianceRun a compliance scan against a Kubernetes cluster for a named standard (SOC2, NIST 800-53, PCI-DSS, etc.)
nctl scan prompt[Experimental] Scan LLM prompts for policy violations
nctl scan skills[Experimental] Scan agent skills

Output Formats

Most scan commands support multiple output formats via the -o / --output flag:

FormatDescription
textHuman-readable terminal output (default)
jsonMachine-readable JSON
yamlYAML output
scan-reportStructured scan report
sarifSARIF format for GitHub Code Scanning integration

Use --file to save output to a file instead of printing to stdout.

Publishing Reports

Use --publish to send scan results to Nirmata Control Hub (NCH) for centralized visibility and sharing across your team.

AI-Powered Analysis

Add --analyze to a cluster scan to get AI-powered insights and recommendations on the results.

For a fully interactive, AI-driven scanning and policy workflow, see the AI Platform Assistant.