Skip to content

Commit

Permalink
chore: bump go to use v1.23 (#831)
Browse files Browse the repository at this point in the history
* chore: bump to use go.1.23

Signed-off-by: hectorj2f <[email protected]>

* use latest version of golang-lint

Signed-off-by: hectorj2f <[email protected]>

* add gosec comment and lints

Signed-off-by: hectorj2f <[email protected]>

---------

Signed-off-by: hectorj2f <[email protected]>
  • Loading branch information
hectorj2f authored Sep 25, 2024
1 parent 4253b65 commit 7a56c89
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
with:
version: v1.58
version: v1.61
args: --timeout=10m --verbose
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/sigstore/timestamp-authority

go 1.22.0

toolchain go1.22.1
go 1.23.1

require (
cloud.google.com/go/security v1.17.4
Expand Down
4 changes: 2 additions & 2 deletions pkg/signer/tink.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func getPrimaryKey(ks *tinkpb.Keyset) *tinkpb.KeyData {
// validateEcdsaPrivKey validates the given ECDSAPrivateKey.
// https://github.com/google/tink/blob/9753ffddd4d04aa56e0605ff4a0db46f2fb80529/go/signature/ecdsa_signer_key_manager.go#L139
func validateEcdsaPrivKey(key *ecdsapb.EcdsaPrivateKey) error {
if err := keyset.ValidateKeyVersion(key.Version, uint32(ecdsaSignerKeyVersion)); err != nil {
if err := keyset.ValidateKeyVersion(key.Version, uint32(ecdsaSignerKeyVersion)); err != nil { //nolint:gosec
return fmt.Errorf("ecdsa_signer_key_manager: invalid key: %w", err)
}
hash, curve, encoding := getECDSAParamNames(key.PublicKey.Params)
Expand All @@ -178,7 +178,7 @@ func getECDSAParamNames(params *ecdsapb.EcdsaParams) (string, string, string) {
// validateEd25519PrivKey validates the given ED25519PrivateKey.
// https://github.com/google/tink/blob/9753ffddd4d04aa56e0605ff4a0db46f2fb80529/go/signature/ed25519_signer_key_manager.go#L132
func validateEd25519PrivKey(key *ed25519pb.Ed25519PrivateKey) error {
if err := keyset.ValidateKeyVersion(key.Version, uint32(ed25519SignerKeyVersion)); err != nil {
if err := keyset.ValidateKeyVersion(key.Version, uint32(ed25519SignerKeyVersion)); err != nil { //nolint:gosec
return fmt.Errorf("ed25519_signer_key_manager: invalid key: %w", err)
}
if len(key.KeyValue) != ed25519.SeedSize {
Expand Down
2 changes: 1 addition & 1 deletion pkg/verification/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ func verifyTSRWithChain(ts *timestamp.Timestamp, opts VerifyOpts) error {
return fmt.Errorf("error parsing hashed message: %w", err)
}

if opts.Roots == nil || len(opts.Roots) == 0 {
if len(opts.Roots) == 0 {
return fmt.Errorf("no root certificates provided for verifying the certificate chain")
}

Expand Down

0 comments on commit 7a56c89

Please sign in to comment.