You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rules/cross-platform/credential_access_multi_could_secrets_via_api.toml
+20-29Lines changed: 20 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -110,34 +110,25 @@ type = "esql"
110
110
111
111
query = '''
112
112
FROM logs-azure.platformlogs-*, logs-azure.activitylogs-*, logs-aws.cloudtrail-*, logs-gcp.audit-* METADATA _id, _version, _index
113
-
| WHERE source.ip IS NOT NULL
114
-
115
-
// Normalize "secret access" across AWS, Azure, GCP
116
-
| EVAL Esql.is_secret_access = CASE(
117
-
// AWS Secrets Manager
118
-
event.dataset == "aws.cloudtrail" AND
119
-
event.provider == "secretsmanager.amazonaws.com" AND
120
-
event.action IN ("GetSecretValue", "BatchGetSecretValue"), true,
113
+
| WHERE
114
+
(
115
+
/* AWS Secrets Manager */
116
+
(event.dataset == "aws.cloudtrail" AND event.provider == "secretsmanager.amazonaws.com" AND event.action IN ("GetSecretValue", "BatchGetSecretValue")) OR
121
117
122
118
// Azure Key Vault (platform logs)
123
-
event.dataset == "azure.platformlogs" AND
124
-
event.action IN ("SecretGet", "KeyGet"), true,
125
-
126
-
// Azure Managed HSM secret
127
-
event.dataset == "azure.activitylogs" AND
128
-
event.action LIKE "MICROSOFT.KEYVAULT/managedHSM/keys/*", true,
129
-
130
-
// Google Secret Manager
131
-
event.dataset IN ("googlecloud.audit", "gcp.audit") AND
(event.dataset == "azure.platformlogs" AND event.action IN ("SecretGet", "KeyGet")) or
120
+
121
+
/* Azure Key Vault (activity logs) */
122
+
(event.dataset == "azure.activitylogs" AND (azure.activitylogs.operation_name LIKE "MICROSOFT.KEYVAULT/VAULTS/SECRETS/LIST" OR azure.activitylogs.operation_name LIKE "MICROSOFT.KEYVAULT/VAULTS/SECRETS/GET")) OR
123
+
124
+
/* Azure Managed HSM secret */
125
+
(event.dataset == "azure.activitylogs" AND azure.activitylogs.operation_name LIKE "MICROSOFT.KEYVAULT/managedHSM/keys/*") OR
126
+
127
+
/* Google Secret Manager */
128
+
(event.dataset IN ("googlecloud.audit", "gcp.audit") AND
129
+
event.action IN ("google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion", "google.cloud.secretmanager.v1.SecretManagerService.GetSecretRequest"))
130
+
131
+
) AND source.ip IS NOT NULL
141
132
142
133
// Unified user identity (raw)
143
134
| EVAL Esql_priv.user_id =
@@ -167,7 +158,7 @@ FROM logs-azure.platformlogs-*, logs-azure.activitylogs-*, logs-aws.cloudtrail-*
0 commit comments