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

14 Коммитов

Автор SHA1 Сообщение Дата
Zvonimir Pavlinovic b9638e6227 all_test: remove TestMissingReports
Updates golang/go#56139

Change-Id: I6288b65cb073730b6069512b0259a0a1e09519ed
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/464935
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
2023-02-02 21:53:37 +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
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 b8b87b14ca data: add the saved CVE 5.0 JSON records and associated testing
Tests now enforce that a CVE JSON 5.0 record is stored in data/cve/v5 for each YAML report that sets cve_metadata.

The now-required files for all existing reports are added.

Fixes golang/go#56302

Change-Id: I0731792cd80e672d5be7e753370d6f97e450562d
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/444576
Reviewed-by: Maceo Thompson <maceothompson@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Maceo Thompson <maceothompson@google.com>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-10-21 15:49:16 +00:00
Julie Qiu 51ecc51c91 all_test: add test to compare data/osv and vuln.go.dev
The test is currently skipped because it fails on TryBots.

We plan to add it as a step in the deployment process to make sure that
not reports are ever deleted.

For golang/go#56139

Change-Id: If481a607174efceb73d22d6438d0465f035d40c0
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/440635
Reviewed-by: Julie Qiu <julieqiu@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Julie Qiu <julieqiu@google.com>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Julie Qiu <julieqiu@google.com>
2022-10-14 02:31:25 +00:00
Tatiana Bradley 2551a34d3f x/vulndb: remove redundant check in all_test
Lint already checks for misuse of the 'excluded' field, so we don't
need to re-check it. Also renames some variables to increase clarity.

Change-Id: Ia801c9b1a7afcd34c966f0ad47a3a083f2db6b4b
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/434615
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tatiana Bradley <tatiana@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
2022-09-26 18:01:06 +00:00
Damien Neil 2c15bf76e7 all: generate database from data/osv
Change-Id: Ib055df304582293c1c796de34427d40c3a6f623b
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/430683
Run-TryBot: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
2022-09-20 15:16:16 +00:00
cui fliter c957d8f9cd all: replace io/ioutil with io and os package
Change-Id: I3c6860d1758ac49b13fbb545e1e1957e345153ae
GitHub-Last-Rev: 9f43b2bf41
GitHub-Pull-Request: golang/vulndb#997
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/430855
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
2022-09-15 00:44:45 +00:00
Jonathan Amsterdam 90283d9de5 all_test.go: only lint .yaml files
Avoid linting editor backup files in the data/reports directory.

Change-Id: I50306cb82460b92c9fad94b2f8f5e418d3153333
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/425093
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
2022-08-22 19:41:34 +00:00
Damien Neil ba94ff5643 all: move reports/ and excluded/ to data/ directory
Put the database (active and excluded reports) under a common
directory prefix.  This simplifies applying separate licenses to
the code and the database.

Change-Id: Icb2a987b96dca18a8fb064dfd9c6d67d6620e2e3
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/423394
Reviewed-by: Julie Qiu <julieqiu@google.com>
2022-08-12 21:03:42 +00:00
Damien Neil 74a8e0131d all: add support for excluded reports
Add support for recording the reason no report exists for a CVE or GHSA.
Excluded reports are placed in the excluded/ directory, and follow the
same format as normal reports except:

  - Excluded reports have a "excluded" field indicating why the
    report has been excluded.
  - Excluded reports must have at least one associated CVE or GHSA.
  - Excluded reports need have no other fields set.

Change-Id: I4b346567bd2b0ac08c78a9bc5ae26f721a8c3147
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/422638
Reviewed-by: Julie Qiu <julieqiu@google.com>
2022-08-11 18:46:24 +00:00
Julie Qiu e508e328bd internal: remove report.CVE
The report.CVE field is removed and all references are replaced with
report.CVEs.

Change-Id: Id9ecab099844ab6178a2eb82412eea3233ab9511
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/375395
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Vulndb-Deploy: Julie Qiu <julieqiu@google.com>
2022-01-04 20:45:20 +00:00
Julie Qiu 733040acc3 tests: merge lint_test.go and all_test.go
TestLintReports is moved to all_test.go to consolidate files.

Change-Id: If656af2136c755e29eb8e9171e8e7a341013a825
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/373501
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2021-12-20 22:18:01 +00:00
Julie Qiu 604036612d checks.bash: replace all.bash
all.bash is replaced with the checks.bash setup from x/vuln, so that
tests run on TryBots.

Change-Id: I49f2265343e9e962b8587eb9a733a52651466737
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/373156
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
2021-12-20 22:06:07 +00:00