Skip to content

Commit 03e66a6

Browse files
committed
internal/govulncheck: add more comments for emitted OSVs
Change-Id: I268971d26368476c4eda5da032fdf56e5698042f Reviewed-on: https://go-review.googlesource.com/c/vuln/+/590515 TryBot-Result: Gopher Robot <gobot@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com> Reviewed-by: Maceo Thompson <maceothompson@google.com>
1 parent f30059c commit 03e66a6

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

internal/govulncheck/govulncheck.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,15 @@ const (
3737
// Message is an entry in the output stream. It will always have exactly one
3838
// field filled in.
3939
type Message struct {
40-
Config *Config `json:"config,omitempty"`
41-
Progress *Progress `json:"progress,omitempty"`
42-
OSV *osv.Entry `json:"osv,omitempty"`
43-
Finding *Finding `json:"finding,omitempty"`
40+
Config *Config `json:"config,omitempty"`
41+
Progress *Progress `json:"progress,omitempty"`
42+
// OSV is emitted for every vulnerability in the current database
43+
// that applies to user modules regardless of their version. If a
44+
// module is being used at a vulnerable version, the corresponding
45+
// OSV will be referenced in Findings depending on the type of usage
46+
// and the desired scan level.
47+
OSV *osv.Entry `json:"osv,omitempty"`
48+
Finding *Finding `json:"finding,omitempty"`
4449
}
4550

4651
// Config must occur as the first message of a stream and informs the client

0 commit comments

Comments
 (0)