Skip to content

Commit 421e78b

Browse files
author
Tatiana Bradley
committed
x/vulndb: add link to importers of a package in new automated issues
The worker now includes a link in the automated issue description to pkg.go.dev/?tab=importedby for the affected module, as a starting point in detecting false positive vulnerability reports. For golang/go#51944 Change-Id: I3caaaba69c07e7a3e24977cf5ea5e92559ce8628 Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/402394 Reviewed-by: Julie Qiu <[email protected]>
1 parent f4619b1 commit 421e78b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

internal/worker/worker.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ func newCVEBody(sr storeRecord) (string, error) {
301301
if r.Links.PR != "" {
302302
fmt.Fprintf(&intro, "\n- PR: %s", r.Links.PR)
303303
}
304+
fmt.Fprintf(&intro, "\n- Imported by: https://pkg.go.dev/%s?tab=importedby", cr.Module)
304305
for _, l := range r.Links.Context {
305306
fmt.Fprintf(&intro, "\n- %s", l)
306307
}

internal/worker/worker_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ a description
227227
Links:
228228
- NIST: https://nvd.nist.gov/vuln/detail/ID1
229229
- JSON: https://github.com/CVEProject/cvelist/tree//
230+
- Imported by: https://pkg.go.dev/a.Module?tab=importedby
230231
231232
See [doc/triage.md](https://github.com/golang/vulndb/blob/master/doc/triage.md) for instructions on how to triage this report.
232233

0 commit comments

Comments
 (0)