Movatterモバイル変換


[0]ホーム

URL:


Go Vulnerability Database

Back to Go Vulnerability Management

Overview

The Go vulnerability database (https://vuln.go.dev)serves Go vulnerability information in theOpen Source Vulnerability (OSV) schema.

You can also browse vulnerabilities in the database atpkg.go.dev/vuln.

Do not rely on the contents of the x/vulndb Git repository. The YAML files in thatrepository are maintained using an internal format that may changewithout warning.

Contributing

We would love for all Go package maintainers tocontributeinformation about public vulnerabilities in their own projects,andupdate existing information about vulnerabilitiesin their Go packages.

We aim to make reporting a low friction process,so feel free tosend us your suggestions.

Pleasedo not use the forms above to report a vulnerability in the Gostandard library or sub-repositories.Instead, follow the process atgo.dev/security/policyfor vulnerabilities about the Go project.

API

The canonical Go vulnerability database,https://vuln.go.dev,is an HTTP server that can respond to GET requests for the endpoints specified below.

The endpoints have no query parameters, and no specific headers are required.Because of this, even a site serving from a fixed file system (including afile:// URL)can implement this API.

Each endpoint returns a JSON-encoded response, in either uncompressed(if requested as.json) or gzipped form (if requested as.json.gz).

The endpoints are:

Bulk download

To make it easier to download the entire Go vulnerability database,a zip file containing all the index and OSV files is available atvuln.go.dev/vulndb.zip.

Usage ingovulncheck

By default,govulncheck uses the canonical Go vulnerability database atvuln.go.dev.

The command can be configured to contact a different vulnerability database using the-db flag,which accepts a vulnerability database URL with protocolhttp://,https://, orfile://.

To work correctly withgovulncheck, the vulnerability database specified must implement the API described above. Thegovulncheck command uses compressed “.json.gz” endpoints when reading from an http(s) source, and the “.json” endpoints when reading from a file source.

Legacy API

The canonical database contains some additional endpoints that are part of a legacy API.We plan to remove support for these endpoints soon. If you are relying on the legacy APIand need additional time to migrate,please let us know.

Schema

Reports use theOpen Source Vulnerability (OSV) schema.The Go vulnerability database assigns the following meanings to the fields:

id

The id field is a unique identifier for the vulnerability entry. It is a stringof the format GO-<YEAR>-<ENTRYID>.

affected

Theaffected field is aJSON array containing objects that describes the module versions that containthe vulnerability.

affected[].package

Theaffected[].packagefield is a JSON object identifying the affectedmodule. The object has tworequired fields:

affected[].ecosystem_specific

Theaffected[].ecosystem_specificfield is a JSON object with additional information about the vulnerability,which is used by Go’s vulnerability detection tools.

For now, ecosystem specific will always be an object with a single field,imports.

affected[].ecosystem_specific.imports

Theaffected[].ecosystem_specific.imports field is a JSON array containingthe packages and symbols affected by the vulnerability. Each object in thearray will have these two fields:

database_specific

Thedatabase_specific field contains custom fields specific to the Go vulnerability database.

database_specific.url

Thedatabase_specific.url field is a string representing the fully-qualifiedURL of the Go vulnerability report, e.g, “https://pkg.go.dev/vuln/GO-2023-1621".

database_specific.review_status

Thedatabase_specific.review_status field is a string representing the reviewstatus of the vulnerability report. If not present, the report should beconsideredREVIEWED. The possible values are:

For information on other fields in the schema, refer to theOSV spec.

Note on Versions

Our tooling attempts to automatically map modules and versions insource advisories to canonical Go modules and versions, in accordance withstandardGo module version numbers. Tools likegovulncheck are designed to rely on these standard versions to determinewhether a Go project is affected by a vulnerability in a dependency or not.

In some cases, such as when a Go project uses its own versioning scheme,the mapping to standard Go versions can fail. When this happens, the Govulnerability database report may conservatively list all Go versions asaffected. This ensures that tools such asgovulncheck do not fail to reportvulnerabilities due to unrecognized version ranges (false negatives).However, conservatively listing all versions as affected may cause tools toincorrectly report a fixed version of a module as containing the vulnerability(false positives).

If you believegovulncheck is incorrectly reporting (or failing to report) avulnerability, pleasesuggest an editto the vulnerability report and we will review it.

Examples

All vulnerabilities in the Go vulnerability database use the OSV schemadescribed above.

See the links below for examples of different Go vulnerabilities:

Excluded Reports

The reports in the Go vulnerability database are collected from differentsources and curated by the Go Security team. We may come across a vulnerability advisory(for example, a CVE or GHSA) and choose to exclude it for a variety of reasons.In these cases, a minimal report will be created in the x/vulndb repository,underx/vulndb/data/excluded.

Reports may be excluded for these reasons:

At the moment, excluded reports are not served viavuln.go.dev API. However, if you havea specific use case and it would be helpful to have access to this informationthrough the API,please let us know.

go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2026 Movatter.jp