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
| Argument | Description |
|---|---|
[path] | Optional. Directory or file to scan. Defaults to the current working directory. |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--config | string | auto-discovery | Path to a .cloudburn.yml config file. Required to apply config in CI — see CI environments. |
--enabled-rules | string | AWS Core preset | Comma-separated list of rule IDs to include. Replaces the AWS Core preset for this scan. |
--disabled-rules | string | none | Comma-separated list of rule IDs to exclude from the selected set — the AWS Core preset, or your enabled-rules list when one is set. |
--service | string | all services | Comma-separated list of services to scan (e.g. ebs,ec2). |
--exit-code | boolean | false | Exit with code 1 when any active finding exists. Useful for CI gates. |
--fail-on | string | none | Exit with code 1 when an active finding meets or exceeds this severity: high, medium, or low. Can also be set as iac.fail-on in config. |
By default, CloudBurn runs the AWS Core preset for the mode you use. The account-wide opt-in rules that sit outside the preset (such as CLDBRN-AWS-TAGGING-1) are discovery-only, so they apply to cloudburn discover, not to static scans — config validation rejects rules that do not support the current scan mode. Enabling and Disabling Rules explains the preset; see Rules for the full catalog.
Suppressing findings inline
Terraform and CloudFormation YAML support resource-local exceptions. Put one of these comments immediately above or inside the resource; text after the directive is retained as an optional reason:
# cloudburn-ignore CLDBRN-AWS-EBS-1 migration scheduled
resource "aws_ebs_volume" "legacy" {
type = "gp2"
}
# cloudburn-ignore-all approved temporary exception
resource "aws_ebs_volume" "temporary" {
type = "gp2"
}
cloudburn-ignore <rule-id> [reason] suppresses a single rule for the annotated resource. cloudburn-ignore-all [reason] suppresses every rule for that resource. Suppressed findings stay visible in JSON output under suppressed, are counted in table output, and never fail --exit-code or --fail-on gates. CloudFormation JSON does not support comments and therefore cannot carry inline suppressions — use CloudFormation YAML or disabled-rules instead.
Exit codes
cloudburn scan exits 0 when no finding trips a gate, 1 when an active finding satisfies --exit-code or --fail-on, and 2 on runtime or usage errors such as a missing path or invalid config. The Exit codes guide has the full contract, including how suppressed findings interact with gates.
Examples
Scan the current directory:
cloudburn scan
Scan a specific path:
cloudburn scan ./infrastructure
Scan only EBS rules and fail CI on any finding:
cloudburn scan --service ebs --exit-code
Fail CI only on high-severity findings:
cloudburn scan --fail-on high
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 (required in CI to apply its rule selection, output defaults, or severity gate):
cloudburn scan --config ./configs/.cloudburn.yml
Example JSON output structure (the raw ScanResult object is serialized directly):
{
"providers": [
{
"provider": "aws",
"rules": [
{
"ruleId": "CLDBRN-AWS-EBS-1",
"service": "ebs",
"severity": "medium",
"source": "iac",
"message": "EBS volume is not using gp3; migrate from gp2 to save up to 20% on storage costs",
"findings": [
{
"resourceId": "aws_ebs_volume.main",
"location": {
"path": "modules/storage/main.tf",
"line": 12,
"column": 1
}
}
]
}
]
}
]
}
When any finding is suppressed by an inline cloudburn-ignore comment, the JSON result also carries a top-level suppressed array. The --fail-on verdict is not part of the JSON output — it surfaces only through the exit code:
{
"providers": [],
"suppressed": [
{
"provider": "aws",
"ruleId": "CLDBRN-AWS-EBS-1",
"service": "ebs",
"severity": "medium",
"source": "iac",
"message": "EBS volume is not using gp3; migrate from gp2 to save up to 20% on storage costs",
"finding": {
"resourceId": "aws_ebs_volume.legacy",
"location": { "path": "modules/storage/main.tf", "line": 12, "column": 1 }
},
"suppression": { "kind": "rule", "ruleId": "CLDBRN-AWS-EBS-1", "reason": "migration scheduled", "location": { "path": "modules/storage/main.tf", "line": 11, "column": 1 } }
}
]
}
Rules
Rules evaluated by this scan are documented in Rules.
What's next
| Configuration | Set default flags in .cloudburn.yml |
| Exit Codes | Use exit codes in CI/CD pipelines |
| CI/CD Integration | Full GitHub Actions and GitLab CI examples |