From 27a2be5617cd8967dd6f01f3ef7919a9e9033047 Mon Sep 17 00:00:00 2001 From: Akshay Ahuja Date: Tue, 5 Nov 2024 18:35:47 +0530 Subject: [PATCH] code scanning changes for regex applied to fix security warning --- lib/query_helper/sql_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/query_helper/sql_parser.rb b/lib/query_helper/sql_parser.rb index 48142dc..1104c87 100644 --- a/lib/query_helper/sql_parser.rb +++ b/lib/query_helper/sql_parser.rb @@ -188,7 +188,7 @@ def find_aliases ColumnMap.new( alias_name: sql_alias, sql_expression: sql_expression.squish, - aggregate: /\b(array_agg|avg|bit_and|bit_or|bool_and|bool_or|boolor_agg|booland_agg|count|every|json_agg|jsonb_agg|json_object_agg|jsonb_object_agg|max|min|string_agg|sum|xmlagg)\((.*?)\)/.match?(sql_expression) + aggregate: /\b(array_agg|avg|bit_and|bit_or|bool_and|bool_or|boolor_agg|booland_agg|count|every|json_agg|jsonb_agg|json_object_agg|jsonb_object_agg|max|min|string_agg|sum|xmlagg)\((.*)\)/.match?(sql_expression) ) if sql_alias end column_maps.compact