diff --git a/assets/queries/openAPI/2.0/body_parameter_with_wrong_property/query.rego b/assets/queries/openAPI/2.0/body_parameter_with_wrong_property/query.rego index a22873bc935..25ce15e0ba2 100644 --- a/assets/queries/openAPI/2.0/body_parameter_with_wrong_property/query.rego +++ b/assets/queries/openAPI/2.0/body_parameter_with_wrong_property/query.rego @@ -9,7 +9,7 @@ CxPolicy[result] { [path, value] := walk(doc) param := value.parameters[n] - param.in == "body" + param["in"] == "body" property := param[x] not allowed(x) diff --git a/assets/queries/openAPI/2.0/body_parameter_without_schema/query.rego b/assets/queries/openAPI/2.0/body_parameter_without_schema/query.rego index 44bd070e1a1..9e643cbf739 100644 --- a/assets/queries/openAPI/2.0/body_parameter_without_schema/query.rego +++ b/assets/queries/openAPI/2.0/body_parameter_without_schema/query.rego @@ -10,7 +10,7 @@ CxPolicy[result] { [path, value] := walk(doc) param := value.parameters[n] - param.in == "body" + param["in"] == "body" not common_lib.valid_key(param, "schema") searchKey := openapi_lib.concat_default_value(openapi_lib.concat_path(path), "parameters") diff --git a/assets/queries/openAPI/2.0/multi_collectionformat_not_valid_in_parameter/query.rego b/assets/queries/openAPI/2.0/multi_collectionformat_not_valid_in_parameter/query.rego index 92f15747602..fc18204c6f7 100644 --- a/assets/queries/openAPI/2.0/multi_collectionformat_not_valid_in_parameter/query.rego +++ b/assets/queries/openAPI/2.0/multi_collectionformat_not_valid_in_parameter/query.rego @@ -10,8 +10,8 @@ CxPolicy[result] { [path, value] := walk(doc) param := value.parameters[n] param.collectionFormat == "multi" - param.in != "query" - param.in != "formData" + param["in"] != "query" + param["in"] != "formData" searchKey := openapi_lib.concat_default_value(openapi_lib.concat_path(path), "parameters") @@ -20,6 +20,6 @@ CxPolicy[result] { "searchKey": sprintf("%s.name=%s.in", [searchKey, param.name]), "issueType": "IncorrectValue", "keyExpectedValue": "'in' field should be 'query' or 'formData'", - "keyActualValue": sprintf("'in' field is %s", [param.in]), + "keyActualValue": sprintf("'in' field is %s", [param["in"]]), } } diff --git a/assets/queries/openAPI/2.0/object_without_required_property/query.rego b/assets/queries/openAPI/2.0/object_without_required_property/query.rego index 346fa589279..1d7564ecdec 100644 --- a/assets/queries/openAPI/2.0/object_without_required_property/query.rego +++ b/assets/queries/openAPI/2.0/object_without_required_property/query.rego @@ -30,7 +30,7 @@ CxPolicy[result] { [path, value] := walk(doc) param := value.parameters[n] - param.in != "body" + param["in"] != "body" partialSk := openapi_lib.concat_default_value(openapi_lib.concat_path(path), "parameters") diff --git a/assets/queries/openAPI/2.0/parameter_file_type_not_in_formdata/query.rego b/assets/queries/openAPI/2.0/parameter_file_type_not_in_formdata/query.rego index 4f4f5e380f0..a17acfaf270 100644 --- a/assets/queries/openAPI/2.0/parameter_file_type_not_in_formdata/query.rego +++ b/assets/queries/openAPI/2.0/parameter_file_type_not_in_formdata/query.rego @@ -10,7 +10,7 @@ CxPolicy[result] { [path, value] := walk(doc) param := value.parameters[n] param.type == "file" - param.in != "formData" + param["in"] != "formData" searchKey := openapi_lib.concat_default_value(openapi_lib.concat_path(path), "parameters") diff --git a/assets/queries/openAPI/general/parameter_objects_headers_dup_name/query.rego b/assets/queries/openAPI/general/parameter_objects_headers_dup_name/query.rego index 4e0b37bc042..c654f3273d2 100644 --- a/assets/queries/openAPI/general/parameter_objects_headers_dup_name/query.rego +++ b/assets/queries/openAPI/general/parameter_objects_headers_dup_name/query.rego @@ -10,7 +10,7 @@ CxPolicy[result] { [path, value] := walk(doc) param := value.parameters[n] - param.in == "header" + param["in"] == "header" dup := check_dup(value.parameters) lower(param.name) == dup[m] diff --git a/assets/queries/openAPI/general/path_parameter_with_no_corresponding_template_path/query.rego b/assets/queries/openAPI/general/path_parameter_with_no_corresponding_template_path/query.rego index e1bd0b5f49f..31d15e86816 100644 --- a/assets/queries/openAPI/general/path_parameter_with_no_corresponding_template_path/query.rego +++ b/assets/queries/openAPI/general/path_parameter_with_no_corresponding_template_path/query.rego @@ -10,7 +10,7 @@ CxPolicy[result] { path := doc.paths[name] param := path[verb].parameters[p] - param.in == "path" + param["in"] == "path" matches := openapi_lib.is_path_template(name) count([path_param |