nctl scan json

nctl scan json

scan json resources

nctl scan json [flags]

Examples


  # Basic scan with required resource and policy file
  nctl scan json -r path/to/file -p path/to/policy

  # Scan with audit mode enabled (violations reported as warnings)
  nctl scan json -r path/to/file -p path/to/policy --audit-as-warn

  # Scan with detailed results for violating resources
  nctl scan json -r path/to/file -p path/to/policy --details

  # Generate a scan report in JSON format
  nctl scan json -r path/to/file -p path/to/policy -o json --scan-report scan-report.json

   # Scan a JSON file and output results to console
  nctl scan json -r /path/to/file.json  -p /path/to/policy -o json

  # Specify output format and save results to a file with default name (scan-report.json)
  nctl scan json -r /path/to/file.json -p /path/to/policy -o json --file

  # Specify output format and save results to a file with user defined name
  nctl scan json -r /path/to/file.json -p /path/to/policy -o json --file=user-defined-name.json

  # Disable colored output in the terminal
  nctl scan json -r path/to/file -p path/to/policy --no-color

Options

      --audit-as-warn                 Report violations from policies in audit mode as warnings instead of failures
      --details                       Show result details for violating resources (default true)
      --file string[="scan-report"]   Output file (if --file is used without a value, defaults to 'scan-report')
  -h, --help                          help for json
      --insecure                      allow connection to an address with a self-signed or non-verifiable certificate (not recommended)
      --no-color                      disable the colors for the stdout reports
  -o, --output string                 Output format (text, json, yaml, scan-report) (default "text")
  -p, --policies strings              Path to policy files (local path, github URL, helm URL)
      --publish                       Publish reports
      --publish-token string          scan reports publish token
      --remediate string              Remediate resources ('show', 'patch')
      --report-sourceid string        Add source id for report created for local scan
  -r, --resources strings             Path to resource files (local path, github URL)
      --scan-report string            Output scan report file (in JSON format)
      --token string                  Nirmata API Login Key (env NIRMATA_TOKEN)
      --url string                    Nirmata server base URL (env NIRMATA_URL)

Options inherited from parent commands

  -v, --v Level   log level for V logs

SEE ALSO