Skip to content
Closed
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
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/docker/go-connections v0.6.0
github.com/go-logr/logr v1.4.3
github.com/go-logr/zerologr v1.2.3
github.com/golang-jwt/jwt/v4 v4.5.2
github.com/golang-jwt/jwt/v5 v5.3.0
github.com/google/go-github/v81 v81.0.0
github.com/justinas/alice v1.2.0
github.com/lestrrat-go/jwx/v3 v3.0.13
Expand Down Expand Up @@ -61,6 +61,7 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/goccy/go-json v0.10.5 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/google/go-github/v75 v75.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.6.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PU
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI=
github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=
github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
Expand Down
2 changes: 1 addition & 1 deletion internal/github/kmssigner.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"github.com/aws/aws-sdk-go-v2/service/kms"
"github.com/aws/aws-sdk-go-v2/service/kms/types"
"github.com/bradleyfalzon/ghinstallation/v2"
"github.com/golang-jwt/jwt/v4"
"github.com/golang-jwt/jwt/v5"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"

Expand All @@ -22,8 +22,8 @@
_ "crypto/sha256"
)

var _ ghinstallation.Signer = KMSSigner{}

Check failure on line 25 in internal/github/kmssigner.go

View workflow job for this annotation

GitHub Actions / build (unit)

cannot use KMSSigner{} (value of struct type KMSSigner) as ghinstallation.Signer value in variable declaration: KMSSigner does not implement ghinstallation.Signer (wrong type for method Sign)

Check failure on line 25 in internal/github/kmssigner.go

View workflow job for this annotation

GitHub Actions / lint

cannot use KMSSigner{} (value of struct type KMSSigner) as ghinstallation.Signer value in variable declaration: KMSSigner does not implement ghinstallation.Signer (wrong type for method Sign)

Check failure on line 25 in internal/github/kmssigner.go

View workflow job for this annotation

GitHub Actions / build (integration)

cannot use KMSSigner{} (value of struct type KMSSigner) as ghinstallation.Signer value in variable declaration: KMSSigner does not implement ghinstallation.Signer (wrong type for method Sign)
var _ jwt.SigningMethod = KMSSigningMethod{}

Check failure on line 26 in internal/github/kmssigner.go

View workflow job for this annotation

GitHub Actions / build (unit)

cannot use KMSSigningMethod{} (value of struct type KMSSigningMethod) as "github.com/golang-jwt/jwt/v5".SigningMethod value in variable declaration: KMSSigningMethod does not implement "github.com/golang-jwt/jwt/v5".SigningMethod (wrong type for method Sign)

Check failure on line 26 in internal/github/kmssigner.go

View workflow job for this annotation

GitHub Actions / lint

cannot use KMSSigningMethod{} (value of struct type KMSSigningMethod) as "github.com/golang-jwt/jwt/v5".SigningMethod value in variable declaration: KMSSigningMethod does not implement "github.com/golang-jwt/jwt/v5".SigningMethod (wrong type for method Sign)

Check failure on line 26 in internal/github/kmssigner.go

View workflow job for this annotation

GitHub Actions / build (integration)

cannot use KMSSigningMethod{} (value of struct type KMSSigningMethod) as "github.com/golang-jwt/jwt/v5".SigningMethod value in variable declaration: KMSSigningMethod does not implement "github.com/golang-jwt/jwt/v5".SigningMethod (wrong type for method Sign)

// KMSClient defines the AWS API surface required by the KMSSigner.
type KMSClient interface {
Expand Down Expand Up @@ -53,7 +53,7 @@

return KMSSigner{
ARN: arn,
Method: method,

Check failure on line 56 in internal/github/kmssigner.go

View workflow job for this annotation

GitHub Actions / build (unit)

cannot use method (variable of struct type KMSSigningMethod) as "github.com/golang-jwt/jwt/v5".SigningMethod value in struct literal: KMSSigningMethod does not implement "github.com/golang-jwt/jwt/v5".SigningMethod (wrong type for method Sign)

Check failure on line 56 in internal/github/kmssigner.go

View workflow job for this annotation

GitHub Actions / lint

cannot use method (variable of struct type KMSSigningMethod) as "github.com/golang-jwt/jwt/v5".SigningMethod value in struct literal: KMSSigningMethod does not implement "github.com/golang-jwt/jwt/v5".SigningMethod (wrong type for method Sign)

Check failure on line 56 in internal/github/kmssigner.go

View workflow job for this annotation

GitHub Actions / build (integration)

cannot use method (variable of struct type KMSSigningMethod) as "github.com/golang-jwt/jwt/v5".SigningMethod value in struct literal: KMSSigningMethod does not implement "github.com/golang-jwt/jwt/v5".SigningMethod (wrong type for method Sign)
}
}

Expand Down
2 changes: 1 addition & 1 deletion internal/github/kmssigner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/aws/aws-sdk-go-v2/service/kms"
"github.com/chinmina/chinmina-bridge/internal/github"
"github.com/golang-jwt/jwt/v4"
"github.com/golang-jwt/jwt/v5"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/github/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

"github.com/bradleyfalzon/ghinstallation/v2"
"github.com/chinmina/chinmina-bridge/internal/config"
"github.com/golang-jwt/jwt/v4"
"github.com/golang-jwt/jwt/v5"
"github.com/google/go-github/v81/github"
"github.com/rs/zerolog/log"
)
Expand Down Expand Up @@ -147,7 +147,7 @@

func createSigner(ctx context.Context, cfg config.GithubConfig) (ghinstallation.Signer, error) {
if cfg.PrivateKeyARN != "" {
return NewAWSKMSSigner(ctx, cfg.PrivateKeyARN)

Check failure on line 150 in internal/github/token.go

View workflow job for this annotation

GitHub Actions / build (unit)

cannot use NewAWSKMSSigner(ctx, cfg.PrivateKeyARN) (value of struct type KMSSigner) as ghinstallation.Signer value in return statement: KMSSigner does not implement ghinstallation.Signer (wrong type for method Sign)

Check failure on line 150 in internal/github/token.go

View workflow job for this annotation

GitHub Actions / lint

cannot use NewAWSKMSSigner(ctx, cfg.PrivateKeyARN) (value of struct type KMSSigner) as ghinstallation.Signer value in return statement: KMSSigner does not implement ghinstallation.Signer (wrong type for method Sign)

Check failure on line 150 in internal/github/token.go

View workflow job for this annotation

GitHub Actions / build (integration)

cannot use NewAWSKMSSigner(ctx, cfg.PrivateKeyARN) (value of struct type KMSSigner) as ghinstallation.Signer value in return statement: KMSSigner does not implement ghinstallation.Signer (wrong type for method Sign)
}

if cfg.PrivateKey != "" {
Expand All @@ -156,7 +156,7 @@
return nil, fmt.Errorf("could not parse private key: %s", err)
}

return ghinstallation.NewRSASigner(jwt.SigningMethodRS256, key), nil

Check failure on line 159 in internal/github/token.go

View workflow job for this annotation

GitHub Actions / build (unit)

cannot use jwt.SigningMethodRS256 (variable of type *"github.com/golang-jwt/jwt/v5".SigningMethodRSA) as *"github.com/golang-jwt/jwt/v4".SigningMethodRSA value in argument to ghinstallation.NewRSASigner

Check failure on line 159 in internal/github/token.go

View workflow job for this annotation

GitHub Actions / lint

cannot use jwt.SigningMethodRS256 (variable of type *"github.com/golang-jwt/jwt/v5".SigningMethodRSA) as *"github.com/golang-jwt/jwt/v4".SigningMethodRSA value in argument to ghinstallation.NewRSASigner (typecheck)

Check failure on line 159 in internal/github/token.go

View workflow job for this annotation

GitHub Actions / build (integration)

cannot use jwt.SigningMethodRS256 (variable of type *"github.com/golang-jwt/jwt/v5".SigningMethodRSA) as *"github.com/golang-jwt/jwt/v4".SigningMethodRSA value in argument to ghinstallation.NewRSASigner
}

return nil, errors.New("no private key configuration specified")
Expand Down
Loading