diff --git a/shared/dataflow/codeql/dataflow/test/ProvenancePathGraph.qll b/shared/dataflow/codeql/dataflow/test/ProvenancePathGraph.qll index dcb18445631f..e82435e6a6b8 100644 --- a/shared/dataflow/codeql/dataflow/test/ProvenancePathGraph.qll +++ b/shared/dataflow/codeql/dataflow/test/ProvenancePathGraph.qll @@ -17,7 +17,7 @@ signature class PathNodeSig { private signature predicate provenanceSig(string model); private module TranslateModels< - interpretModelForTestSig/2 interpretModelForTest, provenanceSig/1 provenance> + interpretModelForTestSig/2 interpretModelForTest0, provenanceSig/1 provenance> { private predicate madIds(string madId) { exists(string model | @@ -26,6 +26,12 @@ private module TranslateModels< ) } + // Be robust against MaD IDs with multiple textual representations; simply + // concatenate them all + private predicate interpretModelForTest(QlBuiltins::ExtensionId madId, string model) { + model = strictconcat(string mod | interpretModelForTest0(madId, mod) | mod, ", ") + } + private QlBuiltins::ExtensionId getModelId(string model) { madIds(result.toString()) and interpretModelForTest(result, model)