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

8 Коммитов

Автор SHA1 Сообщение Дата
Tatiana Bradley 8c25e44800 internal/database: cleanup OSV test data
Adds schema version to all test OSV entries and ensures that test package
names are prefixed by test module names. This is to prepare for adding
stricter validation for OSV entries.

Change-Id: I06b37a8dd3ff753ad48e8cec8002a455d5676f35
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/495497
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
Run-TryBot: Tatiana Bradley <tatianabradley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
2023-05-17 16:12:18 +00:00
Tatiana Bradley 264b406b71 internal/osv, all: move DatabaseSpecific osv field
Moves DatabaseSpecific to be a field of the top-level osv.Entry, instead
of a subfield of the Affected field.

Change-Id: I8c80f8af268b51d57833268b89947838c53e407a
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/481136
Run-TryBot: Tatiana Bradley <tatianabradley@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-04-03 15:57:51 +00:00
Tatiana Bradley f9a3a05939 internal/osv, all: add osv.Time struct
Add and use a new struct, osv.Time, which is a wrapper for time.Time
and is used to ensure that times always marshal according to the OSV
spec.

Change-Id: I1bc8210d23260fe62d5f9ff017b2326c6450490f
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/480277
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Tatiana Bradley <tatianabradley@google.com>
2023-03-31 20:51:42 +00:00
Tatiana Bradley 04bee186e2 internal/osv, all: refactor osv (renames etc.)
This change re-names and adds comments to various fields of the
osv.Entry struct. It does not make any changes that affect the published
OSV.

Change-Id: I6da67baca873f7f883d8c1882f48f322cc97d515
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/480276
Reviewed-by: Julie Qiu <julieqiu@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
Run-TryBot: Tatiana Bradley <tatianabradley@google.com>
2023-03-31 20:05:49 +00:00
Tatiana Bradley 862ebba3b2 all: migrate to internal/osv
Migrate all of x/vulndb to use internal/osv instead of x/vuln/osv, except
for exported_functions.go which relies on other parts of x/vuln and will
be migrated later once the new vulncheck API is available.

Change-Id: I7a0ed884acbb8198e53721a14785903139acd500
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/479936
Reviewed-by: Julie Qiu <julieqiu@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
Run-TryBot: Tatiana Bradley <tatianabradley@google.com>
2023-03-29 14:38:15 +00:00
Tim King 1adc0c4d16 vulnreport: skip report symbols on std lib
Skip checkReportSymbols if some symbol is in a standard library
at a different Go version than the current runtime. Prevents
vulnreport fix from deleting symbols due to using a newer go
version.

Change-Id: I8be06da38408cba80a201b8724e73a5c3f5ca470
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/463499
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tim King <taking@google.com>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
2023-01-30 19:16:58 +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
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