fix: remove unsupported map fallback in policy result parsing
This commit is contained in:
@@ -332,14 +332,8 @@ func extractViolations(rs rego.ResultSet) ([]string, error) {
|
||||
}
|
||||
}
|
||||
case map[string]interface{}:
|
||||
// Check for structured result: {"valid": bool, "violations": [...]}
|
||||
if vs := extractStructuredViolations(v); vs != nil {
|
||||
violations = append(violations, vs...)
|
||||
} else {
|
||||
// Fallback: OPA sometimes returns sets as maps with string keys
|
||||
for key := range v {
|
||||
violations = append(violations, key)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user