This file tells you how to report a vulnerability in usql, which versions get
a fix, and how usql checks the modules that it requires. GitHub shows this file
as the security policy of xo/usql.
Report a vulnerability privately, through the private vulnerability reporting of GitHub:
- Open https://github.com/xo/usql/security/advisories/new.
- Describe the vulnerability, the version of usql, and the steps that show it.
- Submit the report.
Only you and the maintainers can read the report. Do not report a vulnerability in a public place, such as a discussion or a pull request. The repository takes no issues.
If the vulnerability is in a module that usql requires, add the output of
govulncheck that shows how usql calls the code. The next section tells you
how to get it.
Only the latest release gets a fix. A fix goes into a new release. An older release gets no fix, so upgrade to the latest release to get one.
usql checks each module that it requires with govulncheck, against the Go
vulnerability database. govulncheck reports a vulnerability only when usql
calls the code that has it.
The workflow .github/workflows/vuln.yml runs govulncheck on each push, on
each pull request, and once each day. The database changes when the code of
usql does not, so the daily run finds a new vulnerability in a module that did
not change. The check fails only for a vulnerability in code that usql calls.
To run the same check, use the command that the workflow runs. It loads the packages with cgo, so it needs the headers of libicu and unixODBC, as a build does:
$ go run golang.org/x/vuln/cmd/govulncheck@latest -show verbose ./...A scanner reads the list of modules from the binary, and does not check whether usql calls the code that it flags. So a scanner can report a vulnerability in a module that usql requires but does not call.
Each release attaches the file usql-VERSION.vex.json, where VERSION is the
version of the release without its v. It is an OpenVEX document that
govulncheck writes when the release is built. For each known vulnerability
in a module that usql requires, it says whether usql calls the code that has
it. A vulnerability that usql does not call has the status not_affected.
Give the file to a scanner that reads OpenVEX, and the scanner drops the
vulnerabilities that usql does not call.
A vulnerability in code that usql does not call is not a security incident. usql takes the update of the module in the normal maintenance of its dependencies, and you do not have to report it.