Skip to content

Commit be656ae

Browse files
Tune Bedrock rule to accept multivalued column (#4205)
1 parent 77f0ee8 commit be656ae

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

rules/integrations/aws_bedrock/aws_bedrock_high_confidence_misconduct_blocks_detected.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[metadata]
22
creation_date = "2024/05/05"
33
maturity = "production"
4-
updated_date = "2024/10/09"
4+
updated_date = "2024/10/23"
55
min_stack_comments = "ES|QL rule type is still in technical preview as of 8.13, however this rule was tested successfully; integration in tech preview"
66
min_stack_version = "8.13.0"
77

@@ -45,8 +45,10 @@ type = "esql"
4545

4646
query = '''
4747
from logs-aws_bedrock.invocation-*
48-
| where gen_ai.policy.confidence == "HIGH" and gen_ai.policy.action == "BLOCKED" and gen_ai.compliance.violation_code == "MISCONDUCT"
49-
| keep gen_ai.policy.confidence, gen_ai.policy.action, gen_ai.compliance.violation_code, user.id
48+
| MV_EXPAND gen_ai.compliance.violation_code
49+
| MV_EXPAND gen_ai.policy.confidence
50+
| where gen_ai.policy.action == "BLOCKED" and gen_ai.policy.confidence LIKE "HIGH" and gen_ai.compliance.violation_code LIKE "MISCONDUCT"
51+
| keep user.id
5052
| stats high_confidence_blocks = count() by user.id
5153
| where high_confidence_blocks > 5
5254
| sort high_confidence_blocks desc

0 commit comments

Comments
 (0)