---
title: "nctl scan compliance diff"
diataxis: reference
applies_to:
  product: "nctl"
audience: ["developer","platform-engineer"]
last_updated: 2026-03-07
url: https://docs.nirmata.io/docs/nctl/commands/nctl_scan_compliance_diff/
---

## nctl scan compliance diff

Diff two compliance snapshots

```bash
nctl scan compliance diff [flags]
```

### Examples

```bash
  # Diff latest vs previous scan
  nctl scan compliance diff --standard soc2

  # Diff latest vs 30 days ago
  nctl scan compliance diff --standard soc2 --days 30

  # Diff two specific snapshots
  nctl scan compliance diff --standard soc2 --from 20240101-100000 --to 20240115-100000

  # Output as JSON
  nctl scan compliance diff --standard soc2 -o json
```

### Options

```text
      --days int          Compare latest snapshot vs N days ago
      --from string       Snapshot ID to compare from (older)
  -h, --help              help for diff
  -o, --output string     Output format (text, json, yaml) (default "text")
      --standard string   Compliance standard to diff
      --to string         Snapshot ID to compare to (newer, defaults to latest)
```text

### Options inherited from parent commands

```text
  -v, --v Level   number for the log level verbosity
```

### SEE ALSO

* [nctl scan compliance](nctl_scan_compliance.md)	 - Run a compliance scan against a Kubernetes cluster


