fix(terraform): scope CloudWatch S3 policy alarm query#8055
Open
omribz156 wants to merge 1 commit into
Open
Conversation
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.
Closes #8045
Reason for Proposed Changes
aws_cloudwatch_log_metric_filterpattern, so unrelated filters such as[MYTEXT]were reported as wrong S3 policy-change filters.Proposed Changes
s3.amazonaws.com.[MYTEXT]custom metric filter case.Verification
go run ./cmd/console scan -p <query test dir> -q <repo>/assets/queries -b <repo>/assets/libraries -i 27c6a499-895a-4dc7-9617-5c485218db13 --no-progress --ignore-on-exit all --report-formats json --silentgit diff --checkNote: I also tried the focused query harness with
go test ./test -run 'TestQueries/terraform/aws/cloudwatch_s3_policy_change_alarm_missing' -count=1, but it did not finish within a 5 minute local timeout on Windows.I submit this contribution under the Apache-2.0 license.
This was implemented with Codex assistance, with the patch kept focused and manually reviewed.