Skip to content

Commit 00939de

Browse files
chore(deps): bump golang.org/x/crypto from 0.31.0 to 0.35.0 (#683)
* chore(deps): bump golang.org/x/crypto from 0.31.0 to 0.35.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.31.0 to 0.35.0. - [Commits](golang/crypto@v0.31.0...v0.35.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-version: 0.35.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Run go mod tidy Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com> * Do not pin the toolchain version Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com> * Fix the linting failure bumping golangci-lint Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Radoslav Dimitrov <radoslav@stacklok.com>
1 parent ebe3d6d commit 00939de

File tree

7 files changed

+40
-50
lines changed

7 files changed

+40
-50
lines changed

.github/workflows/linting.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ jobs:
4343
cache: true
4444

4545
- name: Run golangci-lint
46-
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
46+
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
4747
with:
4848
# Require: The version of golangci-lint to use.
4949
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
5050
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
51-
version: v1.54
51+
version: v2.1.1
5252
args: --timeout 5m --verbose

.golangci.yml

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,20 @@
1-
#
2-
# Copyright 2024 The Update Framework Authors
3-
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
7-
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
9-
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License
15-
#
16-
# SPDX-License-Identifier: Apache-2.0
17-
18-
run:
19-
linters:
20-
enable:
21-
- gofmt
22-
- bodyclose
23-
- contextcheck
24-
- errname
25-
- gocyclo
26-
- godot
27-
- godox
28-
- misspell
29-
- stylecheck
30-
- whitespace
31-
- gocritic
1+
version: "2"
2+
linters:
3+
exclusions:
4+
generated: lax
5+
presets:
6+
- comments
7+
- common-false-positives
8+
- legacy
9+
- std-error-handling
10+
paths:
11+
- third_party$
12+
- builtin$
13+
- examples$
14+
formatters:
15+
exclusions:
16+
generated: lax
17+
paths:
18+
- third_party$
19+
- builtin$
20+
- examples$

examples/client/client_example.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func InitEnvironment() (string, error) {
7979
if !generateRandomFolder {
8080
tmpDir = filepath.Join(cwd, "tmp")
8181
// create a temporary folder for storing the demo artifacts
82-
os.Mkdir(tmpDir, 0750)
82+
_ = os.Mkdir(tmpDir, 0750)
8383
} else {
8484
// create a temporary folder for storing the demo artifacts
8585
tmpDir, err = os.MkdirTemp(cwd, "tmp")
@@ -89,7 +89,7 @@ func InitEnvironment() (string, error) {
8989
}
9090

9191
// create a destination folder for storing the downloaded target
92-
os.Mkdir(filepath.Join(tmpDir, "download"), 0750)
92+
_ = os.Mkdir(filepath.Join(tmpDir, "download"), 0750)
9393
return tmpDir, nil
9494
}
9595

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/theupdateframework/go-tuf/v2
22

3-
go 1.22
3+
go 1.23.0
44

55
require (
66
github.com/go-logr/stdr v1.2.2
@@ -21,9 +21,9 @@ require (
2121
github.com/pmezard/go-difflib v1.0.0 // indirect
2222
github.com/spf13/pflag v1.0.6 // indirect
2323
github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect
24-
golang.org/x/crypto v0.31.0 // indirect
25-
golang.org/x/sys v0.28.0 // indirect
26-
golang.org/x/term v0.27.0 // indirect
24+
golang.org/x/crypto v0.35.0 // indirect
25+
golang.org/x/sys v0.30.0 // indirect
26+
golang.org/x/term v0.29.0 // indirect
2727
google.golang.org/grpc v1.56.3 // indirect
2828
gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect
2929
gopkg.in/yaml.v3 v3.0.1 // indirect

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ go.opentelemetry.io/otel v1.15.0 h1:NIl24d4eiLJPM0vKn4HjLYM+UZf6gSfi9Z+NmCxkWbk=
6363
go.opentelemetry.io/otel v1.15.0/go.mod h1:qfwLEbWhLPk5gyWrne4XnF0lC8wtywbuJbgfAE3zbek=
6464
go.opentelemetry.io/otel/trace v1.15.0 h1:5Fwje4O2ooOxkfyqI/kJwxWotggDLix4BSAvpE1wlpo=
6565
go.opentelemetry.io/otel/trace v1.15.0/go.mod h1:CUsmE2Ht1CRkvE8OsMESvraoZrrcgD1J2W8GV1ev0Y4=
66-
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
67-
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
68-
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
69-
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
70-
golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
71-
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
66+
golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs=
67+
golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
68+
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
69+
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
70+
golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
71+
golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
7272
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
7373
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
7474
google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc=

internal/testutils/signer/signer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func loadSigner(k, s string) (signature.Signer, error) {
154154
var pssOpt = rsa.PSSOptions{Hash: crypto.SHA256}
155155
opts = append(opts, options.WithRSAPSS(&pssOpt))
156156
default:
157-
return nil, fmt.Errorf("unsupported key scheme %s\n", s)
157+
return nil, fmt.Errorf("unsupported key scheme %s", s)
158158
}
159159

160160
return signature.LoadSignerWithOpts(pk, opts...)

internal/testutils/simulator/repository_simulator.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,13 +427,14 @@ func (rs *RepositorySimulator) FetchMetadata(role string, version *int) ([]byte,
427427
}
428428

429429
// Sign and serialize the requested metadata
430-
if role == metadata.TIMESTAMP {
430+
switch role {
431+
case metadata.TIMESTAMP:
431432
return signMetadata(role, rs.MDTimestamp, rs)
432-
} else if role == metadata.SNAPSHOT {
433+
case metadata.SNAPSHOT:
433434
return signMetadata(role, rs.MDSnapshot, rs)
434-
} else if role == metadata.TARGETS {
435+
case metadata.TARGETS:
435436
return signMetadata(role, rs.MDTargets, rs)
436-
} else {
437+
default:
437438
md, ok := rs.MDDelegates[role]
438439
if !ok {
439440
slog.Error("Unknown role", "role", role)

0 commit comments

Comments
 (0)