Skip to content

Commit 76c21fb

Browse files
authored
fix: Flipped condition in query for SecretsManager.4 (#13864)
flipped < sign in the status column #13774
1 parent 8b1915e commit 76c21fb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

plugins/source/aws/policies/queries/secretsmanager/secrets_should_be_rotated_within_a_specified_number_of_days.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ select
77
account_id,
88
arn as resource_id,
99
case when
10-
(last_rotated_date is null and created_date > now() - INTERVAL '90 days')
11-
or (last_rotated_date is not null and last_rotated_date > now() - INTERVAL '90 days')
10+
(last_rotated_date is null and created_date < now() - INTERVAL '90 days')
11+
or (last_rotated_date is not null and last_rotated_date < now() - INTERVAL '90 days')
1212
then 'fail' else 'pass' end as status
1313
from aws_secretsmanager_secrets

website/tables/aws/aws_secretsmanager_secrets.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ SELECT
108108
CASE
109109
WHEN (
110110
last_rotated_date IS NULL
111-
AND created_date > now() - '90 days'::INTERVAL
111+
AND created_date < now() - '90 days'::INTERVAL
112112
)
113113
OR (
114114
last_rotated_date IS NOT NULL
115-
AND last_rotated_date > now() - '90 days'::INTERVAL
115+
AND last_rotated_date < now() - '90 days'::INTERVAL
116116
)
117117
THEN 'fail'
118118
ELSE 'pass'

0 commit comments

Comments
 (0)