Skip to content

Commit 3edaabf

Browse files
authored
Added Gosec and VulnChk scans
1 parent 2898058 commit 3edaabf

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,36 @@ jobs:
5252
run: |
5353
make format-check
5454
55+
gosec:
56+
runs-on: ubuntu-latest
57+
env:
58+
GO111MODULE: on
59+
60+
steps:
61+
- name: Checkout Source
62+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
63+
64+
- name: Run Gosec Security Scanner
65+
uses: securego/gosec@43fee884f668c23601e0bec7a8c095fba226f889 # v2.22.1
66+
with:
67+
args: '-severity high -exclude-dir=test -exclude=*_test.go ./...'
68+
69+
vulnerability-check:
70+
name: "Vulnerability check"
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: Harden Runner
74+
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
75+
with:
76+
egress-policy: audit
77+
78+
- name: Scan for Vulnerabilities
79+
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
80+
with:
81+
go-version-file: go.mod
82+
check-latest: true
83+
go-package: ./...
84+
5585
test:
5686
strategy:
5787
matrix:

0 commit comments

Comments
 (0)