latest run 54 pass 0 fail 0 skipevidence →
HKB Operations: pages
HKB OperationsKnowledge space

Starred pages

Pages

Page directory · Labels · [ hides this

ADR-0027 accepted

Bring the threat detector and Security Hub under code

  • Status: Accepted
  • Date: 2026-10-06

Context

When the Security account was made the central security account, AWS quietly switched on two services there: GuardDuty, the threat detector, and Security Hub, which collects findings and runs compliance checks. They came on with default settings, created by hand rather than by code. That breaks HKB's rule that everything is code, and some settings HKB wants were off.

Decision

The plan was to delete the hand-made setup and recreate it from a template, with the extra protections turned on, and to use CIS benchmark version 5.0.0 for Security Hub's checks.

AWS wouldn't allow the delete. A central security account can't turn either service off. So the goal was met another way: - Security Hub is governed by one central policy, written as code, which sets every standard and check across the organization. No console setting survives it. - The existing detectors were imported into a template, and the first update set every protection from code. - The management account's Security Hub is switched on by a one-time script, then governed by the same policy. - Security Hub runs with no standards until configuration recording resumes, because its checks fail without it.

Consequences

  • The aim holds: every setting comes from code, and nothing set in the console survives.
  • Importing kept the existing setup instead of starting clean, but the first update overwrote every setting.
  • Each change raises the expected security alerts.

Alternatives considered

  • Import the existing setup as it was. That would have carried the console settings into the code.
  • Leave it console-managed and just document it. That contradicts everything-as-code.
LLMs look here
  • Records D69. Delegated-admin registration turned on a GuardDuty detector and a Security Hub hub (FSBP and CIS 1.2.0) in both Regions of hkb-security. Stage 3 wants GuardDuty S3 and Lambda protection. Security Hub supports CIS 5.0.0, 3.0.0, 1.4.0, 1.2.0; chosen 5.0.0 (Kyle, 2026-10-22, step 3.5).
  • Template: security/hkb-security-services.yaml, both Regions.
  • DQ-90 (2026-10-22): Security Hub can't be disabled in its delegated administrator, so the hubs stay; hkb-security-services holds the central configuration: finding aggregator, CENTRAL organization configuration, one policy (FSBP and CIS 5.0.0) on the root.
  • DQ-94 (2026-10-22): GuardDuty refuses to delete a delegated administrator's detector. Security's detectors are imported into hkb-security-services (one IMPORT change set per Region from a detector-only template); the first update sets every protection plan and tag.
  • DQ-96 (2026-10-23): a root association covers master, but Security Hub won't enroll it until it has a hub. Master's hub is turned on by a hand-run script with no default standards (one call per Region, no CloudFormation, so a stack delete can't turn it off).
  • DQ-95 (2026-10-22): a policy that enables standards fails to associate while Config isn't recording; Config is paused until step 7.1 (D90). Until then the root policy turns Security Hub on with no standards; FSBP and CIS 5.0.0 are added at 7.1.
  • Original plan: delete by a Kyle-run script, create by a reviewed change set; it would not have preserved the findings or the free-trial clock.

Page information

Owner
Platform Engineering
Status
accepted From the decision record.
Generated from
docs/adr/0027-guardduty-and-security-hub-recreated-through-cloudformation.md
Linked from
Decisions