cloudburn 0.15.0 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +26 -0
  2. package/dist/cli.js +16 -2
  3. package/package.json +4 -2
package/README.md CHANGED
@@ -99,6 +99,12 @@ cloudburn discover
99
99
  cloudburn discover --region eu-central-1
100
100
  cloudburn discover --config .cloudburn.yml --enabled-rules CLDBRN-AWS-EBS-1
101
101
  cloudburn discover --enabled-rules CLDBRN-AWS-LAMBDA-4
102
+ cloudburn discover --enabled-rules CLDBRN-AWS-COSTOPTIMIZATIONHUB-1
103
+ cloudburn discover --enabled-rules CLDBRN-AWS-COSTOPTIMIZATIONHUB-2
104
+ cloudburn discover --enabled-rules CLDBRN-AWS-COSTOPTIMIZATIONHUB-3
105
+ cloudburn discover --enabled-rules CLDBRN-AWS-COSTOPTIMIZATIONHUB-4
106
+ cloudburn discover --enabled-rules CLDBRN-AWS-COSTOPTIMIZATIONHUB-5
107
+ cloudburn discover --enabled-rules CLDBRN-AWS-COSTOPTIMIZATIONHUB-6
102
108
  cloudburn discover --enabled-rules CLDBRN-AWS-TAGGING-1
103
109
  cloudburn discover --service ec2,s3
104
110
  cloudburn discover --fail-on high
@@ -109,9 +115,29 @@ cloudburn rules list --service ec2 --source discovery --severity high
109
115
 
110
116
  The discovery config equivalent is `discovery.fail-on`.
111
117
 
118
+ Discovery has a five-minute deadline. Use `--timeout <seconds>` to change it, for example `cloudburn discover --timeout 600`. If the deadline expires, the command exits with code 2 and reports the timeout.
119
+
112
120
  The CLI targets one region per run. Multi-region discovery remains available through the SDK and still needs an AWS Resource Explorer aggregator plus an unfiltered default view in the aggregator region.
113
121
  `CLDBRN-AWS-TAGGING-1` is opt-in and requires an accessible aggregator; a local-only setup cannot run account-wide tagging discovery.
114
122
  `CLDBRN-AWS-LAMBDA-4` is opt-in and requires AWS Compute Optimizer enrollment.
123
+ `CLDBRN-AWS-COSTOPTIMIZATIONHUB-1` through `CLDBRN-AWS-COSTOPTIMIZATIONHUB-6` are opt-in and require AWS Cost Optimization Hub enrollment. CloudBurn checks enrollment but never changes it. These rules use `cost-optimization-hub:ListEnrollmentStatuses`, `cost-optimization-hub:ListRecommendations`, and `cost-optimization-hub:GetRecommendation`, with `Resource: "*"`, plus `sts:GetCallerIdentity` for account scoping.
124
+
125
+ Rule 3 reports idle-capacity Stop, Delete, and ScaleIn recommendations. It never executes them. Missing enrollment,
126
+ denied access, and malformed evidence produce diagnostics. Review the exact action and rollback capability before acting.
127
+ Table output includes an Action column for these findings. Regional discovery limits recommendations to the selected Region.
128
+
129
+ `CLDBRN-AWS-COSTOPTIMIZATIONHUB-5` reviews AWS `Upgrade` recommendations for standalone EC2 instances, Auto Scaling groups, EBS volumes, RDS DB instances, and RDS DB instance storage. It preserves both configurations for generation review; rightsizing and Graviton migration use separate AWS actions. Unenrolled accounts, access denial, and incomplete required details produce unavailable diagnostics.
130
+
131
+ Rule 6 reports Graviton migration candidates for standalone EC2 instances, Auto Scaling groups, and RDS DB instances.
132
+ Review workload compatibility and rollback requirements before migrating. Unclassified workloads are not confirmed
133
+ compatible; unavailable evidence produces diagnostics. See the [SDK evidence contract](../sdk/README.md) for details.
134
+ Reservation findings include their AWS resource namespace in JSON and in the default table output.
135
+ `CLDBRN-AWS-COSTOPTIMIZATIONHUB-4` is also opt-in and uses the same Hub IAM actions for rightsizing recommendations
136
+ across EC2 instances and Auto Scaling groups, EBS, Lambda, ECS, RDS instances and storage, and Aurora cluster storage.
137
+ It reads recommendations across Regions for the current account through `us-east-1`. Missing enrollment, denied
138
+ access, or incomplete configurations produce diagnostics. The SDK exposes both typed configurations with
139
+ `includeEvaluationResources: true`; the CLI prints finding identities and diagnostics.
140
+ `CLDBRN-AWS-SAGEMAKER-3` uses Cost Explorer coverage data and remains available when Cost Optimization Hub is unavailable.
115
141
  Use `--debug` to print SDK and provider execution tracing to `stderr` without changing the normal `stdout` format.
116
142
 
117
143
  ## Shell Completion
package/dist/cli.js CHANGED
@@ -551,7 +551,9 @@ var scanColumns = [
551
551
  { key: "severity", header: "Severity" },
552
552
  { key: "source", header: "Source" },
553
553
  { key: "service", header: "Service" },
554
+ { key: "resourceType", header: "ResourceType" },
554
555
  { key: "resourceId", header: "ResourceId" },
556
+ { key: "actionType", header: "Action" },
555
557
  { key: "accountId", header: "AccountId" },
556
558
  { key: "region", header: "Region" },
557
559
  { key: "path", header: "Path" },
@@ -689,11 +691,13 @@ ${renderAsciiTable(diagnosticRows, diagnosticColumns)}`
689
691
  };
690
692
  var projectFindingRows = (result) => flattenScanResult(result).map(({ finding, message, provider, ruleId, service, severity, source }) => ({
691
693
  accountId: finding.accountId ?? "",
694
+ actionType: finding.actionType ?? "",
692
695
  message,
693
696
  path: finding.location?.path ?? "",
694
697
  provider,
695
698
  region: finding.region ?? "",
696
699
  resourceId: finding.resourceId,
700
+ resourceType: finding.resourceType ?? "",
697
701
  ruleId,
698
702
  service,
699
703
  severity,
@@ -1138,6 +1142,13 @@ var validateServiceList = (mode, services) => {
1138
1142
  };
1139
1143
 
1140
1144
  // src/commands/discover.ts
1145
+ var parseDiscoveryTimeout = (value) => {
1146
+ const seconds = Number(value);
1147
+ if (!Number.isInteger(seconds) || seconds < 1 || seconds > 2147483) {
1148
+ throw new InvalidArgumentError3("Timeout must be a whole number of seconds between 1 and 2147483.");
1149
+ }
1150
+ return seconds;
1151
+ };
1141
1152
  var parseDiscoveryServiceList = (value) => validateServiceList("discovery", parseServiceList(value)) ?? [];
1142
1153
  var describeInitializationMessage = (result) => {
1143
1154
  const baseMessage = result.indexType === "aggregator" ? result.aggregatorAction === "promoted" ? `Promoted the existing local Resource Explorer index in ${result.aggregatorRegion} to the aggregator.` : result.aggregatorAction === "created" ? `Configured ${result.aggregatorRegion} as the Resource Explorer aggregator.` : result.coverage === "full" ? `Resource Explorer aggregator already exists in ${result.aggregatorRegion}.` : `Resource Explorer aggregator already exists in ${result.aggregatorRegion}, but only ${result.observedStatus.indexedRegionCount} of ${result.observedStatus.totalRegionCount} regions are indexed.` : result.status === "EXISTING" ? `Local Resource Explorer setup already exists in ${result.aggregatorRegion}.` : `Local Resource Explorer setup created in ${result.aggregatorRegion}.`;
@@ -1245,7 +1256,7 @@ var registerDiscoverCommand = (program) => {
1245
1256
  "--region <region>",
1246
1257
  "AWS region to discover. Defaults to the current AWS region from AWS_REGION when omitted.",
1247
1258
  parseAwsRegion
1248
- ).option("--config <path>", "Explicit CloudBurn config file to load (required for config files in CI)").option(
1259
+ ).option("--config <path>", "Explicit CloudBurn config file to load (required for config files in CI)").option("--timeout <seconds>", "Maximum discovery duration in seconds (default: 300).", parseDiscoveryTimeout).option(
1249
1260
  "--enabled-rules <ruleIds>",
1250
1261
  "Comma-separated rule IDs to enable. When set, CloudBurn checks only these rules. By default, AWS Core preset rules are enabled.",
1251
1262
  parseRuleIdList
@@ -1276,6 +1287,9 @@ var registerDiscoverCommand = (program) => {
1276
1287
  if (onProgress !== void 0) {
1277
1288
  discoveryOptions.onProgress = onProgress;
1278
1289
  }
1290
+ if (options.timeout !== void 0) {
1291
+ discoveryOptions.timeoutMs = options.timeout * 1e3;
1292
+ }
1279
1293
  const result = await scanner.discover(discoveryOptions);
1280
1294
  const format = resolveOutputFormat(command, void 0, loadedConfig.discovery.format ?? "table");
1281
1295
  const output = renderResponse({ kind: "scan-result", result }, format);
@@ -1552,7 +1566,7 @@ var isCliEntrypoint = (moduleUrl, argvEntry = process.argv[1]) => {
1552
1566
  };
1553
1567
  var createProgram = () => {
1554
1568
  const program = createCliCommand();
1555
- program.name("cloudburn").usage("[command]").description("Know what you spend. Fix what you waste.").version("0.15.0").option("--debug", "Write execution trace messages to stderr").option("--format <format>", OUTPUT_FORMAT_OPTION_DESCRIPTION, parseOutputFormat);
1569
+ program.name("cloudburn").usage("[command]").description("Know what you spend. Fix what you waste.").version("0.16.1").option("--debug", "Write execution trace messages to stderr").option("--format <format>", OUTPUT_FORMAT_OPTION_DESCRIPTION, parseOutputFormat);
1556
1570
  configureCliHelp(program);
1557
1571
  program.exitOverride();
1558
1572
  registerCompletionCommand(program);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudburn",
3
- "version": "0.15.0",
3
+ "version": "0.16.1",
4
4
  "description": "Cloudburn CLI for cloud cost optimization",
5
5
  "homepage": "https://cloudburn.io/docs",
6
6
  "bugs": {
@@ -20,7 +20,7 @@
20
20
  ],
21
21
  "dependencies": {
22
22
  "commander": "^13.1.0",
23
- "@cloudburn/sdk": "0.31.0"
23
+ "@cloudburn/sdk": "0.32.1"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@biomejs/biome": "^2.5.3",
@@ -51,6 +51,8 @@
51
51
  "build": "tsup",
52
52
  "typecheck": "tsc --noEmit",
53
53
  "test": "vitest run",
54
+ "test:e2e": "node --test test/e2e/*.test.mjs",
55
+ "test:package": "node --test test/package/*.test.mjs",
54
56
  "lint": "biome check --error-on-warnings .",
55
57
  "lint:fix": "biome check --write .",
56
58
  "clean": "rm -rf dist",