Skip to content

Commit 4e1c8f6

Browse files
[Tuning] Add mv_expand for gen_ai.policy.action field (#5296)
Resolves #5202 Resolves #5203 Resolves #5204 The gen_ai.policy.action field is an array, so an additional mv_expand is necessary for the rules to work correctly with AWS Bedrock integration events that contain multiple policy actions. Updated rules: - Unusual High Word Policy Blocks Detected - Unusual High Denied Topic Blocks Detected - Unusual High Denied Sensitive Information Policy Blocks Detected - Unusual High Confidence Content Filter Blocks Detected - AWS Bedrock Guardrails Detected Multiple Policy Violations Within a Single Blocked Request Co-authored-by: shashank-elastic <91139415+shashank-elastic@users.noreply.github.com>
1 parent 34bd88a commit 4e1c8f6

5 files changed

+12
-5
lines changed

rules/integrations/aws_bedrock/aws_bedrock_guardrails_multiple_violations_in_single_request.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/05/02"
33
integration = ["aws_bedrock"]
44
maturity = "production"
5-
updated_date = "2025/09/25"
5+
updated_date = "2025/11/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -83,6 +83,9 @@ type = "esql"
8383
query = '''
8484
from logs-aws_bedrock.invocation-*
8585
86+
// Expand multi-value policy action field
87+
| mv_expand gen_ai.policy.action
88+
8689
// Filter for policy-blocked requests
8790
| where gen_ai.policy.action == "BLOCKED"
8891

rules/integrations/aws_bedrock/aws_bedrock_high_confidence_misconduct_blocks_detected.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/05/05"
33
integration = ["aws_bedrock"]
44
maturity = "production"
5-
updated_date = "2025/09/25"
5+
updated_date = "2025/11/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -86,6 +86,7 @@ from logs-aws_bedrock.invocation-*
8686
| mv_expand gen_ai.compliance.violation_code
8787
| mv_expand gen_ai.policy.confidence
8888
| mv_expand gen_ai.policy.name
89+
| mv_expand gen_ai.policy.action
8990
9091
// Filter for high-confidence content policy blocks with targeted violations
9192
| where

rules/integrations/aws_bedrock/aws_bedrock_multiple_sensitive_information_policy_blocks_detected.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/11/20"
33
integration = ["aws_bedrock"]
44
maturity = "production"
5-
updated_date = "2025/09/25"
5+
updated_date = "2025/11/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -83,6 +83,7 @@ from logs-aws_bedrock.invocation-*
8383
8484
// Expand multi-valued policy name field
8585
| mv_expand gen_ai.policy.name
86+
| mv_expand gen_ai.policy.action
8687
8788
// Filter for blocked actions related to sensitive info policy
8889
| where

rules/integrations/aws_bedrock/aws_bedrock_multiple_topic_policy_blocks_detected.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/11/20"
33
integration = ["aws_bedrock"]
44
maturity = "production"
5-
updated_date = "2025/09/25"
5+
updated_date = "2025/11/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -83,6 +83,7 @@ from logs-aws_bedrock.invocation-*
8383
8484
// Expand multi-value policy name field
8585
| mv_expand gen_ai.policy.name
86+
| mv_expand gen_ai.policy.action
8687
8788
// Filter for blocked topic policy violations
8889
| where

rules/integrations/aws_bedrock/aws_bedrock_multiple_word_policy_blocks_detected.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
creation_date = "2024/11/20"
33
integration = ["aws_bedrock"]
44
maturity = "production"
5-
updated_date = "2025/09/25"
5+
updated_date = "2025/11/10"
66

77
[rule]
88
author = ["Elastic"]
@@ -83,6 +83,7 @@ from logs-aws_bedrock.invocation-*
8383
8484
// Expand multivalued policy names
8585
| mv_expand gen_ai.policy.name
86+
| mv_expand gen_ai.policy.action
8687
8788
// Filter for blocked profanity-related policy violations
8889
| where

0 commit comments

Comments
 (0)