Skip to content

Commit 130b471

Browse files
authored
Bump to go1.24.1 (#1713)
Signed-off-by: Alvaro Neira Ayuso <[email protected]>
1 parent ab00d33 commit 130b471

File tree

8 files changed

+15
-14
lines changed

8 files changed

+15
-14
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
matrix:
3939
go: ${{ fromJSON(needs.load-versions.outputs.go_version_list) }}
4040
os: [ubuntu-latest]
41-
golangci-lint: ["1.62.2"]
42-
gosec: ["2.19.0"]
41+
golangci-lint: ["1.64.8"]
42+
gosec: ["2.22.2"]
4343
steps:
4444
- name: Set up Go 1.x
4545
uses: actions/[email protected]

.golangci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ linters:
215215
#- errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
216216
#- execinquery # checks query string in Query function which reads your Go src files and warning it finds
217217
- exhaustive # checks exhaustiveness of enum switch statements
218-
- exportloopref # checks for pointers to enclosing loop variables
218+
#- exportloopref # checks for pointers to enclosing loop variables
219219
#- forbidigo # forbids identifiers
220220
#- funlen # tool for detection of long functions
221221
#- gochecknoinits # checks that no init functions are present in Go code

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/bitnami-labs/sealed-secrets
22

3-
go 1.23.7
3+
go 1.24.1
44

55
require (
66
github.com/Masterminds/sprig/v3 v3.3.0

pkg/controller/keys_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func signKeyWithNotBefore(r io.Reader, key *rsa.PrivateKey, notBefore time.Time)
3838
func TestReadKey(t *testing.T) {
3939
rand := testRand()
4040

41-
key, err := rsa.GenerateKey(rand, 512)
41+
key, err := rsa.GenerateKey(rand, 2048)
4242
if err != nil {
4343
t.Fatalf("Failed to generate test key: %v", err)
4444
}
@@ -77,7 +77,7 @@ func TestReadKey(t *testing.T) {
7777
func TestWriteKey(t *testing.T) {
7878
ctx := context.Background()
7979
rand := testRand()
80-
key, err := rsa.GenerateKey(rand, 512)
80+
key, err := rsa.GenerateKey(rand, 2048)
8181
if err != nil {
8282
t.Fatalf("Failed to generate test key: %v", err)
8383
}
@@ -125,15 +125,15 @@ func TestWriteKey(t *testing.T) {
125125
labelKey := strings.Split(label, "=")[0]
126126
labelValue := strings.Split(label, "=")[1]
127127
if labels.(map[string]interface{})[labelKey] != labelValue {
128-
t.Errorf("writeKey didn't set label " + labelKey + " to value '" + labelValue + "'")
128+
t.Errorf("writeKey didn't set label %v to value '%v'", labelKey, labelValue)
129129
}
130130
}
131131

132132
for _, annotation := range strings.Split(additionalAnnotations, ",") {
133133
annotationKey := strings.Split(annotation, "=")[0]
134134
annotationValue := strings.Split(annotation, "=")[1]
135135
if annotations.(map[string]interface{})[annotationKey] != annotationValue {
136-
t.Errorf("writeKey didn't set annotation '" + annotationKey + "' to value '" + annotationValue + "'")
136+
t.Errorf("writeKey didn't set annotation '%v' to value '%v'", annotationKey, annotationValue)
137137
}
138138
}
139139
}

pkg/controller/main_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func TestInitKeyRotationTick(t *testing.T) {
160160
func TestReuseKey(t *testing.T) {
161161
ctx := context.Background()
162162
rand := testRand()
163-
key, err := rsa.GenerateKey(rand, 512)
163+
key, err := rsa.GenerateKey(rand, 2048)
164164
if err != nil {
165165
t.Fatalf("Failed to generate test key: %v", err)
166166
}
@@ -199,7 +199,7 @@ func TestReuseKey(t *testing.T) {
199199
func TestRenewStaleKey(t *testing.T) {
200200
ctx := context.Background()
201201
rand := testRand()
202-
key, err := rsa.GenerateKey(rand, 512)
202+
key, err := rsa.GenerateKey(rand, 2048)
203203
if err != nil {
204204
t.Fatalf("Failed to generate test key: %v", err)
205205
}
@@ -259,7 +259,7 @@ func TestRenewStaleKey(t *testing.T) {
259259
func TestKeyCutoff(t *testing.T) {
260260
ctx := context.Background()
261261
rand := testRand()
262-
key, err := rsa.GenerateKey(rand, 512)
262+
key, err := rsa.GenerateKey(rand, 2048)
263263
if err != nil {
264264
t.Fatalf("Failed to generate test key: %v", err)
265265
}
@@ -331,7 +331,7 @@ func writeLegacyKey(ctx context.Context, client kubernetes.Interface, key *rsa.P
331331
func TestLegacySecret(t *testing.T) {
332332
ctx := context.Background()
333333
rand := testRand()
334-
key, err := rsa.GenerateKey(rand, 512)
334+
key, err := rsa.GenerateKey(rand, 2048)
335335
if err != nil {
336336
t.Fatalf("Failed to generate test key: %v", err)
337337
}

pkg/crypto/crypto.go

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func HybridEncrypt(rnd io.Reader, pubKey *rsa.PublicKey, plaintext, label []byte
5959
// First 2 bytes are RSA ciphertext length, so we can separate
6060
// all the pieces later.
6161
ciphertext := make([]byte, 2)
62+
// #nosec G115
6263
binary.BigEndian.PutUint16(ciphertext, uint16(len(rsaCiphertext)))
6364
ciphertext = append(ciphertext, rsaCiphertext...)
6465

pkg/crypto/keys_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func testRand() io.Reader {
1717
func TestSignKey(t *testing.T) {
1818
rand := testRand()
1919

20-
key, err := rsa.GenerateKey(rand, 512)
20+
key, err := rsa.GenerateKey(rand, 2048)
2121
if err != nil {
2222
t.Fatalf("Failed to generate test key: %v", err)
2323
}

versions.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
GO_VERSION=1.23.7
1+
GO_VERSION=1.24.1
22
GO_VERSION_LIST="[\"$GO_VERSION\"]"

0 commit comments

Comments
 (0)