Skip to content

Commit a7576b4

Browse files
committed
Add gossec and govulncheck to GitHub Actions workflow
1 parent 8e976e3 commit a7576b4

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/security.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Security Checks
2+
on:
3+
pull_request:
4+
branches: [main]
5+
push:
6+
branches: [main]
7+
schedule:
8+
- cron: '0 15 * * 0'
9+
10+
permissions:
11+
contents: read
12+
actions: read
13+
pull-requests: read
14+
security-events: write
15+
16+
jobs:
17+
gosec:
18+
name: Golang Security Checker
19+
runs-on: ubuntu-22.04
20+
env:
21+
GO111MODULE: on
22+
steps:
23+
- name: Checkout Source
24+
uses: actions/checkout@v3
25+
- name: Run Gosec Security Scanner
26+
uses: securego/gosec@master
27+
with:
28+
args: '-no-fail -fmt sarif -out results.sarif -tests ./...'
29+
- name: Upload SARIF file
30+
uses: github/codeql-action/upload-sarif@v2
31+
with:
32+
# Path to SARIF file relative to the root of the repository
33+
sarif_file: results.sarif
34+
govulncheck:
35+
name: Govulncheck
36+
runs-on: ubuntu-22.04
37+
steps:
38+
- id: govulncheck
39+
uses: golang/govulncheck-action@master
40+
with:
41+
go-version-file: go.mod

0 commit comments

Comments
 (0)