I don't think this vulnerability is actually affecting this specific code path picked by govulncheck
(The pgconn maintainer also said in jackc/pgconn#103 this vulnerability doesn't affect the package.)
This vulnerability is not the type of vulnerability that can be analyzed with simple(?) callgraph analysis. We need data analysis to see what's fed into the vulnerable function. But with the lack of options to suppress the report, the easiest path forward is, I think, to update the dependency.
On the other hand, as seen in #51216, the Go security team wants to avoid changes triggered by false positive reports. So, I am not sure what's the Go team's policy in cases like this.
If we decide to update the dependency, now the question is which dependency to upgrade:
update to firstname.lastname@example.org as the GO-2021-0113 page implies.
update the direct dependency, too: email@example.com
I'm not sure what the policy should be. For this particular case, it's not a problem to update to the latest pgconn and x/text it in x/build, so I'll add NeedsFix for now.
(If we get more reports that are false positives, that might be a good time to think more, but this is the first one I'm seeing.)
This upgrades golang.org/x/text to v0.3.7 and
suppresses govulncheck's report on GO-2021-0113
Trust: Hyang-Ah Hana Kim <firstname.lastname@example.org>
Run-TryBot: Hyang-Ah Hana Kim <email@example.com>
Reviewed-by: Dmitri Shuralyov <firstname.lastname@example.org>
TryBot-Result: Gopher Robot <email@example.com>
Reviewed-by: Carlos Amedee <firstname.lastname@example.org>