Overview

Types

TypeScript type definitions for the CloudBurn SDK.


All types are exported from @cloudburn/sdk and are available as TypeScript type imports.

Config types

CloudBurnConfig

type CloudBurnConfig = {
  discovery: CloudBurnModeConfig;
  iac: CloudBurnModeConfig;
};

Top-level configuration object. discovery controls live AWS scans; iac controls static IaC scans.

CloudBurnModeConfig

type CloudBurnModeConfig = {
  enabledRules?: string[];
  disabledRules?: string[];
  services?: string[];
  format?: ConfigOutputFormat;
};
FieldTypeDescription
enabledRulesstring[]Allowlist of rule IDs to run. If set, only these rules execute.
disabledRulesstring[]Denylist of rule IDs to skip.
servicesstring[]Filter to specific AWS services (e.g. ['ec2', 'ebs']).
formatConfigOutputFormatOutput format for CLI use.

ConfigOutputFormat

type ConfigOutputFormat = 'json' | 'table';

Scan result types

ScanResult

type ScanResult = {
  diagnostics?: ScanDiagnostic[];
  providers: ProviderFindingGroup[];
};
FieldTypeDescription
diagnosticsScanDiagnostic[]Access errors or warnings that did not stop the scan.
providersProviderFindingGroup[]Findings grouped by cloud provider.

ProviderFindingGroup

type ProviderFindingGroup = {
  provider: CloudProvider;
  rules: Finding[];
};
FieldTypeDescription
providerCloudProviderThe cloud provider for this group.
rulesFinding[]All rule findings for this provider.

Finding

type Finding = {
  ruleId: string;
  service: string;
  source: Source;
  message: string;
  findings: FindingMatch[];
};
FieldTypeDescription
ruleIdstringThe rule identifier (e.g. CLDBRN-AWS-EBS-1).
servicestringAWS service name (e.g. ebs).
sourceSourceWhether this came from 'iac' or 'discovery'.
messagestringHuman-readable description of the issue.
findingsFindingMatch[]Individual resources that triggered this rule.

FindingMatch

type FindingMatch = {
  resourceId: string;
  accountId?: string;
  region?: string;
  location?: SourceLocation;
};
FieldTypeDescription
resourceIdstringThe resource identifier or name.
accountIdstringAWS account ID (discovery scans only).
regionstringAWS region (discovery scans only).
locationSourceLocationFile location (IaC scans only).

SourceLocation

type SourceLocation = {
  path: string;
  line: number;
  column: number;
  endLine?: number;
  endColumn?: number;
};

Points to the specific position in an IaC file where the issue was found.

ScanDiagnostic

type ScanDiagnostic = {
  provider: CloudProvider;
  service: string;
  source: Source;
  status: 'access_denied';
  message: string;
  code?: string;
  details?: string;
  region?: string;
};

Represents a non-fatal error encountered during scanning, such as insufficient IAM permissions for a specific service or region.


Rule types

Rule

type Rule = {
  id: string;
  name: string;
  description: string;
  message: string;
  provider: CloudProvider;
  service: string;
  supports: Source[];
  // ...additional internal fields
};
FieldTypeDescription
idstringUnique rule identifier.
namestringShort display name.
descriptionstringDetailed explanation of what the rule checks.
messagestringThe finding message shown in results.
providerCloudProviderCloud provider this rule targets.
servicestringAWS service this rule targets.
supportsSource[]Whether the rule supports 'iac', 'discovery', or both.

BuiltInRuleMetadata

type BuiltInRuleMetadata = Pick<Rule, 'id' | 'name' | 'description' | 'provider' | 'service' | 'supports'>;

Serializable metadata subset of Rule. This is the type of entries in the builtInRuleMetadata constant array.

Source

type Source = 'discovery' | 'iac';

CloudProvider

type CloudProvider = 'aws' | 'azure' | 'gcp';

RegisteredRules

type RegisteredRules = {
  activeRules: Rule[];
};

Discovery types

AwsDiscoveryTarget

type AwsDiscoveryTarget =
  | { mode: 'current' }
  | { mode: 'all' }
  | { mode: 'region'; region: string };

Passed to discover() to control which regions are scanned.

AwsDiscoveryRegion

type AwsDiscoveryRegion = {
  region: string;
  type: 'local' | 'aggregator';
};

Returned by listEnabledDiscoveryRegions().

AwsDiscoveryRegionStatus

type AwsDiscoveryRegionStatus = {
  region: string;
  indexType?: 'local' | 'aggregator';
  isAggregator?: boolean;
  status: 'indexed' | 'not_indexed' | 'access_denied' | 'error' | 'unsupported';
  viewStatus?: string;
  errorCode?: string;
  notes?: string;
};

Per-region breakdown within AwsDiscoveryStatus.

AwsDiscoveryStatus

type AwsDiscoveryStatus = {
  aggregatorRegion?: string;
  accessibleRegionCount: number;
  coverage: 'full' | 'partial' | 'local_only' | 'none';
  indexedRegionCount: number;
  regions: AwsDiscoveryRegionStatus[];
  totalRegionCount: number;
  warning?: string;
};
FieldTypeDescription
aggregatorRegionstringRegion hosting the aggregator index, if one exists.
accessibleRegionCountnumberNumber of regions the SDK could access.
coveragestringOverall coverage level.
indexedRegionCountnumberNumber of regions with an active index.
regionsAwsDiscoveryRegionStatus[]Per-region status details.
totalRegionCountnumberTotal number of AWS regions checked.
warningstringOptional warning message.

AwsDiscoveryInitialization

type AwsDiscoveryInitialization = {
  status: 'CREATED' | 'EXISTING';
  indexType: 'local' | 'aggregator';
  aggregatorRegion: string;
  aggregatorAction: string;
  createdIndexCount: number;
  reusedIndexCount: number;
  regions: string[];
  coverage: string;
  verificationStatus: 'verified' | 'timed_out';
  observedStatus: AwsDiscoveryStatus;
  taskId?: string;
  warning?: string;
};

Returned by initializeDiscovery(). status: 'CREATED' means new indexes were created; 'EXISTING' means the setup was already in place.


IaC types

IaCResource

type IaCResource = {
  provider: CloudProvider;
  type: string;
  name: string;
  location?: SourceLocation;
  attributeLocations?: Record<string, SourceLocation>;
  attributes: Record<string, unknown>;
};

Represents a single infrastructure resource parsed from IaC files. Returned by parseIaC().

FieldTypeDescription
providerCloudProviderCloud provider.
typestringResource type (e.g. aws_ebs_volume).
namestringResource name as defined in the IaC file.
locationSourceLocationLocation of the resource block in the source file.
attributeLocationsRecord<string, SourceLocation>Per-attribute source locations.
attributesRecord<string, unknown>Resource configuration attributes.

Deprecated aliases

These types still work but are deprecated. Use the replacements shown.

DeprecatedReplacement
RuleConfigCloudBurnModeConfig
ScanSourceSource

What's next

Package ExportsAll named exports and their signatures
CloudBurnClientMethod reference with full parameter types
RulesBrowse available rules