turbot / steampipe

Zero-ETL, infinite possibilities. Live query APIs, code & more with SQL. No DB required.
https://steampipe.io
GNU Affero General Public License v3.0
6.92k stars 274 forks source link

Export does not merge benchmark results when running multiple benchmark checks in one steampipe command #2380

Closed sfunkernw closed 1 year ago

sfunkernw commented 2 years ago

Describe the bug

Export does not merge benchmark results when running multiple benchmark checks in one steampipe command.

Steampipe version (steampipe -v) steampipe version 0.16.0

Plugin version (steampipe plugin list)

To reproduce

steampipe check aws_compliance.benchmark.cis_v140 aws_compliance.benchmark.foundational_security aws_compliance.benchmark.other --export sp-cis-foundational-other-compliance-mod.json --max-parallel 5

This command runs properly all 3 benchmarks sequentially, but in the output file sp-cis-foundational-other-compliance-mod.json only the JSON formatted output of the last benchmark (aws_compliance.benchmark.other) is included.

Expected behavior

I would expect that the output of all 3 executed benchmarks end up in the exported output file. In the case of the JSON output, expect to have have in the root object the sum of the status attributes for all benchmarks and in the top level groups array, I expect to have the 3 benchmark groups included as array elements.

Additional context

This behavior seems to be the same for the other formats (CSV etc.) as well.

Please note, whoever has the same problem, you could simply run the 3 benchmarks after each other and merge the results manually as described in my expected behavior.

cbruno10 commented 2 years ago

@sfunkernw I've transferred this issue to the Steampipe repo, as this issue looks to be about more overall CLI behavior than one specific to the AWS Compliance mod. If you have any other questions though, please let us know.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.