Deny guardduty:UpdateDetector in deny-disable-security-services SCP - #14
Merged
Merged
Conversation
UpdateDetector can set Enable=false, disabling GuardDuty without any of the previously denied calls. Added to the JSON, CloudFormation and Terraform copies, and documented that it also blocks legitimate detector changes (including CloudFormation updates of AWS::GuardDuty::Detector, as used by the member-baseline StackSet). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
guardduty:UpdateDetectorcan set a detector'sEnableflag tofalse, disabling GuardDuty without using any of the calls theDenyDisableGuardDutystatement already denied. Adds it to all three copies of the policy:policies/scp-guardrails/deny-disable-security-services.jsoncloudformation/scp-guardrails/template.yamlterraform/scp-guardrails/main.tfFollow-up to the item left open in #13.
Trade-off
The same call is used for legitimate detector changes (finding publishing frequency, feature toggles), and CloudFormation issues it when an
AWS::GuardDuty::Detectoris updated. That includes the detector in this repo'smember-baselineStackSet: creating it is unaffected, but later updates to it would be denied in any account this SCP covers. Exempt the StackSet execution role from the SCP, or change detector settings before attaching it. Documented inpolicies/scp-guardrails/README.md.Verification
cfn-lint,
terraform fmt/validateand JSON parsing pass locally. CI runs the full suite.