mirror of
https://github.com/floci-io/floci.git
synced 2026-11-26 15:21:05 -05:00
* feat(securityhub): standards subscriptions BatchEnableStandards, BatchDisableStandards, GetEnabledStandards and DescribeStandards, so Terraform's aws_securityhub_standards_subscription (and cloudposse's security-hub module) can enable CIS, AFSBP and NIST 800-53. EnableSecurityHub now subscribes AWS's default standards (AFSBP and CIS 1.2.0) unless EnableDefaultStandards is false, as AWS does. Subscriptions are READY at once; controls and findings are not evaluated. Found applying kthw-on-floci's account-baseline: every standards subscription failed with UnknownOperationException (POST /standards/register). BatchDisableStandards checks every ARN before removing any, so a batch naming one unknown subscription changes nothing (before, the removals ahead of it stuck in memory without being saved, and came back after a restart). GetEnabledStandards reads the subscriptions under the same lock the writers hold. * fix(securityhub): reject a non-boolean EnableDefaultStandards EnableSecurityHub coerced EnableDefaultStandards with asBoolean(true), so a string "false" skipped the defaults and an object enabled them, and the hub was enabled either way. The botocore model types the member boolean. Reject it with InvalidInputException before any state changes, as UpdateSecurityHubConfiguration does for AutoEnableControls. * fix(securityhub): offer CIS v5.0.0 and take ARN partitions from the region resolver Add CIS AWS Foundations Benchmark v5.0.0 (standards/cis-aws-foundations-benchmark/v/5.0.0, regional, not enabled by default) to the standards Security Hub offers. Mint every Security Hub ARN through RegionResolver: the global CIS 1.2.0 ARN takes partitionForRegion and the regional ARNs use buildArn, so a region the catalog cannot place keeps the deployment's partition instead of falling back to aws.