This document is a quick guide our new (evolving) process for handling vulnerability issue triage in the x/vulndb issue tracker.
Other useful docs:
Consider using the go/go-vuln-triage-tool internally.
NEW: To triage all issues, create reports that can be created automatically, and commit them, run:
./devtools/vulntriage.sh-
Assign any unlabeled, unassigned issues on the tracker to yourself.
-
If you haven't already, follow the one-time-setup process.
-
Sync the vulndb repo, re-install vulnreport and switch to a fresh branch, e.g.:
$ cd vulndb $ git sync $ go install ./cmd/vulnreport $ git checkout -b reports -
Auto-triage the outstanding issues by running
$ vulnreport triage
See
vulnreport triagefor more info and options for this command.
- For all reports marked
duplicate, quickly double-check if the label is correct (it usually is).
- If correct: close the issue.
- If incorrect: remove the
duplicatelabel, delete the duplicate comment, and ensure thetriagedlabel is present.
-
For all reports marked
possibly not Go, determine if the label is correct by investigating the report to see if the vulnerability affects Go code.- If correct: replace the
possibly not Golabel with theexcluded:NOT_GO_CODElabel. - If incorrect: remove the
possibly not Golabel and ensure thetriagedlabel is present.
Once labeled, you can create excluded reports for these using the
vulnreport create-excludedcommand (See triage guide for usage). - If correct: replace the
All remaining open issues marked triaged now need standard reports.
Issues marked triaged (but not high priority or possible duplicate)
need an UNREVIEWED report. Issues marked triaged and high priority
need a REVIEWED report.
- Batch create all reports assigned to you:
$ vulnreport -user=<github_username> create- Check for UNREVIEWED reports with lint errors, and edit these reports
to fix the errors. (Run
vulnreport lint NNNto check if the errors are fixed). If there are no errors, do not edit the report. - Batch fix and commit the UNREVIEWED reports:
$ vulnreport -status=UNREVIEWED -batch=20 commit-
For each REVIEWED report: a. Fill in all the TODOs using doc/format.md as a guide. b. Fix the report and add derived files:
$ vulnreport fix NNN
c. If
fixfails, edit the report until it succeeds. d. Commit the report:$ vulnreport commit NNN
-
Mail the CLs and add a team member as a reviewer.
-
Clone the x/vulndb repository:
git clone https://go.googlesource.com/vulndb. -
Get a GitHub access token with scope
repo: public_repo(follow instructions for "personal access token (classic)").Store the token in a file, e.g.,
~/.github-token, and run:export VULN_GITHUB_ACCESS_TOKEN=`cat ~/.github-token`(you can also store this command in a~/.bashrcfile or similar). -
From the repo root, run
go install ./cmd/vulnreportto install the latest version of vulnreport tool.