diff --git a/ql/src/semmle/go/dataflow/internal/DataFlowUtil.qll b/ql/src/semmle/go/dataflow/internal/DataFlowUtil.qll index a551496cfb5..13c536a7a48 100644 --- a/ql/src/semmle/go/dataflow/internal/DataFlowUtil.qll +++ b/ql/src/semmle/go/dataflow/internal/DataFlowUtil.qll @@ -1285,6 +1285,8 @@ private predicate certainlyReturnsNonNil(Function f, FunctionOutput output) { ( f.hasQualifiedName("errors", "New") or + f.hasQualifiedName("fmt", "Errorf") + or f in [Builtin::new(), Builtin::make()] or exists(FuncDecl fd | fd = f.getFuncDecl() |