In
https://research.swtch.com/vgo-why-versions, Russ Cox wrote about an hypothetical database of bugs in Go modules.
A tool can query the database, extracting the list of modules used in a binary built with Go.
For querying a CVE database, the tool can use the last segment of the module import path (not sure if there are more than one module in a repository).
For querying github security advisories, the tool can find the actual repository associated with the import path, and then query GitHub (this information *could* be reported by go get).
The problem with the CVE database is that the query needs manual verification.
The problem with GitHub is that not every Go module is on GitHub and not every Go modules use the security advisory tool. As an example:
IMHO, it would be useful to have an official security bug database for the Go ecosystem, e.g.
security.golang.org.
Thanks
Manlio Perillo