From aa747ea5fff1c60e7826f376535c00c4e86bac8d Mon Sep 17 00:00:00 2001 From: Sauyon Lee Date: Thu, 23 Sep 2021 11:54:13 -0700 Subject: [PATCH] Fix validation regexes for go --- ql/lib/semmle/go/dataflow/ExternalFlow.qll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ql/lib/semmle/go/dataflow/ExternalFlow.qll b/ql/lib/semmle/go/dataflow/ExternalFlow.qll index 68b88118355..77a0c07ec17 100644 --- a/ql/lib/semmle/go/dataflow/ExternalFlow.qll +++ b/ql/lib/semmle/go/dataflow/ExternalFlow.qll @@ -258,10 +258,10 @@ module CsvValidation { or summaryModel(namespace, type, _, name, signature, ext, _, _, _) and pred = "summary" | - not namespace.regexpMatch("[a-zA-Z0-9_\\.]+") and + not namespace.regexpMatch("[a-zA-Z0-9_\\./]+") and msg = "Dubious namespace \"" + namespace + "\" in " + pred + " model." or - not type.regexpMatch("[a-zA-Z0-9_\\$<>]+") and + not type.regexpMatch("[a-zA-Z0-9_\\$<>]*") and msg = "Dubious type \"" + type + "\" in " + pred + " model." or not name.regexpMatch("[a-zA-Z0-9_]*") and