Automatically installs Security Hub in accounts created by the Landing Zone AVM and connects them back to the Security account
Required AWS Access Key for your Security Hub User.
Required AWS Secret Key for your Security Hub User.
Required ARN of the role AWSLandingZoneSecurityHubRole in the security account.
Required ARN of the role AWSLandingZoneReadOnlyListAccountsRole in the primary account.
Required Name of the role AWSLandingZoneSecurityHubExecutionRole in the target accounts.
Required Comma separated list of regions where Security Hub must be deployed. If not present, will deploy everywhere.
uses: madeden/lz-actions-securityhub@master
with:
SECURITYHUB_USER_ID: ${{ secrets.SECURITYHUB_USER_ID }}
SECURITYHUB_ACCESS_KEY: ${{ secrets.SECURITYHUB_ACCESS_KEY }}
SECURITYHUB_CROSSACCOUNT_ROLE: ${{ secrets.SECURITYHUB_CROSSACCOUNT_ROLE }}
SECURITYHUB_LISTACCOUNTS_ROLE: ${{ secrets.SECURITYHUB_LISTACCOUNTS_ROLE }}
SECURITYHUB_EXECUTION_ROLE: ${{ secrets.SECURITYHUB_EXECUTION_ROLE }}
SECURITYHUB_REGIONS: ${{ secrets.SECURITYHUB_REGIONS }}
The action uses the IAM credentials from a user in the security account to assume the AWSLandingZoneSecurityHubRole in the security account.
After that it uses the obtained credentials to assume the AWSLandingZoneReadOnlyListAccountsRole, which in turns serves to retrieve the list of available accounts. That list is then converted into the CSV file that can be consumed by the script to add accounts to the Security Hub
Then using the IAM user credentials it assumes the AWSLandingZoneSecurityHubExecutionRole in every existing account to launch in parallel prowler for each account.
By default the Landing Zone product doesn't provide the required components for this action to work outside of AWS. We decided to create an IAM user and group that can impersonate a role in the Security account to chain assume roles in the primary account (ListAccounts) then in every account to configure the Security Huband allowed it to assume the different roles for listing accounts and performing the actual security scan.
Read move about this in the documentation of the Landing Zone.