all: move cve/ghsa utils to their own package

- Move some functions related to CVE/GHSA regex matching
to a new "idstr" package, as they are not related specifically to the
CVE5 or GHSA GraphQL format.

- Move all logic related to the cve5, cve4 and legacyGHSA formats in
the "internal/report" package to their own files, so it is easier to
(potentially) move these to their own packages in the future.

The goal of this CL is to reduce the risk of import cycles
for some upcoming refactors.

Change-Id: I7e14c31c17882230b783cc62e1ecdf43dcb98995
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/581717
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
24 files changed
tree: ef6982d57d53c80f626ce34913b5b97cf246e2e3
  1. .github/
  2. cmd/
  3. data/
  4. deploy/
  5. devtools/
  6. doc/
  7. internal/
  8. terraform/
  9. webconfig/
  10. .gitignore
  11. all_test.go
  12. checks.bash
  13. CONTRIBUTING.md
  14. go.mod
  15. go.sum
  16. LICENSE
  17. PATENTS
  18. README.md
  19. tools_test.go
README.md

The Go Vulnerability Database

Go Reference

This repository contains the infrastructure and internal reports to create the Go Vulnerability Database.

Check out https://go.dev/security/vuln for more information about the Go vulnerability management system.

Reporting a vulnerability or feedback

Click here to report a public vulnerability in the Go ecosystem, or give feedback about the project.

Privacy Policy

The privacy policy for govulncheck can be found at https://vuln.go.dev/privacy.

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 go.dev/security/vuln/database for information on how to access these entries.