internal/worker: update false positives only if newer

Instead of inserting false positives only once when the DB
is new, update them on each run.

That way, we can add to our list of false positives and have
those changes reflected in the DB.

To do that safely, we have to make sure we don't update a false
positive record that has changed since the program's internal data was
created. We use the commit times for that.

Change-Id: I39d21940af2a302f7860a7e8563a91c88621b12a
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/376298
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
5 files changed
tree: f3ada4b451b06a1f453abdc9653da728d3778b2f
  1. .github/
  2. cmd/
  3. deploy/
  4. devtools/
  5. doc/
  6. internal/
  7. reports/
  8. terraform/
  9. .gitignore
  10. all_test.go
  11. AUTHORS
  12. checks.bash
  13. CONTRIBUTING.md
  14. CONTRIBUTORS
  15. go.mod
  16. go.sum
  17. LICENSE
  18. PATENTS
  19. README.md
  20. tools_test.go
README.md

The Go Vulnerability Database

This repository contains the reports for the Go Vulnerability Database.

If you are interested accessing data from the Go Vulnerability Database, see x/vuln for information. This repository is only used for adding new vulnerabilities.

Reporting a vulnerability

We are not accepting new vulnerability reports at this time. We will update this README.md once we are ready to receive reports.

License

Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.

Database entries are distributed under the terms of the CC-BY 4.0 license. See x/vuln for information on how to access these entries.