Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to go1.24.1 #1713

Merged
merged 1 commit into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
matrix:
go: ${{ fromJSON(needs.load-versions.outputs.go_version_list) }}
os: [ubuntu-latest]
golangci-lint: ["1.62.2"]
gosec: ["2.19.0"]
golangci-lint: ["1.64.8"]
gosec: ["2.22.2"]
steps:
- name: Set up Go 1.x
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ linters:
#- errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
#- execinquery # checks query string in Query function which reads your Go src files and warning it finds
- exhaustive # checks exhaustiveness of enum switch statements
- exportloopref # checks for pointers to enclosing loop variables
#- exportloopref # checks for pointers to enclosing loop variables
#- forbidigo # forbids identifiers
#- funlen # tool for detection of long functions
#- gochecknoinits # checks that no init functions are present in Go code
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/bitnami-labs/sealed-secrets

go 1.23.7
go 1.24.1

require (
github.com/Masterminds/sprig/v3 v3.3.0
Expand Down
8 changes: 4 additions & 4 deletions pkg/controller/keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func signKeyWithNotBefore(r io.Reader, key *rsa.PrivateKey, notBefore time.Time)
func TestReadKey(t *testing.T) {
rand := testRand()

key, err := rsa.GenerateKey(rand, 512)
key, err := rsa.GenerateKey(rand, 2048)
if err != nil {
t.Fatalf("Failed to generate test key: %v", err)
}
Expand Down Expand Up @@ -77,7 +77,7 @@ func TestReadKey(t *testing.T) {
func TestWriteKey(t *testing.T) {
ctx := context.Background()
rand := testRand()
key, err := rsa.GenerateKey(rand, 512)
key, err := rsa.GenerateKey(rand, 2048)
if err != nil {
t.Fatalf("Failed to generate test key: %v", err)
}
Expand Down Expand Up @@ -125,15 +125,15 @@ func TestWriteKey(t *testing.T) {
labelKey := strings.Split(label, "=")[0]
labelValue := strings.Split(label, "=")[1]
if labels.(map[string]interface{})[labelKey] != labelValue {
t.Errorf("writeKey didn't set label " + labelKey + " to value '" + labelValue + "'")
t.Errorf("writeKey didn't set label %v to value '%v'", labelKey, labelValue)
}
}

for _, annotation := range strings.Split(additionalAnnotations, ",") {
annotationKey := strings.Split(annotation, "=")[0]
annotationValue := strings.Split(annotation, "=")[1]
if annotations.(map[string]interface{})[annotationKey] != annotationValue {
t.Errorf("writeKey didn't set annotation '" + annotationKey + "' to value '" + annotationValue + "'")
t.Errorf("writeKey didn't set annotation '%v' to value '%v'", annotationKey, annotationValue)
}
}
}
8 changes: 4 additions & 4 deletions pkg/controller/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func TestInitKeyRotationTick(t *testing.T) {
func TestReuseKey(t *testing.T) {
ctx := context.Background()
rand := testRand()
key, err := rsa.GenerateKey(rand, 512)
key, err := rsa.GenerateKey(rand, 2048)
if err != nil {
t.Fatalf("Failed to generate test key: %v", err)
}
Expand Down Expand Up @@ -199,7 +199,7 @@ func TestReuseKey(t *testing.T) {
func TestRenewStaleKey(t *testing.T) {
ctx := context.Background()
rand := testRand()
key, err := rsa.GenerateKey(rand, 512)
key, err := rsa.GenerateKey(rand, 2048)
if err != nil {
t.Fatalf("Failed to generate test key: %v", err)
}
Expand Down Expand Up @@ -259,7 +259,7 @@ func TestRenewStaleKey(t *testing.T) {
func TestKeyCutoff(t *testing.T) {
ctx := context.Background()
rand := testRand()
key, err := rsa.GenerateKey(rand, 512)
key, err := rsa.GenerateKey(rand, 2048)
if err != nil {
t.Fatalf("Failed to generate test key: %v", err)
}
Expand Down Expand Up @@ -331,7 +331,7 @@ func writeLegacyKey(ctx context.Context, client kubernetes.Interface, key *rsa.P
func TestLegacySecret(t *testing.T) {
ctx := context.Background()
rand := testRand()
key, err := rsa.GenerateKey(rand, 512)
key, err := rsa.GenerateKey(rand, 2048)
if err != nil {
t.Fatalf("Failed to generate test key: %v", err)
}
Expand Down
1 change: 1 addition & 0 deletions pkg/crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func HybridEncrypt(rnd io.Reader, pubKey *rsa.PublicKey, plaintext, label []byte
// First 2 bytes are RSA ciphertext length, so we can separate
// all the pieces later.
ciphertext := make([]byte, 2)
// #nosec G115
binary.BigEndian.PutUint16(ciphertext, uint16(len(rsaCiphertext)))
ciphertext = append(ciphertext, rsaCiphertext...)

Expand Down
2 changes: 1 addition & 1 deletion pkg/crypto/keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func testRand() io.Reader {
func TestSignKey(t *testing.T) {
rand := testRand()

key, err := rsa.GenerateKey(rand, 512)
key, err := rsa.GenerateKey(rand, 2048)
if err != nil {
t.Fatalf("Failed to generate test key: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion versions.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GO_VERSION=1.23.7
GO_VERSION=1.24.1
GO_VERSION_LIST="[\"$GO_VERSION\"]"
Loading