You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redesign `CLDBRN-AWS-CLOUDWATCH-2` to flag inactive CloudWatch log groups from latest stream activity summaries instead of enumerating every log stream.
Reduce live discovery fan-out with batched Resource Explorer queries, add throttling-aware retries and debug tracing, and add log-group-level CloudWatch activity hydration to avoid full log-stream enumeration for stale log group checks.
`discover`runs the same rules against live AWS resources. Initialize AWS Resource Explorer first, then run against one region or all of them.
121
+
`discover`runs the same rules against live AWS resources. Initialize AWS Resource Explorer first, then run against the current AWS region or one explicit region.
122
122
123
123
```bash
124
124
cloudburn discover init
125
125
cloudburn discover
126
126
cloudburn discover --region eu-central-1
127
-
cloudburn discover --region all
128
127
cloudburn discover --service ec2,s3
128
+
cloudburn --debug discover --region eu-central-1
129
129
```
130
130
131
-
`--region all`requires an AWS Resource Explorer aggregator index.
131
+
The CLI targets one region at a time. Multi-region discovery remains available through the SDK.
132
+
Use `--debug` to relay SDK and provider execution trace details to `stderr` while keeping normal command output on `stdout`.
132
133
133
134
Generate a starter config with `cloudburn config --init`. Full details in the [config reference](docs/reference/config-schema.md).
Copy file name to clipboardExpand all lines: docs/TESTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ Mock at the SDK boundary — do not run real scans.
68
68
-`--config`, `--enabled-rules`, and `--disabled-rules` pass the expected runtime overrides to the SDK
69
69
-`--exit-code` sets `process.exitCode = 1` when findings exist
70
70
-`--exit-code` without findings sets `process.exitCode = 0`
71
-
-`discover list-enabled-regions`, `discover supported-resource-types`, `discover init`, `config`, `rules list`, and `estimate` all go through the shared formatter system
71
+
-`discover supported-resource-types`, `discover init`, `discover status`, `config`, `rules list`, and `estimate` all go through the shared formatter system
72
72
-`table` output stays human-readable and `json` output stays machine-readable
73
73
- Runtime errors remain structured JSON on `stderr` regardless of stdout format
|`json`| Pretty JSON for the underlying response payload |
44
43
|`table`| ASCII tables for scans, record lists, string lists, key/value status output, and `rules list`|
45
44
46
45
## Command Behavior
@@ -50,16 +49,17 @@ All stdout-producing commands return a typed `CliResponse` and share the same fo
50
49
-`discover` runs live AWS discovery and rule evaluation through `CloudBurnClient.discover({ target, config?, configPath? })`.
51
50
-`discover` accepts `--config`, `--enabled-rules`, `--disabled-rules`, and `--service` for one-off overrides of discovery config.
52
51
-`discover --region <region>` overrides the current AWS region resolved from `AWS_REGION`, `AWS_DEFAULT_REGION`, `aws_region`, then the AWS SDK region provider chain.
53
-
-`discover --region all` requires a Resource Explorer aggregator index.
54
-
-`discover --region <region>` targets one enabled Resource Explorer index region.
55
-
-`discover list-enabled-regions` and `discover supported-resource-types`use the shared `json|table` renderer.
52
+
-The CLI targets one explicit AWS region per discover run.
53
+
-Multi-region discovery remains an SDK capability through `target: { mode: 'regions', regions: [...] }` and requires a Resource Explorer aggregator index.
54
+
-`discover supported-resource-types`uses the shared `json|table` renderer.
56
55
-`discover init` bootstraps Resource Explorer through the SDK, defaults to the current AWS region, accepts `--region <region>` as an override, and falls back to local-only setup when cross-region bootstrap is denied.
57
56
-`discover init` status output includes the resolved setup `indexType` so users can distinguish local-only setup from aggregator setup.
58
57
-`config --init` creates `.cloudburn.yml` in the git root (or current directory when no git root exists), unless a config file already exists there.
59
58
-`config --print` prints the current discovered config file as raw YAML by default and can render table or JSON when `--format` is provided.
60
59
-`config --print-template` prints the starter template without writing a file.
61
60
-`rules list`, `config`, and `estimate` all use the shared formatter system instead of ad hoc string output.
62
61
-`completion` is a structural parent command. `completion bash|fish|zsh` prints shell completion scripts for the selected shell.
62
+
-`--debug` is a global flag that relays SDK and provider execution tracing to `stderr` without changing normal command output on `stdout`.
63
63
-`--format` is documented as a global option and defaults to `table`, except `config --print` and `config --print-template`, which preserve raw YAML by default for redirection workflows.
64
64
-`scan` and `discover` can also source their default format from `.cloudburn.yml`; explicit `--format` still wins.
65
65
- The hidden `__complete` command exists only as the runtime hook for generated shell scripts.
@@ -72,11 +71,13 @@ Current live-discovery behavior:
72
71
-`discover` is the live entrypoint for both the CLI and direct SDK callers.
73
72
-`discoverAwsResources` in `src/providers/aws/discovery.ts` is the AWS live orchestration entrypoint.
74
73
- Default discovery target is the current region, resolved from `AWS_REGION`, then `AWS_DEFAULT_REGION`, then `aws_region`, then the AWS SDK region provider chain.
- Explicit single-region discovery uses the selected region as the Resource Explorer control plane instead of the ambient current region.
76
-
-`--region all` requires an aggregator index and fails fast when one is not enabled.
76
+
-Explicit multi-region discovery requires an aggregator index and fails fast when one is not enabled.
77
77
- Discovery resolves the explicit default Resource Explorer view in the chosen search region and fails if no default view exists or if that default view applies additional filters.
78
78
- Discovery setup returns existing local indexes without forcing aggregator creation, and `discover init` retries as local-only setup when cross-region aggregator creation is denied.
79
79
- Catalog collection uses Resource Explorer `ListResources` with filter strings instead of `Search`, which avoids the 1,000-result ceiling on filter-only queries.
80
+
- Resource Explorer catalog seeding batches `resourcetype:` and `region:` filters into the smallest possible query set, raises `MaxResults` to `1000`, and retries throttled `ListResources` calls before failing.
80
81
- Account-scoped or fallback-backed datasets can bypass Resource Explorer seeding entirely by declaring no `resourceTypes`; the loader then receives `[]` and owns the account-level API call.
81
82
- Resource Explorer inventory failures and dataset loader failures are fatal. The SDK does not degrade to partial live results.
82
83
- Missing Lambda `Architectures` values from AWS are normalized to `['x86_64']`, matching the AWS default architecture.
|`enabled-rules`|`string[]`| unset | If present, only the listed rule IDs remain active for that mode. |
17
+
|`disabled-rules`|`string[]`| unset | Rule IDs to remove from the active set after `enabled-rules` is applied. |
18
+
|`services`|`string[]`| unset | Service allowlist applied before `enabled-rules` and `disabled-rules`. |
19
+
|`format`|`'json' \| 'table'`| unset | Default CLI output format for that mode when `--format` is not passed. |
20
20
21
21
## Merge Behavior
22
22
@@ -89,7 +89,8 @@ discovery:
89
89
90
90
- `cloudburn discover` defaults to the current region.
91
91
- Current region resolution order is `AWS_REGION`, `AWS_DEFAULT_REGION`, `aws_region`, then the AWS SDK region provider chain.
92
-
- Passing `--region <region>` overrides the current region and queries Resource Explorer from that selected region.
92
+
- Passing `--region <region>` overrides the current region for the CLI discover command.
93
93
- `discover({ target })`is the SDK live-discovery entrypoint.
94
-
- `--region all`requires an aggregator index and an unfiltered default Resource Explorer view in the aggregator region.
94
+
- `discover({ target: { mode: 'regions', regions: [...] } })` is the SDK shape for explicit discovery regions.
95
+
- Multi-region SDK discovery requires an aggregator index and an unfiltered default Resource Explorer view in the aggregator region.
95
96
- `cloudburn discover init`defaults to the current region, accepts `--region <region>` as an override, and falls back to local-only setup in that region when cross-region aggregator setup is denied.
`CLDBRN-AWS-EBS-7` flags only `completed` snapshots with a parsed `StartTime` older than `90` days.
110
110
111
-
`CLDBRN-AWS-CLOUDWATCH-2` flags log streams with no observed event history and log streams whose `lastIngestionTime` is more than 90 days old. Delivery-managed log groups remain exempt.
111
+
`CLDBRN-AWS-CLOUDWATCH-2` flags log groups whose most recent observed stream activity is missing or older than 90 days. Delivery-managed log groups remain exempt.
112
112
113
113
`CLDBRN-AWS-CLOUDWATCH-3` reviews only log groups storing at least `1 GiB` and flags them when no metric filters are configured.
0 commit comments