Repository navigation
feat(e5c8): member swap, workload stacks stop owning GuardDuty, Security Hub and Inspector - #527
Merged
Merged
Conversation
…ity Hub and Inspector
E5c8 of the E5c plan. Every workload stack drops guardduty/main, securityhub/main
and inspector2/main: the region's security stack's Cloud Posse delegated
administrator and org-settings (E5c4-E5c6) enroll each account as a member.
- security-monitoring reads no service state: guardduty_detector_id,
securityhub_account_arn and inspector2_account_id become the plain bool flags
enable_guardduty_route, enable_securityhub_route and enable_inspector2_route
(owner OQ-AL), default on. require_* still fails a plan that turns a route off,
so turning one off takes both flags. Outputs, README and the mocked tftests follow.
- Stacks, catalog (defaults, main-region, main-standby) and the nonprod,
prod-primary and standby scaffold templates lose the three imports and their
dependencies; goldens regenerate identically.
- check-data-residency: a route left on in an account the region's org-settings
does not enroll fails (tests added).
- harden.sh: deploys cloudtrail, aws-config and, in a security stack, step 1
(delegated-administrator) only. Step 3 (org-settings) reads step 1's detector
and needs the root stack's step 2, so planning it beside step 1 failed a fresh
security stack before anything applied; harden now names
`deploy-security-org -f deploy-full-stack -s <stack>` for it instead. The status
report names each service's administrator account. test_harden covers both.
- plan_sweep_varfile drops the retired detector/hub synthetics; deploy-full-stack,
compliance-check, security-hardening, OPERATIONS, README and the guardduty,
securityhub and inspector2 READMEs updated. The orphaned
stacks/catalog/{guardduty,securityhub,inspector2} files go in E5c9.
Nothing is applied, so no state moves and no destroys.
…ot-stack test - security-hardening confirm prompt names what harden now plans - harden: one skip line for both delegated administrators; 'no enabled instance' wording (metadata.enabled false is filtered); get-administrator-account None reads as 'none (delegated administrator, or not a member)' - test_harden: root stack plans cloudtrail + aws-config only; disabled aws-config fails naming it; single combined skip line - check-data-residency: an unresolved account gets its own message - deploy-full-stack security-org comment; OPERATIONS line 13 period
hemzaz
marked this pull request as ready for review
November 16, 2026 20:08
5 of 6 tasks
hemzaz
added a commit
that referenced
this pull request
Nov 16, 2026
…ctor2 (#528) chore(e5c9): delete the hand-written guardduty, securityhub and inspector2 E5c9 of the E5c plan. Since E5c8 (#527) no stack has an instance of the hand-written components: the vendored Cloud Posse aws-guardduty, aws-security-hub and aws-inspector2 (delegated administrator + org-settings) own the services. Deletion PR, size-exempt per the plan. - Deleted components/terraform/{guardduty,securityhub,inspector2} (tests and the inline CKV2_AWS_3 skip included) and stacks/catalog/{guardduty,securityhub,inspector2}. - CODEOWNERS: the three catalog entries name the vendored catalogs. - deploy-full-stack: the old names leave the security layer's plan and deploy queries (both copies). - check-first-deploy-inputs: the old names leave MAP_CONSUMERS; tests use aws-guardduty. - plan_sweep_hcl: account_ids (only the deleted aws_inspector2_enabler) leaves LIST_SCALAR_ATTRS. - README 60 root modules (44 hand-written); CLAUDE.md 38 of the 44 validate tags.Environment; aws-security-hub catalog comments no longer point at deleted files. Resolved stacks are byte-identical (stack-snapshot IDENTICAL, 28 stacks).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
E5c8 of the E5c plan. Every workload stack drops guardduty/main, securityhub/main
and inspector2/main: the region's security stack's Cloud Posse delegated
administrator and org-settings (E5c4-E5c6) enroll each account as a member.
securityhub_account_arn and inspector2_account_id become the plain bool flags
enable_guardduty_route, enable_securityhub_route and enable_inspector2_route
(owner OQ-AL), default on. require_* still fails a plan that turns a route off,
so turning one off takes both flags. Outputs, README and the mocked tftests follow.
prod-primary and standby scaffold templates lose the three imports and their
dependencies; goldens regenerate identically.
does not enroll fails (tests added).
(delegated-administrator) only. Step 3 (org-settings) reads step 1's detector
and needs the root stack's step 2, so planning it beside step 1 failed a fresh
security stack before anything applied; harden now names
deploy-security-org -f deploy-full-stack -s <stack>for it instead. The statusreport names each service's administrator account. test_harden covers both.
compliance-check, security-hardening, OPERATIONS, README and the guardduty,
securityhub and inspector2 READMEs updated. The orphaned
stacks/catalog/{guardduty,securityhub,inspector2} files go in E5c9.
Nothing is applied, so no state moves and no destroys.
Test plan
python3 -m unittest test_check_data_residency test_harden(107 OK)bash scripts/check-stack-scaffold.sh(IDENTICAL, 15 goldens; 7 fresh stacks pass)atmos workflow lint -f lintatmos workflow validate-all -f validate-enhanced