File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Go Vulnerability Check
2+ on :
3+ schedule :
4+ - cron : " 0 0 * * 1" # Every Monday at midnight UTC
5+ jobs :
6+ govulncheck :
7+ runs-on : ubuntu-latest
8+ permissions :
9+ contents : read
10+ security-events : write
11+ steps :
12+ - name : Check out code
13+ uses : actions/checkout@v4
14+
15+ - name : Set up Go
16+ uses : actions/setup-go@v5
17+ with :
18+ go-version-file : ' go.mod'
19+
20+ # `govulncheck -format sarif` exits successfully regardless of results, which are not in stdout.
21+ # See https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck#hdr-Exit_codes for more information on exit codes.
22+ - name : Check Go vulnerabilities
23+ run : |
24+ make
25+ go run golang.org/x/vuln/cmd/govulncheck@d1f380186385b4f64e00313f31743df8e4b89a77 -mode=binary -format sarif bin/gh > gh.sarif
26+
27+ - name : Upload SARIF report
28+ uses : github/codeql-action/upload-sarif@9b02dc2f60288b463e7a66e39c78829b62780db7 # 2.22.1
29+ with :
30+ sarif_file : gh.sarif
Original file line number Diff line number Diff line change 1616 - go.sum
1717 - " .github/licenses.tmpl"
1818 - " script/licenses*"
19-
2019permissions :
2120 contents : read
22-
2321jobs :
2422 lint :
2523 runs-on : ubuntu-latest
26-
2724 steps :
2825 - name : Check out code
2926 uses : actions/checkout@v4
6461 export PATH=${GOROOT}/bin:$PATH
6562 go install github.com/google/go-licenses@5348b744d0983d85713295ea08a20cca1654a45e
6663 make licenses-check
64+
65+ # Discover vulnerabilities within Go standard libraries used to build GitHub CLI using govulncheck.
66+ govulncheck :
67+ runs-on : ubuntu-latest
68+ steps :
69+ - name : Check out code
70+ uses : actions/checkout@v4
71+
72+ - name : Set up Go
73+ uses : actions/setup-go@v5
74+ with :
75+ go-version-file : ' go.mod'
76+
77+ # `govulncheck` exits unsuccessfully if vulnerabilities are found, providing results in stdout.
78+ # See https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck#hdr-Exit_codes for more information on exit codes.
79+ - name : Check Go vulnerabilities
80+ run : |
81+ make
82+ go run golang.org/x/vuln/cmd/govulncheck@d1f380186385b4f64e00313f31743df8e4b89a77 -mode=binary bin/gh
You can’t perform that action at this time.
0 commit comments