Граф коммитов

854 Коммитов

Автор SHA1 Сообщение Дата
Tatiana Bradley ffba2fd2e2 internal/database, cmd/gendb: refactor Generate for unit testing
Modify Generate to take in a *git.Repository instead of a directory
string, so it can be more easily unit tested. Add a unit test.

For golang/go#56417

Change-Id: I3eaa84b41568e9582ac1f16be8c979d7b71d5ad3
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/457017
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
2022-12-13 16:01:45 +00:00
Tatiana Bradley f9476bea51 internal/database: replace Generate logic with New and Write
Replaces existing Generate logic with refactored New and Write functions,
which have the equivalent behavior.

For golang/go#56417

Change-Id: Ie01c0c77e93c779c717e89acecb81fc00dd4cfbe
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/453176
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Jenny Rakoczy <jenny@golang.org>
2022-12-12 21:51:42 +00:00
Tatiana Bradley 801aeef988 data/reports: add GHSA to GO-2021-0051.yaml
Aliases: CVE-2020-36565, GHSA-j453-hm5x-c46w

Updates golang/vulndb#51
Fixes golang/vulndb#1145

Change-Id: I8bf1cc851d396c5bb0a4e33f065a89c4ef570605
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/457015
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
2022-12-12 21:25:23 +00:00
Tatiana Bradley 316f1308a9 data/reports: add GHSA to GO-2022-1130.yaml
Aliases: CVE-2022-46146, GHSA-7rg2-cxvp-9p7p

Updates golang/vulndb#1130

Change-Id: I813f6a63e61fab73b762fd1526742d254319c418
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/457016
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-12-12 21:24:47 +00:00
Tatiana Bradley e87bffe3f1 internal/report: simplify proxy version lookup in Lint
This change removes unnecessary logic to determine if the proxy knows
about a version in Lint.

Previously, Lint found all versions known to the proxy
for a module, and then checked if a candidate version was in that list.
This step is not needed because Lint already calls the proxy with each
candidate version, and this call would fail if the version did not exist.

Change-Id: I5981c45817ce98382a5b722c2e39ca5a3072fe85
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/456875
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-12 18:10:01 +00:00
Tatiana Bradley 6031746270 deploy: speed up db deploy by not logging while copying
Use the "-q" flag in gsutil to avoid logging while deploying the
database, in order to make deployment faster.

Change-Id: I874115608e32df14fb333ca37555433932a1918a
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/456045
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
2022-12-09 21:33:27 +00:00
Tatiana Bradley 92d928682a data/reports: add GO-2022-1144.yaml
Aliases: CVE-2022-41717

Updates golang/vulndb#1144

Change-Id: I7ac8c7020a91486cea5dbf5895f7566b6cd94919
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/456057
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
2022-12-08 19:01:21 +00:00
Maceo Thompson aad2780385 data/excluded: batch add GO-2022-1140, GO-2022-1138, GO-2022-1135, GO-2022-1133, GO-2022-1141, GO-2022-1137, GO-2022-1136
Fixes golang/vulndb#1140
Fixes golang/vulndb#1138
Fixes golang/vulndb#1135
Fixes golang/vulndb#1133
Fixes golang/vulndb#1141
Fixes golang/vulndb#1137
Fixes golang/vulndb#1136

Change-Id: I8c9a861bea8c29a5b761e57f6866ab8c8dc24ddb
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/456015
Reviewed-by: Maceo Thompson <maceothompson@google.com>
Run-TryBot: Maceo Thompson <maceothompson@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-12-08 16:36:04 +00:00
Julie Qiu 1fb0b4df3d data/reports: add GO-2022-1113.yaml
Aliases: CVE-2022-39383, GHSA-m5xf-x7q6-3rm7

Fixes golang/vulndb#1113

Change-Id: Idc5c6c320d0615089d6ccc634ab35416847c1133
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/455159
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Julie Qiu <julie@golang.org>
Auto-Submit: Julie Qiu <julieqiu@google.com>
Run-TryBot: Julie Qiu <julieqiu@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-07 18:45:56 +00:00
Julie Qiu 7faecd4fa5 data/reports: add GO-2022-1114.yaml
Aliases: CVE-2022-41920, GHSA-pp3f-xrw5-q5j4

Fixes golang/vulndb#1114

Change-Id: I122162a22d5c9044fbbb1f661b1c712d0f042dda
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/455158
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Julie Qiu <julieqiu@google.com>
Auto-Submit: Julie Qiu <julieqiu@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-07 18:39:23 +00:00
Julie Qiu ce8635421e data/excluded: batch add GO-2022-1115, GO-2022-1132
Fixes golang/vulndb#1115
Fixes golang/vulndb#1132

Change-Id: I243ae8b9182e648910a720a4047cea2bb6df9df4
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/455157
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Julie Qiu <julie@golang.org>
2022-12-07 18:24:18 +00:00
Tatiana Bradley a0dc784588 internal/report: fix MITRE link
Add "www" to MITRE link prefix so that the link displayed in
"cve publish" works.

Change-Id: I5d066e301b7d39addbc6cfa104576d855beb253b
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/455858
Auto-Submit: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
2022-12-07 16:21:44 +00:00
Tatiana Bradley aeb44f8f36 cmd/vulnreport: fix filepath bug in vulnreport cve
The vulnreport cve command previously attempted to publish the
CVE record to an incorrect filepath.

This was caused by calling the writeCVE function with the YAML filepath
as input instead of the Go ID.

Change-Id: Ic3191d2d4486074349d548a6e661d59c15c561ae
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/455857
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
2022-12-07 16:09:16 +00:00
Tatiana Bradley 917b41dd47 data/reports: add GO-2022-1143.yaml
Aliases: CVE-2022-41720

Updates golang/vulndb#1143

Change-Id: I40e14e1a06931ac64ef5f7265340cf68d9d8c54e
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/455737
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-12-07 16:08:45 +00:00
Tatiana Bradley 65654d5902 deploy: add Validate step to deploy script
Adds two steps, CopyExisting and Validate to the vulndb deploy script,
to ensure that the existing and new databases are valid internally
and with respect to each other. Deploy will not proceed if validation
fails.

(Reinstates https://go-review.git.corp.google.com/c/vulndb/+/452771
with fix. The bug was a missing "-c" flag in CopyExisting).

For golang/go#56417

Change-Id: I0ef8e38a6679225e8b7b02a9b4b39c18a975ba9a
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/455315
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
2022-12-06 15:52:40 +00:00
Tatiana Bradley 5b6b137faa cmd/vulnreport: put each fixed bug on its own line
In vulnreport create-excluded, each "Fixes #XXX" statement is now
on its own line, so that issues are auto-closed.

Change-Id: I359d8a846e644a89935db1bc8559eca50df20986
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/454561
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Maceo Thompson <maceothompson@google.com>
2022-12-05 15:37:22 +00:00
Maceo Thompson ba206762c6 internal/worker: more clearly format cross references for new issues
Previously, the worker would print xrefs in a way that would have all xrefs on the same line when rendered from markdown. This change makes it so that
each xref is on it's own line/bullet point.

Change-Id: I4d1ef41122cf3419555e2f57c8f3f4a261b85d48
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/454557
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Maceo Thompson <maceothompson@google.com>
2022-12-02 18:27:42 +00:00
Maceo Thompson 1f31c08356 internal/worker: worker now includes cross references in newly filed issue descriptions
Whenever the worker files a new issue on the tracker for a GHSA or CVE, it includes cross references (shared CVEs, GHSAs, or modules exluding std and cmd) in the issue description.

Change-Id: I8c10e2f9835c7ddae7ad0427c219edc04a9a7ef6
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/453501
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Maceo Thompson <maceothompson@google.com>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-12-01 20:04:53 +00:00
Tatiana Bradley 59b3da85b0 cmd/cve: support issue IDs in cve publish
In "cve publish", allow argument to be a Github issue ID instead of
a filename.

Change-Id: I975030f0a5c9f771dbb1e85fca28b5a88098500e
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/454016
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
2022-11-30 17:16:45 +00:00
Maceo Thompson ce9a0a2a25 internal/report, cmd/vulnreport: move some xref logic into it's own function in the report module
The actual comparison logic in xref has been moved to report.XRef(), which will make b/259438778 easier and cleaner.
This also allows us to test the base xref functionality.

Change-Id: Ib973e6e16e792f18a033d915bfbb13c1bdb3be27
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/454096
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Maceo Thompson <maceothompson@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-11-30 16:20:57 +00:00
Tatiana Bradley a5fdc7c5fc internal/worker: (cleanup) use type-switch instead of function param
Remove function parameter "newBody" in createIssue and replace
with a type switch. This will make a future change (adding xrefs)
simpler.

Change-Id: I958b422f6cf4c8308d862e4bed12aa612212bc3f
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/454095
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
2022-11-29 23:09:40 +00:00
Maceo Thompson 8440bccb87 internal/report, cmd/vulnreport: refactor reports.GetAllExisting() to take a git repository.
This change makes a few things possible: we add testing for GetAllExisting, and it allows us to add xref-like functionality to the worker in the future (see https://b.corp.google.com/issues/259438778)

Change-Id: Ia183d29f0d77c01dc7cb4b228be0b9f85f8ada62
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/454015
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Maceo Thompson <maceothompson@google.com>
2022-11-29 22:10:56 +00:00
Julie Qiu 6a297125ba data/excluded: batch add GO-2022-1127, GO-2022-1126
Fixes golang/vulndb#1127, golang/vulndb#1126

Change-Id: Ibe5144135e06fca3fb7f98c7b526c3e43e2443b1
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/453939
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Julie Qiu <julie@golang.org>
2022-11-29 18:04:02 +00:00
Julie Qiu bf4f930336 data/reports: add GO-2022-1129.yaml
Aliases: CVE-2022-41912, GHSA-j2jp-wvqg-wc2g

Fixes golang/vulndb#1129

Change-Id: Ia0ba316da7179b21035db9203a6c3725ac3cbfec
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/453937
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Julie Qiu <julie@golang.org>
2022-11-29 18:03:21 +00:00
Julie Qiu df910125ba data/reports: add GO-2022-1130.yaml
Aliases: CVE-2022-46146

Fixes golang/vulndb#1130

Change-Id: Ibcab35748e93ef6e8504b5c7359027e0ed1c29c9
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/453936
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Julie Qiu <julie@golang.org>
2022-11-29 16:33:47 +00:00
Julie Qiu f2de043f36 data/reports: update GO-2022-0972.yaml to include GHSA-jr77-8gx4-h5qh
For golang/vulndb#972
Fixes golang/vulndb#1112

Change-Id: I2ed24dbe02eacb25ac3870005c28930d78b92bf3
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/453938
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Julie Qiu <julieqiu@google.com>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Auto-Submit: Julie Qiu <julieqiu@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
2022-11-29 16:21:56 +00:00
Julie Qiu 1e78814bd4 data/excluded: batch add GO-2022-1119 and GO-2022-1120
Fixes golang/vulndb#1119
Fixes golang/vulndb#1120

Change-Id: Id7b7b3cc0c47e4c1e5868db170800f28dd7bd56d
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/453935
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-11-29 16:19:49 +00:00
Tatiana Bradley 8c299a5c11 vulndb/deploy: revert failing validate step
Remove CopyExisting and Validate steps while we investigate failure.

Change-Id: I555f47a97a45c37c437943f395f744c155fc0537
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/453856
Auto-Submit: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
2022-11-29 15:51:28 +00:00
Tatiana Bradley 11e4f84c4e vulndb/deploy: add -p
Change-Id: Ifadbc72e539e533a4f512d2de4c713f17a69fa6c
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/453855
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-11-28 22:34:57 +00:00
Tatiana Bradley 31177117bd vulndb/deploy: fix failing deploy script
Deploy failed with "bash: gsutil -q -m cp -r gs://go-vulndb /workspace: No such file or directory". This change attempts to fix.

Change-Id: I3daa9a828050ef352831106e3d2a6967d6dcce3b
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/453835
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
2022-11-28 22:15:33 +00:00
Tatiana Bradley 8622df33c6 deploy: add Validate step to deploy script
Adds two steps, CopyExisting and Validate to the vulndb deploy script,
to ensure that the existing and new databases are valid internally
and with respect to each other. Deploy will not proceed if validation
fails.

For golang/go#56417

Change-Id: I9c522cfb9e3f66f3538d9bc9c89f927692f2c96e
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/452771
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
2022-11-28 21:48:20 +00:00
Tatiana Bradley f983c1a9a8 internal/database: add more tests for Load
Adds tests for Load failure cases, adds more context to error message,
and adds an additional failure case.

For golang/go#56417

Change-Id: If4927c11f433c931827b262ee65a04f3594a125a
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/453175
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-11-28 21:45:20 +00:00
Tatiana Bradley 5d80fbd803 internal/database: add logic to validate a new deploy
Adds a function, Validate, which checks a candidate Go vulnerability
database against an existing one, to ensure that both databases are
valid, timestamps are consistent and no OSV entries would be deleted.

Moves single-database validation logic (previously called Validate) to
the Load function, so that Load now loads and checks a database.

Also adds a command line tool, "checkdeploy" which calls the new
Validate function. This tool will be used in the deploy script for vulndb.

For golang/go#56417

Change-Id: Ifa12234376f2a3fd577d96978919b167fcb25f64
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/452443
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2022-11-28 21:44:38 +00:00
Jonathan Amsterdam 750d137f0f data/excluded: batch add GO-2022-1121
Fixes golang/vulndb#1121

Change-Id: I243659601a444d19776c28348dc054e2347690f2
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/452756
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-11-22 18:14:28 +00:00
Jonathan Amsterdam 6d6e58f440 cmd/vulnreport: avoid displaying access token
The help text previously included the value of VULN_GITHUB_ACCESS_TOKEN.

Change-Id: Ie65506376acb4f5d5cc36f611235714d4a13ea30
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/452755
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-11-22 18:14:22 +00:00
Tatiana Bradley 0397c86562 internal/database: add Validate function
Adds a function, Validate, which checks a Go vulnerability for
internal consistency. Also adds a command line tool, "checkdb" which
can be used to validate databases.

This tool will be used in the deploy script for vulndb.

For golang/go#56417

Change-Id: I427eab6b5385d3c858d4a371d90e6e5f54f10812
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/448842
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-11-22 17:36:48 +00:00
Arnau Diaz b484d034b5 internal: removes unused helper function isCVE
I guess this was attempted to be used here: b776e182e6/internal/ghsa/ghsa.go (L206)

Change-Id: Ie9fd51079210dbb653c483b48c0dd27ac2f12165
GitHub-Last-Rev: b776e182e6
GitHub-Pull-Request: golang/vulndb#1116
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/452295
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-11-22 17:08:48 +00:00
Tatiana Bradley 2612031517 internal/database: fix bug in Write where top-level dir was not created
Change-Id: Id601089bd699ffc59a86527730cccf7abbb55f1c
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/452442
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Auto-Submit: Tatiana Bradley <tatiana@golang.org>
2022-11-22 15:50:10 +00:00
Maceo Thompson 93f50fcb7c internal/report, data/osv: populate schema_version field in osv entries
The vulnreport osv command now populates all generated osvs with the current schema version (1.3.1).
This CL also updates all previous OSV entries to also have the current schema version.

Change-Id: Ie95c91aae0ee623bbf50ff047190a0bbe59893d9
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/452440
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Maceo Thompson <maceothompson@google.com>
2022-11-21 19:50:45 +00:00
Maceo Thompson 01601d1d30 all: update version of x/vuln used in x/vulndb
Change-Id: Id6d01d71a6c1cc412ee073986ae80def1122bd20
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/452439
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Maceo Thompson <maceothompson@google.com>
2022-11-21 19:36:32 +00:00
Maceo Thompson 4f346b5d5a doc/triage: add documentation for the create-excluded cmd
This change adds documentation/instructions for batch creating excluded reports.

Change-Id: Ib5f17129692b9d166606680c6fe63b36cc1cfc56
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/451288
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Maceo Thompson <maceothompson@google.com>
2022-11-21 17:37:13 +00:00
Tatiana Bradley defb58054b all: refactor to move code to more logical places
Change-Id: Icb02879dcd0ff78a72e1e250677f2c26c9ac08a7
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/451289
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-11-21 16:40:27 +00:00
Tatiana Bradley 19012c1fce data/reports: update GO-2022-0380.yaml and GO-2022-0386.yaml
Move advisory link from description text to references section.

Updates golang/vulndb#380, golang/vulndb#386

Change-Id: I3b9305d17d5b101946ec756a4b54e0cae8eaa950
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/451287
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-11-18 21:27:14 +00:00
Maceo Thompson e2eba22a51 x/vulndb: add a check to ensure that GHSAs and CVEs are not repeated across reports
Change-Id: Ibbde79bb08d4c540202ac6dca9e9fff0221e0c0d
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/451286
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Maceo Thompson <maceothompson@google.com>
2022-11-18 20:53:47 +00:00
Maceo Thompson 852de697b5 internal/ghsa: check for exact matches in ghsa.ListForCVE()
Previously, the query in ListForCVE would allow partial matches, meaning a CVE like "CVE-2022-2529" will pull in GHSAs for the CVE "CVE-2022-25295". ListForCVE now filters out these incorrect matches after the query is made.

Change-Id: I5d2fcbc71e9533caa93b0b3c1679f2df08cfe5f4
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/451315
Run-TryBot: Maceo Thompson <maceothompson@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-11-18 20:10:35 +00:00
Tatiana Bradley 2680619f36 data/excluded: delete GO-2022-0819, dupe of GO-2022-1040
For golang/vulndb#819, golang/vulndb#1040

Change-Id: I1af911998bfc0bdc413d12f363fccb6b2fe078e8
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/451282
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-11-18 19:48:52 +00:00
Tatiana Bradley 1532d16f4f data/reports: update GO-2022-0384.yaml and delete dupe GO-2022-0918
Add advisory link for GO-2022-0384 and delete GO-2022-0918 which is a
duplicate of it.

Aliases: CVE-2021-32690, GHSA-56hp-xqp3-w2jf, GHSA-7jr6-prv4-5wf5

Updates golang/vulndb#384, golang/vulndb#918

Change-Id: Iad28e1aeea5587d8ee49680a2fd28494f3b14bda
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/451281
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
2022-11-18 19:48:43 +00:00
Tatiana Bradley cf2c79e4bf data/excluded: reclassify GO-2022-0368.yaml as dependent
GO-2022-0368 is dependent on GO-2020-0008. Remove the CVE, which actually
refers to the upstream vuln, and re-classify as DEPENDENT_VULNERABILITY.

Aliases: GHSA-gv9j-4w24-q7vx

Updates golang/vulndb#368, golang/vulndb#8

Change-Id: Ide59a0ef1c529d66fb5511cafeea9559b372ca07
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/451280
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-11-18 19:48:32 +00:00
Tatiana Bradley d52484671f data/excluded: delete duplicate GO-2022-1103
Duplicate of GO-2022-1101

For golang/vulndb#1103, golang/vulndb#1101

Change-Id: Ib7bb56af9e294241300cc16672f462f027d71b11
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/451279
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-11-18 19:48:23 +00:00
Tatiana Bradley a70a618edf data/excluded: merge GO-2022-1100.yaml and GO-2022-1102
Merge duplicate reports.

Aliases: CVE-2022-39395, GHSA-5m7g-pj8w-7593

Updates golang/vulndb#1100, golang/vulndb#1102

Change-Id: I6351bfe10fe7ca7ad2323c937248ff36db1e4f6e
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/451278
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
2022-11-18 19:48:13 +00:00