Skip to content

Commit b707ec9

Browse files
committed
Inspect source code for security issues
1 parent ee474c2 commit b707ec9

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/test.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@ jobs:
6767
run: |
6868
make format-check
6969
70+
gosec:
71+
runs-on: ubuntu-latest
72+
env:
73+
GO111MODULE: on
74+
75+
steps:
76+
- name: Checkout Source
77+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
78+
79+
- name: Run Gosec Security Scanner
80+
uses: securego/gosec@e0cca6fe95306b7e7790d6f1bf6a7bec6d622459 # v2.22.0
81+
with:
82+
args: '-severity high -exclude-dir=testdata -exclude=*_test.go ./...'
83+
7084
vulnerability-check:
7185
name: "Vulnerability check"
7286
runs-on: ubuntu-latest

cmd/utils/utils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ func DownloadFile(URL string, timeout int) (string, error) {
118118
// For now, skip insecure HTTPS downloads verification only for localhost
119119
var tls tls.Config
120120
if strings.Contains(URL, "https://127.0.0.1") {
121+
// #nosec G402
121122
tls.InsecureSkipVerify = true //nolint:gosec
122123
} else {
123124
tls.InsecureSkipVerify = false

0 commit comments

Comments
 (0)