Skip to content

Commit 29462d7

Browse files
author
Maceo Thompson
committed
vulncheck: update documentation for vex
Adds documentation/updates some tests & comments to reflect the introduction of the openVEX standard as a valid output format for govulncheck. fixes golang/go#62486 Change-Id: I88c6fc830439606441bb1855ba8b36642007738c Reviewed-on: https://go-review.googlesource.com/c/vuln/+/590575 Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com> Commit-Queue: Maceo Thompson <maceothompson@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent 2736e1d commit 29462d7

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

cmd/govulncheck/doc.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,16 @@ Govulncheck also supports Static Analysis Results Interchange Format (SARIF) out
6767
format, following the specification at https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=sarif.
6868
For more details, please see [golang.org/x/vuln/internal/sarif].
6969
70+
Govulncheck supports the Vulnerability EXchange (VEX) output format, following
71+
the specification at https://github.com/openvex/spec.
72+
For more details, please see [golang.org/x/vuln/internal/openvex].
73+
7074
# Exit codes
7175
7276
Govulncheck exits successfully (exit code 0) if there are no vulnerabilities,
7377
and exits unsuccessfully if there are. It also exits successfully if the
74-
'format -json' ('-json') or '-format sarif' is provided, regardless of the number
75-
of detected vulnerabilities.
78+
'format -json' ('-json'), '-format sarif', or '-format openvex' is provided,
79+
regardless of the number of detected vulnerabilities.
7680
7781
# Limitations
7882

cmd/govulncheck/testdata/common/testfiles/usage/usage.ct

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Usage:
1414
vulnerability database url (default "https://vuln.go.dev")
1515
-format value
1616
specify format output
17-
The supported values are 'text', 'json', and 'sarif' (default 'text')
17+
The supported values are 'text', 'json', 'sarif', and 'openvex' (default 'text')
1818
-json
1919
output JSON (Go compatible legacy flag, see format flag)
2020
-mode value

internal/openvex/vex.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
//
88
// These types match the OpenVEX standard. See https://github.com/openvex for
99
// more information on VEX and OpenVEX.
10+
//
11+
// This is intended to be the minimimal amount of information required to output
12+
// a complete VEX document according to the specification.
1013
package openvex
1114

1215
import "time"

internal/scan/flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func parseFlags(cfg *config, stderr io.Writer, args []string) error {
4242
flags.Var(&modeFlag, "mode", "supports 'source', 'binary', and 'extract' (default 'source')")
4343
flags.Var(&cfg.tags, "tags", "comma-separated `list` of build tags")
4444
flags.Var(&cfg.show, "show", "enable display of additional information specified by the comma separated `list`\nThe supported values are 'traces','color', 'version', and 'verbose'")
45-
flags.Var(&cfg.format, "format", "specify format output\nThe supported values are 'text', 'json', and 'sarif' (default 'text')")
45+
flags.Var(&cfg.format, "format", "specify format output\nThe supported values are 'text', 'json', 'sarif', and 'openvex' (default 'text')")
4646
flags.BoolVar(&version, "version", false, "print the version information")
4747
flags.Var(&scanFlag, "scan", "set the scanning level desired, one of 'module', 'package', or 'symbol' (default 'symbol')")
4848

0 commit comments

Comments
 (0)