Skip to content

x/vuln/cmd/govulncheck: cache results  #57150

@zpavlinovic

Description

@zpavlinovic

Imagine a user runs govulncheck ./... and discovers some vulnerabilities for a very large project. The user may next want to see the detailed trace by running govulncheck -v ./.... Now govulncheck will do the job from scratch which isn't nice, as this will take some time.

Imagine that an IDE or a wrapper program reports issues by packaging the result of govulncheck -json. The user may want to see a more concise result as govulncheck. Now govulncheck will do the job from scratch again which isn't nice, as this will take some time.

Caching results here would be great. One idea is to cache vulncheck.Result. This should be much less memory intensive and more convenient than caching intermediate call graphs. Caching can be done in between govulncheck calls where db has not been changed as well as the code under analysis. The latter can be possibly implemented by looking how go build cache works.

Thanks @hyangah for suggesting this idea.

Metadata

Metadata

Assignees

Labels

vulncheck or vulndbIssues for the x/vuln or x/vulndb repo

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions