Skip to content

Commit 4ffacbb

Browse files
committed
Another try at running govulncheck
1 parent 4d95af2 commit 4ffacbb

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.github/workflows/ci.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,12 @@ def main() -> None:
266266
package_kitty()
267267
elif action == 'test':
268268
test_kitty()
269+
elif action == 'test':
270+
test_kitty()
271+
elif action == 'govulncheck':
272+
subprocess.check_call(['go', 'install', 'golang.org/x/vuln/cmd/govulncheck@latest'])
273+
with open('govulncheck.sarif', 'wb') as f:
274+
subprocess.check_call(['govulncheck', '-format', 'sarif', './...'], stdout=f)
269275
elif action == 'gofmt':
270276
q = subprocess.check_output('gofmt -s -l tools kittens'.split()).decode()
271277
if q.strip():

.github/workflows/codeql-analysis.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
schedule:
1010
- cron: '0 22 * * 5'
1111

12-
permissions:
13-
contents: read # to fetch code (actions/checkout)
14-
1512
jobs:
1613
CodeQL-Build:
1714

@@ -67,3 +64,14 @@ jobs:
6764

6865
- name: Perform CodeQL Analysis
6966
uses: github/codeql-action/analyze@v3
67+
68+
- name: Run govulncheck
69+
if: matrix.language == 'go'
70+
run: python3 .github/workflows/ci.py govulncheck
71+
72+
- name: Upload govulncheck results
73+
if: matrix.language == 'go'
74+
uses: github/codeql-action/upload-sarif@v3
75+
with:
76+
sarif_file: govulncheck.sarif
77+
category: govulncheck

0 commit comments

Comments
 (0)