Skip to content

Commit 6901778

Browse files
authored
feat: Updated UnauthorizedAPICalls pattern to pass CIS v1.2.0 (#48)
1 parent b91ce4d commit 6901778

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/pre-commit.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
env:
1010
TERRAFORM_DOCS_VERSION: v0.16.0
11+
TFLINT_VERSION: v0.44.1
1112

1213
jobs:
1314
collectInputs:
@@ -46,6 +47,7 @@ jobs:
4647
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.0
4748
with:
4849
terraform-version: ${{ steps.minMax.outputs.minVersion }}
50+
tflint-version: ${{ env.TFLINT_VERSION }}
4951
args: 'terraform_validate --color=always --show-diff-on-failure --files ${{ matrix.directory }}/*'
5052

5153
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
@@ -54,6 +56,7 @@ jobs:
5456
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.0
5557
with:
5658
terraform-version: ${{ steps.minMax.outputs.minVersion }}
59+
tflint-version: ${{ env.TFLINT_VERSION }}
5760
args: 'terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf)'
5861

5962
preCommitMaxVersion:
@@ -75,5 +78,6 @@ jobs:
7578
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.0
7679
with:
7780
terraform-version: ${{ steps.minMax.outputs.maxVersion }}
81+
tflint-version: ${{ env.TFLINT_VERSION }}
7882
terraform-docs-version: ${{ env.TERRAFORM_DOCS_VERSION }}
7983
install-hcledit: true

modules/cis-alarms/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
locals {
22
all_controls = {
33
UnauthorizedAPICalls = {
4-
pattern = "{ (($.errorCode=\"*UnauthorizedOperation\") || ($.errorCode=\"AccessDenied*\")) && (($.sourceIPAddress!=\"delivery.logs.amazonaws.com\") && ($.eventName!=\"HeadBucket\")) }"
4+
pattern = "{ (($.errorCode=\"*UnauthorizedOperation\") || ($.errorCode=\"AccessDenied*\")) }"
55
description = "Monitoring unauthorized API calls will help reveal application errors and may reduce time to detect malicious activity."
66
}
77

0 commit comments

Comments
 (0)