Skip to content

Commit 3ffb532

Browse files
authored
chore: go1.23 (#1776)
1 parent 4d57dcc commit 3ffb532

File tree

38 files changed

+508
-494
lines changed

38 files changed

+508
-494
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
pre-build-updater:
4040
runs-on: ubuntu-latest
4141
container:
42-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
42+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
4343
steps:
4444
- name: Checkout
4545
uses: actions/checkout@v4
@@ -72,7 +72,7 @@ jobs:
7272
fail-fast: false
7373
matrix: ${{ fromJson(needs.define-scanner-job-matrix.outputs.matrix).build_and_push }}
7474
container:
75-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
75+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
7676
steps:
7777
- name: Checkout
7878
uses: actions/checkout@v4
@@ -101,7 +101,7 @@ jobs:
101101
style-check:
102102
runs-on: ubuntu-latest
103103
container:
104-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
104+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
105105
steps:
106106
- name: Checkout
107107
uses: actions/checkout@v4
@@ -120,7 +120,7 @@ jobs:
120120
unit-tests:
121121
runs-on: ubuntu-latest
122122
container:
123-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
123+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
124124
steps:
125125
- name: Checkout
126126
uses: actions/checkout@v4
@@ -139,7 +139,7 @@ jobs:
139139
db-integration-tests:
140140
runs-on: ubuntu-latest
141141
container:
142-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
142+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
143143
steps:
144144
- name: Checkout
145145
uses: actions/checkout@v4
@@ -167,7 +167,7 @@ jobs:
167167
needs:
168168
- pre-build-updater
169169
container:
170-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
170+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
171171
steps:
172172
- name: Checkout
173173
uses: actions/checkout@v4
@@ -209,7 +209,7 @@ jobs:
209209
needs:
210210
- generate-genesis-dump
211211
container:
212-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
212+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
213213
steps:
214214
- name: Checkout
215215
uses: actions/checkout@v4
@@ -257,7 +257,7 @@ jobs:
257257
fail-fast: false
258258
matrix: ${{ fromJson(needs.define-scanner-job-matrix.outputs.matrix).build_and_push }}
259259
container:
260-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
260+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
261261
steps:
262262
- name: Checkout
263263
uses: actions/checkout@v4
@@ -314,7 +314,7 @@ jobs:
314314
needs:
315315
- generate-db-dump
316316
container:
317-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
317+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
318318
steps:
319319
- name: Checkout
320320
uses: actions/checkout@v4
@@ -365,7 +365,7 @@ jobs:
365365
fail-fast: false
366366
matrix: ${{ fromJson(needs.define-scanner-job-matrix.outputs.matrix).build_and_push }}
367367
container:
368-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
368+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
369369
steps:
370370
- name: Checkout
371371
uses: actions/checkout@v4
@@ -438,7 +438,7 @@ jobs:
438438
- build-images
439439
runs-on: ubuntu-latest
440440
container:
441-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
441+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
442442
env:
443443
QUAY_RHACS_ENG_RW_USERNAME: ${{ secrets.QUAY_RHACS_ENG_RW_USERNAME }}
444444
QUAY_RHACS_ENG_RW_PASSWORD: ${{ secrets.QUAY_RHACS_ENG_RW_PASSWORD }}
@@ -484,7 +484,7 @@ jobs:
484484
needs:
485485
- generate-genesis-dump
486486
container:
487-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
487+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
488488
steps:
489489
- name: Checkout
490490
uses: actions/checkout@v4
@@ -602,7 +602,7 @@ jobs:
602602
needs:
603603
- generate-db-dump
604604
container:
605-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
605+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
606606
steps:
607607
- name: Checkout
608608
uses: actions/checkout@v4
@@ -630,7 +630,7 @@ jobs:
630630
needs:
631631
- generate-db-dump
632632
container:
633-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
633+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
634634
steps:
635635
- name: Checkout
636636
uses: actions/checkout@v4
@@ -664,7 +664,7 @@ jobs:
664664
needs:
665665
- generate-db-dump
666666
container:
667-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
667+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
668668
steps:
669669
- name: Checkout
670670
uses: actions/checkout@v4

.github/workflows/sanity-check-vuln-updates.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
SLACK_WEBHOOK_ONCALL: ${{ secrets.SLACK_ONCALL_SCANNER_WEBHOOK }}
1111
runs-on: ubuntu-latest
1212
container:
13-
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
13+
image: quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
1414
steps:
1515
- name: Checkout
1616
uses: actions/checkout@v4

.golangci.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
run:
44
timeout: 16m
5+
modules-download-mode: readonly
6+
go: "1.23"
57

68
output:
7-
format: "junit-xml:report.xml,colored-line-number"
9+
formats:
10+
- format: colored-line-number
11+
- format: junit-xml
12+
path: report.xml
813

914
issues:
1015
exclude-use-default: false
@@ -31,13 +36,22 @@ issues:
3136
- linters:
3237
- revive
3338
text: "package-comments: should have a package comment"
39+
- linters:
40+
- gocritic
41+
path: _test\.go
3442

3543
linters-settings:
3644
gosec:
3745
includes:
3846
- G601 # Implicit memory aliasing of items from a range statement
3947
revive:
40-
min-confidence: 0
48+
rules:
49+
- name: package-comments
50+
disabled: true
51+
- name: error-strings
52+
disabled: true
53+
- name: unexported-return
54+
disabled: true
4155
govet:
4256
enable-all: true
4357
disable:
@@ -65,6 +79,8 @@ linters-settings:
6579
allow-unused: false # report any unused nolint directives
6680
require-explanation: false # don't require an explanation for nolint directives
6781
require-specific: true # require nolint directives to be specific about which linter is being skipped
82+
staticcheck:
83+
checks: [ all,-ST1000,-ST1001,-ST1003,-ST1005,-SA1019,-SA4001,-ST1016 ]
6884

6985
linters:
7086
# please, do not use `enable-all`: it's deprecated and will be removed soon.
@@ -73,6 +89,7 @@ linters:
7389
enable:
7490
- asciicheck
7591
# - bodyclose
92+
- copyloopvar
7693
# - deadcode
7794
# - depguard
7895
# - dogsled
@@ -84,7 +101,6 @@ linters:
84101
# - gochecknoinits
85102
# - gocognit
86103
# - goconst
87-
- exportloopref
88104
- gocritic
89105
# - gocyclo
90106
# - godot

.openshift-ci/Dockerfile.build_root

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
# - `make update` and commit the results
1111
# - run `/test pj-rehearse-max` on the openshift/release PR to validate the change
1212

13-
FROM quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
13+
FROM quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5

.openshift-ci/build/Dockerfile.build-bundle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
1+
FROM quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
22

33
COPY . /go/src/github.com/stackrox/scanner
44
WORKDIR /go/src/github.com/stackrox/scanner

.openshift-ci/build/Dockerfile.build-db-bundle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
1+
FROM quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
22

33
COPY . /go/src/github.com/stackrox/scanner
44
WORKDIR /go/src/github.com/stackrox/scanner

.openshift-ci/build/Dockerfile.generate-db-dump

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
1+
FROM quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
22

33
COPY . /go/src/github.com/stackrox/scanner
44
WORKDIR /go/src/github.com/stackrox/scanner

.openshift-ci/build/Dockerfile.generate-genesis-dump

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/stackrox-io/apollo-ci:scanner-test-0.4.3
1+
FROM quay.io/stackrox-io/apollo-ci:scanner-test-0.4.5
22

33
COPY . /go/src/github.com/stackrox/scanner
44
WORKDIR /go/src/github.com/stackrox/scanner

BUILD_IMAGE_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
scanner-build-0.4.3
1+
scanner-build-0.4.5

api/v1/imagescan/convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var (
2424

2525
m := make(map[apiV1.Note]v1.Note, numNotes)
2626
for name, val := range v1.Note_value {
27-
normalizedName := strings.ToLower(strings.Replace(name, "_", "", -1))
27+
normalizedName := strings.ToLower(strings.ReplaceAll(name, "_", ""))
2828
for note := apiV1.OSCVEsUnavailable; note < apiV1.SentinelNote; note++ {
2929
if strings.HasPrefix(strings.ToLower(note.String()), normalizedName) {
3030
m[note] = v1.Note(val)

0 commit comments

Comments
 (0)