Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Logic for Snowflake Configuration Drift Query #1531

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Query: |
start_time as p_event_time,
end_time
FROM snowflake.account_usage.query_history
WHERE execution_status = 'SUCCESS'
WHERE ((execution_status = 'SUCCESS'
AND query_type NOT in ('SELECT')
AND user_name NOT in ('PANTHER_ADMIN', 'PANTHERACCOUNTADMIN')
AND (query_text ILIKE '%create role%'
Expand All @@ -41,11 +41,11 @@ Query: |
OR query_text ILIKE '%drop_network_policy%'
OR query_text ILIKE '%copy%'
)
OR (
) OR (
query_text ilike '%grant%accountadmin%to%'
AND query_type = 'GRANT'
AND execution_status = 'SUCCESS'
)
))
AND p_occurs_since('1 day')
ORDER BY end_time desc
LIMIT 100;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Query: |
start_time as p_event_time,
end_time
FROM snowflake.account_usage.query_history
WHERE execution_status = 'SUCCESS'
WHERE ((execution_status = 'SUCCESS'
AND query_type NOT in ('SELECT')
AND user_name NOT in ('PANTHER_ADMIN', 'PANTHERACCOUNTADMIN')
AND (query_text ILIKE '%create role%'
Expand All @@ -38,10 +38,10 @@ Query: |
OR query_text ILIKE '%drop_network_policy%'
OR query_text ILIKE '%copy%'
)
OR (
) OR (
query_text ilike '%grant%accountadmin%to%'
AND query_type = 'GRANT'
AND execution_status = 'SUCCESS'
)
))
ORDER BY end_time desc
LIMIT 100;
Loading