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

1030 Коммитов

Автор SHA1 Сообщение Дата
Roland Shoemaker 3361bb77ec client: only fetch necessary packages when cache missing
When a httpSource is used without a Cache implementation, only fetch
packages which are represented in the index. Previously if there
wasn't a Cache implementation every pacakge was enumerated, ignoring
the contents of the retrieved index.

Change-Id: I8e8e0ce412b3ded188afd6bb109d96efb7e7f27c
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/333455
Trust: Roland Shoemaker <roland@golang.org>
Trust: Zvonimir Pavlinovic <zpavlinovic@google.com>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
2021-07-09 18:46:46 +00:00
Roland Shoemaker cf0f9f1f87 osv: don't prefix semver strings
In order to match the current state of the public vulnerability format,
don't prefix SEMVER strings with 'v' or 'go' so that they are valid.

Also update osv.Affects.AffectsSemver so that it can take SEMVER strings
which either do or don't have the prefix.

Change-Id: I879f5c0387338290fe0aaa7ab8391e1c19de681e
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/326489
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2021-06-16 17:01:26 +00:00
Roland Shoemaker 2490cf76e1 reports: fix GO-2021-0061 and GO-2021-0036
Both were missing symbols in the additional_packages section.

Change-Id: I65d159ef58d169743ead440c2fa79d71e183285a
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/326509
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2021-06-16 16:41:16 +00:00
Roland Shoemaker 00d086a653 reports: add fixed version to additional package in GO-2020-0015
Change-Id: Iae569bcee25f3cd7c013fc29fd416d80f473b927
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/325709
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2021-06-16 16:41:06 +00:00
Roland Shoemaker 68c54abf6c client: skip test on js
Since it doesn't support doing things with sockets.

Updates golang/go#46419.

Change-Id: I22c86706d5ab9ffc6b62ca850aab6621eddedea7
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/324089
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2021-06-02 14:32:43 +00:00
Roland Shoemaker 88cf1226ab report,cmd/gendb: use lowercase JSON keys and fix public URL
Change-Id: Iaf276b94700bf66abe24e14aad04904571b3e6a4
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/323949
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2021-06-02 14:32:24 +00:00
Roland Shoemaker 090c04e1ab client: de-flake client tests
Fixes #46419

Change-Id: Ifedc05f1f00dfca1fc0816df887588d9427d8fd2
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/323132
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2021-06-01 16:08:35 +00:00
knqyf263 fb8be7b854 cmd/gendb: fix flag defaults
Looks like the usage specification is wrong.

Before:

```
$ gendb -h
Usage of gendb:
  -out string
         (default "Directory to write JSON database to")
  -reports string
         (default "Directory containing toml reports")
```

After:

```
$ gendb -h
Usage of /var/folders/j7/pvz71jxn637dqd96gm80nhwm0000gn/T/go-build330871962/b001/exe/main:
  -out string
        Directory to write JSON database to (default "out")
  -reports string
        Directory containing toml reports (default "reports")
```

Change-Id: I47fd858bdcb19eb22e5aefc7d891497c58e567ba
GitHub-Last-Rev: 07a42f8685fd760933d6c86659e8dd28d43577e5
GitHub-Pull-Request: golang/vulndb#3
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/314550
Reviewed-by: Roland Shoemaker <roland@golang.org>
Trust: Michael Knyszek <mknyszek@google.com>
2021-06-01 15:56:02 +00:00
Roland Shoemaker c856ba870e report,osv,client: update schema to current state
Match the current state of https://tinyurl.com/vuln-json, also fix a
minor bug in deploy-db.sh.

Change-Id: Ib6c225637cb538ef263b7bf182d30e36e76a43e3
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/321509
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
2021-05-21 02:20:14 +00:00
Roland Shoemaker e0c00fae09 osv: document package
Change-Id: I4a46a2b83792f41daf97e76833bd71177eb32902
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1063815
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-20 18:00:48 +00:00
Roland Shoemaker 820ef4ac37 client: document package
Change-Id: Id753622aded1f846a8445a6946c8374bb6eae06a
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1063695
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-20 18:00:44 +00:00
Roland Shoemaker 24a767727c reports: more consistent description tone
Also remove a few improper reports, and format all of the YAML
a bit more nicely.

Change-Id: I1d4d79578228a775489c286991dbe1386e079a66
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1062398
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-20 15:58:58 +00:00
Filippo Valsorda 68e64dc8d4 README: add provisional GCS bucket link
Change-Id: I6a8e08cb89341e33dba0c9cee94cc26e93a1ac59
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1061625
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-19 18:20:25 +00:00
Filippo Valsorda aca001ad4f all: go mod tidy
Change-Id: I9a21ef4bab1014d3b074152b0accaa58ba3f3a8d
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1061624
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-19 18:20:21 +00:00
Roland Shoemaker bcd0039f11 all: add script for deploying to GCS bucket
Change-Id: Id11633d0b20c0a45b4d56756ddda0725ae1a73af
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1055927
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-15 15:37:03 +00:00
Roland Shoemaker a3a17c9816 all: switch from toml to yaml
Change-Id: I9fb36a246d0d532e44a28903998b9750cf794a85
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1055925
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-14 20:04:52 +00:00
Roland Shoemaker 29b7148a1c reports: add back additional_packages for go-yaml with no verions
Blergh, all incompatible version of github.com/go-yaml/yaml are vulnerable,
so add it back with an empty versions list.

Change-Id: I881192ea57e4be02fb534d7a1f2951a004c7e648
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1055920
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-14 18:57:23 +00:00
Roland Shoemaker 8b1e4d6fb8 reports: remove additional packages for go-yaml/yaml
Change-Id: I33523cc454b1280462b888e16a93e8b401864948
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1055919
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-14 18:51:54 +00:00
Roland Shoemaker 66107ed5cd all: switch to the new shared vuln schema
Change-Id: Ibbbf153cc8078884bf9ac5a3a8b01a75894abb17
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1055915
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-14 18:10:57 +00:00
Roland Shoemaker 3cd20f4809 reports: add remaining triaged CVEs
And add the false-positives to the triaged-cve-list.

Change-Id: I64188841372d99d6b91bb1dc602f6312c9b6b5ce
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1054739
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-14 00:37:40 +00:00
Filippo Valsorda 087c0613c0 all: add license headers and CONTRIBUTING.md
Change-Id: Icb46b1d9d8f3f1db6066b729e511cbd0ff94f113
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1054184
Reviewed-by: Filippo Valsorda <valsorda@google.com>
2021-04-13 21:05:53 +00:00
Filippo Valsorda 988b93d5f1 all: add licensing boilerplate and update README
Change-Id: I79bcdc1d868fccbb778ccdef23a4ad7389cf5bfe
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1054183
Reviewed-by: Filippo Valsorda <valsorda@google.com>
2021-04-13 20:32:20 +00:00
Roland Shoemaker 91bf12f5f8 reports: add a handful of CVEs
Results of testing new CVE triaging tooling. Also adds a file which
tracks which CVEs have been triaged. Still need to add all of the
false positives, but would like to fine tune the triage tooling first
to hopefully cut down the number of them.

Change-Id: I7591b10f5abc5e73b6a3291beeaedca0032ad02f
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1053804
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-13 18:22:00 +00:00
Zvonimir Pavlinovic 0cb7a210b0 client: adds unit tests and addresses minor issues.
Change-Id: I9151991794618c11cca9dffb3b79ebbb42989d16
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1036403
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-13 16:18:34 +02:00
Roland Shoemaker 3455efa778 all: use consistent index type across packages
All reports still need to have their published fields set.

Change-Id: I64feda32742bb5f85e310211f8da270e4346ad6b
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1036000
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-13 16:18:34 +02:00
Zvonimir Pavlinovic b88680fc68 client: allows fsCache to be publicly accessable for go audit.
fsCache is the only cache implementation available. In order to be
integrated in goaudit, it needs to be made publicly accessable as
go audit and cache do not live in the same repo. fsCache will be made
private again once go audit and client live in the same space in the
near future.

Change-Id: I4dd86f407ce83f2162e8a1921f86643bbefdd456
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1033548
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-13 16:18:34 +02:00
Roland Shoemaker 2992f259b8 all: use the proxy for report linting
Check the proxy to determine valid versions and canonical module
import paths. This should provent rogue database entries that
do not cleanly apply to real go.mod files.

Change-Id: Iea1b531fe5bed7a0825102c6ac877a515f24c0f5
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1032616
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-13 16:18:34 +02:00
Zvonimir Pavlinovic 4d3e0cc221 reports: sets github.com/dgrijalva/jwt-go as incompatible.
github.com/dgrijalva/jwt-go is not module per se. Hence, its pkg
versions require +incompatible annotation. Also, corresponding pkgs do
not have /vX suffixes.

Change-Id: I434b1a6af7ecd22b161d344a2ffe115fa9b883e9
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1027982
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-13 16:18:34 +02:00
Zvonimir Pavlinovic 42b5a4503a report: fixes a nil dereference when accessing vuln cve metadata.
Some vulnerabilities, such as GO-2020-0002.toml, do not have CVE
metadata. Accessing CVEMetadata.ID without checking if CVEMetadata is
nil can lead to a nil dereference.

Change-Id: I06a24a7d80a0e8be768af198a1b6254f15de98d3
Reviewed-on: https://team-review.git.corp.google.com/c/golang/vulndb/+/1026682
Reviewed-by: Roland Shoemaker <bracewell@google.com>
2021-04-13 16:18:34 +02:00
Roland Shoemaker abe7a418ae all: initial commit 2021-04-13 16:18:02 +02:00