Overview

cloudburn scan

Run a static IaC scan against Terraform and CloudFormation files.


Synopsis

cloudburn scan [path] [flags]

Description

Runs a static analysis scan against Terraform (.tf) and CloudFormation (.json, .yaml, .yml) files. CloudBurn auto-detects file types — you don't need to specify which IaC format you're using.

When no [path] is provided, CloudBurn scans the current working directory recursively.

Arguments

ArgumentDescription
[path]Optional. Directory or file to scan. Defaults to the current working directory.

Flags

FlagTypeDefaultDescription
--configstringauto-discoveryPath to a .cloudburn.yml config file. Overrides automatic config discovery.
--enabled-rulesstringall rulesComma-separated list of rule IDs to include. All other rules are skipped.
--disabled-rulesstringnoneComma-separated list of rule IDs to exclude.
--servicestringall servicesComma-separated list of services to scan (e.g. ebs,ec2).
--exit-codebooleanfalseExit with code 1 when findings exist. Useful for CI gates.
--format"table" or "json""table"Output format. table for human-readable output; json for machine-readable.

Exit codes

CodeMeaning
0Scan completed with no findings, or --exit-code was not passed
1Findings exist and --exit-code was passed
2Runtime error (path not found, config parse error, etc.)

Examples

Scan the current directory:

cloudburn scan

Scan a specific path:

cloudburn scan ./infrastructure

Scan only EBS rules and fail CI on findings:

cloudburn scan --service ebs --exit-code

Output as JSON:

cloudburn --format json scan ./iac

Run only specific rules:

cloudburn scan --enabled-rules CLDBRN-AWS-EBS-1,CLDBRN-AWS-EC2-2

Use a non-default config file:

cloudburn scan --config ./configs/.cloudburn.yml

Example JSON output structure:

{
  "providers": [
    {
      "name": "aws",
      "rules": [
        {
          "id": "CLDBRN-AWS-EBS-1",
          "service": "ebs",
          "findings": [
            {
              "resourceId": "aws_ebs_volume.main",
              "path": "modules/storage/main.tf",
              "line": 12,
              "message": "EBS volume is not using gp3; migrate from gp2 to save up to 20% on storage costs"
            }
          ]
        }
      ]
    }
  ]
}

Rules

Rules evaluated by this scan are documented in Rules.

What's next

ConfigurationSet default flags in .cloudburn.yml
Exit CodesUse exit codes in CI/CD pipelines
CI/CD IntegrationFull GitHub Actions and GitLab CI examples