internal/govulncheck: do not show anonymous functions in call stacks

Their names are likely to be confusing to users. Instead, replace a
call to an anonymous function A$1 with "B calls A", where B is the
previous non-anonymous function in the call stack leading to call of
A$1 and A is the function creating A$1. This is motivated by real
world example that can be simplified to

func B() {
   A()()
}

func A() {
  return func() {
     //...
     vuln()
  }
}

Change-Id: Ie353b7cfa8d96e2e7a8d67dfb4e7f4619145a56d
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/454195
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
4 files changed
tree: 217982e6317c0c23affa1680142118f784d9a026
  1. client/
  2. cmd/
  3. devtools/
  4. doc/
  5. exp/
  6. internal/
  7. osv/
  8. vulncheck/
  9. .gitignore
  10. all_test.go
  11. checks.bash
  12. CONTRIBUTING.md
  13. go.mod
  14. go.sum
  15. LICENSE
  16. PATENTS
  17. README.md
  18. tools_test.go
README.md

Go Vulnerability Management

Go Reference

This repository contains packages for accessing and analyzing data from the Go Vulnerability Database. It contains the following:

  • Package client: a client for interacting with the Go vulnerability database
  • Package vulncheck: an API for detecting vulnerabilities in Go packages
  • Command govulncheck: a CLI for detecting vulnerabilities in Go packages

Check out https://go.dev/security/vuln for more information about the Go vulnerability management system.

Privacy Policy

The privacy policy for govulncheck can be found at https://vuln.go.dev/privacy.

License

Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.

Database entries available at https://vuln.go.dev are distributed under the terms of the CC-BY 4.0 license.